X11 Work Bench Toolkit  1.0
menu.h File Reference

Definition file for menus. More...

Go to the source code of this file.

Data Structures

struct  __WBMenuItem__
 structure for managing menu items More...
 
struct  __WBMenu
 structure for managing menu items More...
 

Macros

#define WBMENU_TAG   (*((const unsigned int *)"WBMM"))
 
#define WBMENUITEM_TAG   (*((const unsigned int *)"WBMI"))
 
#define WBMENU_RESERVE_DEFAULT   (256 * sizeof(void *))
 
#define WBMENU_POPUP_HIGH_BIT   0x80000000
 
#define WBMENU_DYNAMIC_HIGH_BIT   0x40000000
 
#define WBMENU_POPUP_MASK   0x3fffffff
 
#define WBMENU_SEPARATOR   -1
 

Typedefs

typedef struct __WBMenuItem__ WBMenuItem
 structure for managing menu items More...
 
typedef struct __WBMenu WBMenu
 structure for managing menu items More...
 

Functions

WBMenuMBCreateMenu (int iID, int iPopup, const char *pszResource, int iReserveSpace)
 Create a WBMenu from a text menu resource. More...
 
void MBDestroyMenu (WBMenu *pMenu)
 Destroy a WBMenu created by MBCreateMenu(), freeing up its resources. More...
 
WBMenuMBCopyMenu (const WBMenu *pMenu, int iReserveSpace)
 Create a copy of a WBMenu from an existing WBMenu. More...
 
int MBIsMenuValid (const WBMenu *pMenu)
 Check whether a 'WBMenu' pointer is valid. More...
 
WBMenuItemMBCreateMenuItem (const char **ppszResource)
 Create a single allocated WBMenuItem structure from a text menu resource, advancing the source text pointer to the next menu item. More...
 
void MBDestroyMenuItem (WBMenuItem *pMenuItem)
 Destroy a WBMenuItem created by MBCreateMenuItem(), freeing up its resources. More...
 
int MBIsMenuItemValid (const WBMenuItem *pMenuItem)
 Check whether a 'WBMenuItem' pointer is valid. More...
 
int MBAddMenuItem (WBMenu *pMenu, const WBMenuItem *pMenuItem, int iPos)
 Add a WBMenuItem menu item to an existing WBMenu. More...
 
void MBRemoveMenuItem (WBMenu *pMenu, int iPos)
 Remove a WBMenuItem from a menu created by MBCreateMenu(), freeing up its resources. More...
 
int MBAddPopupMenu (WBMenu *pMenu, const WBMenu *pPopupMenu)
 Add a WBMenuItem menu item to an existing WBMenu. More...
 
WBMenuMBFindPopupMenu (WBMenu *pMenu, int idPopup)
 Locate a WBMenu 'popup' within a menu created by MBCreateMenu() More...
 
void MBRemovePopupMenu (WBMenu *pMenu, int idPopup)
 Remove a WBMenu 'popup' from a menu created by MBCreateMenu(), freeing up its resources. More...
 
static __inline__ int MBMenuIsPopup (WBMenu *pMenu)
 Indicate whether a 'WBMenu' refers to a popup menu. More...
 
int MBMenuProcessHotKey (WBMenu *pMenu, XKeyEvent *pEvent)
 Event handler for menu hotkeys. More...
 

Detailed Description

Definition file for menus.

This is the definition file for menu functions and structures that handle their interpretation, construction, manipulation, and destruction

Definition in file menu.h.