X11 Work Bench Toolkit  1.0
Popup Menus

Popup Menu windows and their associate structures and API functions. More...

Data Structures

struct  __WBMenuPopupWindow__
 structure for managing a popup menu window More...
 

Functions

WBMenuPopupWindowMBCreateMenuPopupWindow (Window wIDBar, Window wIDOwner, WBMenu *pMenu, int iX, int iY, int iFlags)
 Create a WBMenuPopupWindow object and associated window. More...
 
int MBMenuDoModal (WBMenuPopupWindow *pMenuPopupWindow)
 display a Menu Popup window in a 'modal' loop More...
 
void MBDestroyMenuPopupWindow (WBMenuPopupWindow *pMenuPopupWindow)
 Destroy a WBMenuPopupWindow structure. More...
 
WBMenuPopupWindowMBFindMenuPopupWindow (WBMenu *pSubMenu)
 Find the first WBMenuPopupWindow that references a WBMenu. More...
 
static __inline__
WBMenuPopupWindow
MBGetMenuPopupWindowStruct (Window wID)
 Get the associated WBMenuPopupWindow structure from a Menu Popup window's window ID. More...
 

Detailed Description

Popup Menu windows and their associate structures and API functions.

Function Documentation

WBMenuPopupWindow* MBCreateMenuPopupWindow ( Window  wIDBar,
Window  wIDOwner,
WBMenu pMenu,
int  iX,
int  iY,
int  iFlags 
)

Create a WBMenuPopupWindow object and associated window.

Parameters
wIDBarThe Window ID of the associated menu bar
wIDOwnerThe Window ID of the 'owner' window. All coordinates are with respect to this window's client area
pMenuA pointer to the associated 'WBMenu'
iXThe X coordinate for the upper left corner of the menu popup with respect to the client area of wIDOwner
iYThe Y coordinate for the upper left corner of the menu popup with respect to the client area of wIDOwner
iFlagsVarious bit-flags associated with the popup menu
Returns
A pointer to an allocated WBMenuPopupWindow, or NULL on error. This function also creates the actual window.

Use this function to create a WBMenuPopupWindow structure and an associated window at the specified location with respect to the client area of 'wIDOwner'. Use of this function assumes that you will immediately call MBMenuDoModal() using the returned pointer. The call to MBMenuDoModal() will automatically free up the allocated structure and resources.

Header File: menu_popup.h

Definition at line 199 of file menu_popup.c.

void MBDestroyMenuPopupWindow ( WBMenuPopupWindow pMenuPopupWindow)

Destroy a WBMenuPopupWindow structure.

Parameters
pMenuPopupWindowA pointer to a WBMenuPopupWindow that was created by MBCreateMenuPopupWindow()
Returns
void

Use this function to destroy a WBMenuPopupWindow structure (and resources) created by MBCreateMenuPopupWindow()

Header File: menu_popup.h

Definition at line 477 of file menu_popup.c.

WBMenuPopupWindow* MBFindMenuPopupWindow ( WBMenu pSubMenu)

Find the first WBMenuPopupWindow that references a WBMenu.

Parameters
pSubMenuA pointer to a WBMenu structure that represents a 'sub menu' for a Menu Popup window
Returns
A pointer to a WBMenuPopupWindow structure, or NULL on error

Use this function to find the first WBMenuPopupWindow that references a WBMenu

Header File: menu_popup.h

Definition at line 457 of file menu_popup.c.

static __inline__ WBMenuPopupWindow* MBGetMenuPopupWindowStruct ( Window  wID)
static

Get the associated WBMenuPopupWindow structure from a Menu Popup window's window ID.

Parameters
wIDA Window ID for a Menu Popup window
Returns
A pointer to the associated WBMenuPopupWindow structure, or NULL on error

Use this function to obtain the associated WBMenuPopupWindow structure from a Menu Popup window's window ID

Header File: menu_popup.h

Definition at line 201 of file menu_popup.h.

int MBMenuDoModal ( WBMenuPopupWindow pMenuPopupWindow)

display a Menu Popup window in a 'modal' loop

Parameters
pMenuPopupWindowA pointer to a WBMenuPopupWindow that was created by MBCreateMenuPopupWindow()
Returns
zero for 'ok', non-zero on error

Use this function to display a Menu Popup window created by MBCreateMenuPopupWindow() in a modal loop. On return, the WBMenuPopupWindow pointer will no longer be valid, and its resources will have been released.

Header File: menu_popup.h

Definition at line 469 of file menu_popup.c.