diff options
Diffstat (limited to 'kdejava/koala/org/kde/koala/KPopupMenu.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KPopupMenu.java | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KPopupMenu.java b/kdejava/koala/org/kde/koala/KPopupMenu.java new file mode 100644 index 00000000..c3fff51a --- /dev/null +++ b/kdejava/koala/org/kde/koala/KPopupMenu.java @@ -0,0 +1,165 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QHideEvent; +import org.kde.qt.QMetaObject; +import org.kde.qt.QtSupport; +import org.kde.qt.QCloseEvent; +import org.kde.qt.QPopupMenu; +import org.kde.qt.QPixmap; +import org.kde.qt.QPoint; +import org.kde.qt.QContextMenuEvent; +import org.kde.qt.QMouseEvent; +import org.kde.qt.QKeyEvent; +import org.kde.qt.QWidget; +import org.kde.qt.QPopupMenu; + +/** + + 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 QPopupMenu, 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 QPopupMenu { + protected KPopupMenu(Class dummy){super((Class) null);} + public native QMetaObject metaObject(); + public native String className(); + /** + Constructs a KPopupMenu. + @short Constructs a KPopupMenu. + */ + public KPopupMenu(QWidget parent, String name) { + super((Class) null); + newKPopupMenu(parent,name); + } + private native void newKPopupMenu(QWidget parent, String name); + public KPopupMenu(QWidget parent) { + super((Class) null); + newKPopupMenu(parent); + } + private native void newKPopupMenu(QWidget 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(QPixmap icon, String text, int id, int index); + public native int insertTitle(QPixmap icon, String text, int id); + public native int insertTitle(QPixmap 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, QPixmap 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 QPixmap 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 QPopupMenu 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(QCloseEvent arg1); + protected native void keyPressEvent(QKeyEvent e); + protected native void mouseReleaseEvent(QMouseEvent e); + protected native void mousePressEvent(QMouseEvent e); + protected native boolean focusNextPrevChild(boolean next); + protected native void contextMenuEvent(QContextMenuEvent e); + protected native void hideEvent(QHideEvent 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(QPoint 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(); +} |