Context Menu Funcs

class lwsdk.ContextMenuFuncs(*args)

Bases: object

Proxy of C++ PCore::ContextMenuFuncs class

 cmenuCreate(desc, void userdata) → LWContextMenuID

Create a context menu. The popdesc structure, described below, contains your menu parameters and callbacks. The userdata is a pointer that you want your callbacks to receive.

 cmenuDeploy(LWContextMenuID menu, LWPanelID pan, int item) → int

Display the context menu, typically in response to some user action. A context menu is always displayed in association with a particular panel. item is the 0-based index of the menu item that should be selected when the menu is first displayed, and the return value is the index of the item selected by the user. Either of these can be -1 to indicate no selection.

 cmenuDestroy(LWContextMenuID menu)

Free the menu and related resources allocated by ContextMenuFuncs::cmenuCreate().

This Page