You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.5 KiB
Java
70 lines
2.5 KiB
Java
//Auto-generated by kalyptus. DO NOT EDIT.
|
|
package org.kde.koala;
|
|
|
|
import org.kde.qt.Qt;
|
|
import org.kde.qt.TQMetaObject;
|
|
import org.kde.qt.QtSupport;
|
|
import org.kde.qt.TQPopupMenu;
|
|
import org.kde.qt.TQWidget;
|
|
import org.kde.qt.TQObject;
|
|
|
|
/**
|
|
|
|
KContextMenuManager manages configurable context popup menus. Instead
|
|
of reimplementing TQWidget.mousePressEvent() or
|
|
TQWidget.mouseReleaseEvent() and/or TQWidget.keyPressEvent(), simply
|
|
create the popup menu and insert it into the context menu manager with
|
|
the static function insert().
|
|
Example:
|
|
<pre>
|
|
KContextMenuManager.insert( myWidget, myPopupMenu );
|
|
</pre>
|
|
Context menus are invoked with either a special shortcut key (usually
|
|
the menu key) or the right mouse button.
|
|
Menus are configurable in the [ContextMenus] group of the application's
|
|
configuration file, usually in kdeglobals:
|
|
<pre>
|
|
[ContextMenus]
|
|
ShowOnPress=true|false
|
|
</pre>
|
|
<code>ShowOnPress</code> defines whether the menu shall be shown on mouse
|
|
press or on mouse release.
|
|
The shortcut key to invoke the context menu is defined in the standard
|
|
[Keys] section of the application configuration:
|
|
<pre>
|
|
[Keys]
|
|
...
|
|
PopupContextMenu=Menu
|
|
...
|
|
</pre>
|
|
The key can be configured with the standard keys module in the KDE control center.
|
|
If the popup menu is invoked with the keyboard shortcut, it's shown at
|
|
the position of the micro focus hint of the widget ( TQWidget.microFocusHint() ).
|
|
@author Matthias Ettrich <ettrich@kde.org>
|
|
|
|
@short Convenience class to mangage context menus.
|
|
|
|
*/
|
|
public class KContextMenuManager extends TQObject {
|
|
protected KContextMenuManager(Class dummy){super((Class) null);}
|
|
public native TQMetaObject metaObject();
|
|
public native String className();
|
|
/**
|
|
Makes <code>popup</code> a context popup menu for widget <code>widget.</code>
|
|
Ownership of the popup menu is not transferred to the context
|
|
menu manager.
|
|
@short Makes <code>popup</code> a context popup menu for widget <code>widget.</code>
|
|
*/
|
|
public static native void insert(TQWidget widget, TQPopupMenu popup);
|
|
/**
|
|
Use this method to get information about when a popup menu
|
|
should be activated. This can be useful if the popup menu is
|
|
to be activated from a listview.
|
|
@return true if the menu should be made visible on a button press
|
|
or false after a button press-release sequence.
|
|
|
|
@short Use this method to get information about when a popup menu should be activated.
|
|
*/
|
|
public static native boolean showOnButtonPress();
|
|
}
|