.TH "KContextMenuManager" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KContextMenuManager \- Convenience class to mangage context menus.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kcmenumngr.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void \fBinsert\fP (\fBQWidget\fP *widget, \fBQPopupMenu\fP *popup)"
.br
.ti -1c
.RI "static bool \fBshowOnButtonPress\fP (void)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBI_really_like_this_class\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Convenience class to mangage context menus. 

\fBAuthor:\fP
.RS 4
Matthias Ettrich <ettrich@kde.org>
.RE
.PP
KContextMenuManager manages configurable context popup menus. Instead of reimplementing \fBQWidget::mousePressEvent()\fP or \fBQWidget::mouseReleaseEvent()\fP and/or \fBQWidget::keyPressEvent()\fP, simply create the popup menu and insert it into the context menu manager with the static function \fBinsert()\fP.
.PP
Example: 
.PP
.nf
   KContextMenuManager::insert( myWidget, myPopupMenu );

.fi
.PP
.PP
Context menus are invoked with either a special shortcut key (usually the menu key) or the right mouse button.
.PP
Menus are configurable in the [ContextMenus] group of the application's configuration file, usually in kdeglobals: 
.PP
.nf
    [ContextMenus]
    ShowOnPress=true|false

.fi
.PP
.PP
\fCShowOnPress\fP defines whether the menu shall be shown on mouse press or on mouse release.
.PP
The shortcut key to invoke the context menu is defined in the standard [Keys] section of the application configuration: 
.PP
.nf
   [Keys]
   ...
   PopupContextMenu=Menu
   ...

.fi
.PP
 The key can be configured with the standard keys module in the \fBKDE\fP control center.
.PP
If the popup menu is invoked with the keyboard shortcut, it's shown at the position of the micro focus hint of the widget ( \fBQWidget::microFocusHint()\fP ). 
.PP
Definition at line 76 of file kcmenumngr.h.
.SH "Member Function Documentation"
.PP 
.SS "void KContextMenuManager::insert (\fBQWidget\fP * widget, \fBQPopupMenu\fP * popup)\fC [static]\fP"
.PP
Makes \fCpopup\fP a context popup menu for widget \fCwidget\fP. 
.PP
Ownership of the popup menu is not transferred to the context menu manager. 
.PP
Definition at line 57 of file kcmenumngr.cpp.
.PP
References QObject::connect(), QObject::destroyed(), QPtrDict::insert(), and menus.
.PP
Referenced by KEdit::installRBPopup().
.SS "bool KContextMenuManager::showOnButtonPress (void)\fC [static]\fP"
.PP
Use this method to get information about when a popup menu should be activated. 
.PP
This can be useful if the popup menu is to be activated from a listview.
.PP
\fBReturns:\fP
.RS 4
true if the menu should be made visible on a button press or false after a button press-release sequence. 
.RE
.PP

.PP
Definition at line 49 of file kcmenumngr.cpp.
.PP
References showOnPress.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
