You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
6.3 KiB
166 lines
6.3 KiB
//Auto-generated by kalyptus. DO NOT EDIT.
|
|
package org.kde.koala;
|
|
|
|
import org.kde.qt.Qt;
|
|
import org.kde.qt.TQHideEvent;
|
|
import org.kde.qt.TQMetaObject;
|
|
import org.kde.qt.QtSupport;
|
|
import org.kde.qt.TQCloseEvent;
|
|
import org.kde.qt.TQPopupMenu;
|
|
import org.kde.qt.TQPixmap;
|
|
import org.kde.qt.TQPoint;
|
|
import org.kde.qt.TQContextMenuEvent;
|
|
import org.kde.qt.TQMouseEvent;
|
|
import org.kde.qt.TQKeyEvent;
|
|
import org.kde.qt.TQWidget;
|
|
import org.kde.qt.TQPopupMenu;
|
|
|
|
/**
|
|
|
|
KPopupMenu is a class for menus with standard title items and keyboard
|
|
accessibility for popups with many options and/or varying options. It acts
|
|
identically to TQPopupMenu, with the addition of insertTitle(),
|
|
changeTitle(), setKeyboardShortcutsEnabled() and
|
|
setKeyboardShortcutsExecute() methods.
|
|
The titles support a text string, an icon, plus user defined gradients,
|
|
colors, and background pixmaps.
|
|
The keyboard search algorithm is incremental with additional underlining
|
|
for user feedback.
|
|
See {@link KPopupMenuSignals} for signals emitted by KPopupMenu
|
|
@author Hamish Rodda <rodda@kde.org>
|
|
|
|
@short A menu with title items.
|
|
|
|
*/
|
|
public class KPopupMenu extends TQPopupMenu {
|
|
protected KPopupMenu(Class dummy){super((Class) null);}
|
|
public native TQMetaObject metaObject();
|
|
public native String className();
|
|
/**
|
|
Constructs a KPopupMenu.
|
|
@short Constructs a KPopupMenu.
|
|
*/
|
|
public KPopupMenu(TQWidget parent, String name) {
|
|
super((Class) null);
|
|
newKPopupMenu(parent,name);
|
|
}
|
|
private native void newKPopupMenu(TQWidget parent, String name);
|
|
public KPopupMenu(TQWidget parent) {
|
|
super((Class) null);
|
|
newKPopupMenu(parent);
|
|
}
|
|
private native void newKPopupMenu(TQWidget parent);
|
|
public KPopupMenu() {
|
|
super((Class) null);
|
|
newKPopupMenu();
|
|
}
|
|
private native void newKPopupMenu();
|
|
/**
|
|
Inserts a title item with no icon.
|
|
@short Inserts a title item with no icon.
|
|
*/
|
|
public native int insertTitle(String text, int id, int index);
|
|
public native int insertTitle(String text, int id);
|
|
public native int insertTitle(String text);
|
|
/**
|
|
Inserts a title item with the given icon and title.
|
|
@short Inserts a title item with the given icon and title.
|
|
*/
|
|
public native int insertTitle(TQPixmap icon, String text, int id, int index);
|
|
public native int insertTitle(TQPixmap icon, String text, int id);
|
|
public native int insertTitle(TQPixmap icon, String text);
|
|
/**
|
|
Changes the title of the item at the specified id. If a icon was
|
|
previously set it is cleared.
|
|
@short Changes the title of the item at the specified id.
|
|
*/
|
|
public native void changeTitle(int id, String text);
|
|
/**
|
|
Changes the title and icon of the title item at the specified id.
|
|
@short Changes the title and icon of the title item at the specified id.
|
|
*/
|
|
public native void changeTitle(int id, TQPixmap icon, String text);
|
|
/**
|
|
Returns the title of the title item at the specified id. The default
|
|
id of -1 is for backwards compatibility only, you should always specify
|
|
the id.
|
|
@short Returns the title of the title item at the specified id.
|
|
*/
|
|
public native String title(int id);
|
|
public native String title();
|
|
/**
|
|
Returns the icon of the title item at the specified id.
|
|
@short Returns the icon of the title item at the specified id.
|
|
*/
|
|
public native TQPixmap titlePixmap(int id);
|
|
/**
|
|
Enables keyboard navigation by searching for the entered key sequence.
|
|
Also underlines the currently selected item, providing feedback on the search.
|
|
Defaults to off.
|
|
WARNING: calls to text() of currently keyboard-selected items will
|
|
contain additional ampersand characters.
|
|
WARNING: though pre-existing keyboard shortcuts will not interfere with the
|
|
operation of this feature, they may be confusing to the user as the existing
|
|
shortcuts will not work.
|
|
@short Enables keyboard navigation by searching for the entered key sequence.
|
|
*/
|
|
public native void setKeyboardShortcutsEnabled(boolean enable);
|
|
/**
|
|
Enables execution of the menu item once it is uniquely specified.
|
|
Defaults to off.
|
|
@short Enables execution of the menu item once it is uniquely specified.
|
|
*/
|
|
public native void setKeyboardShortcutsExecute(boolean enable);
|
|
/**
|
|
Returns the context menu associated with this menu
|
|
@short Returns the context menu associated with this menu
|
|
*/
|
|
public native TQPopupMenu contextMenu();
|
|
/**
|
|
Hides the context menu if shown
|
|
@short Hides the context menu if shown
|
|
*/
|
|
public native void hideContextMenu();
|
|
/**
|
|
Reimplemented for internal purposes
|
|
@short Reimplemented for internal purposes
|
|
*/
|
|
public native void activateItemAt(int index);
|
|
/**
|
|
Return the state of the mouse button and keyboard modifiers
|
|
when the last menuitem was activated.
|
|
@short Return the state of the mouse button and keyboard modifiers when the last menuitem was activated.
|
|
*/
|
|
public native int state();
|
|
/**
|
|
Returns the KPopupMenu associated with the current context menu
|
|
@short Returns the KPopupMenu associated with the current context menu
|
|
*/
|
|
public static native KPopupMenu contextMenuFocus();
|
|
/**
|
|
returns the ID of the menuitem associated with the current context menu
|
|
@short returns the ID of the menuitem associated with the current context menu
|
|
*/
|
|
public static native int contextMenuFocusItem();
|
|
protected native void closeEvent(TQCloseEvent arg1);
|
|
protected native void keyPressEvent(TQKeyEvent e);
|
|
protected native void mouseReleaseEvent(TQMouseEvent e);
|
|
protected native void mousePressEvent(TQMouseEvent e);
|
|
protected native boolean focusNextPrevChild(boolean next);
|
|
protected native void contextMenuEvent(TQContextMenuEvent e);
|
|
protected native void hideEvent(TQHideEvent arg1);
|
|
protected native String underlineText(String text, int length);
|
|
protected native void resetKeyboardVars(boolean noMatches);
|
|
protected native void resetKeyboardVars();
|
|
protected native void itemHighlighted(int whichItem);
|
|
protected native void showCtxMenu(TQPoint pos);
|
|
protected native void ctxMenuHiding();
|
|
protected native void ctxMenuHideShowingMenu();
|
|
/** Deletes the wrapped C++ instance */
|
|
protected native void finalize() throws InternalError;
|
|
/** Delete the wrapped C++ instance ahead of finalize() */
|
|
public native void dispose();
|
|
/** Has the wrapped C++ instance been deleted? */
|
|
public native boolean isDisposed();
|
|
}
|