X11workbench Toolkit  1.0
__WBMenuItem__ Struct Reference

structure for managing menu items More...

#include <menu.h>

Data Fields

unsigned int uiTag
 a 'tag' identifying this as a WBMenuItem
 
int iMenuItemText
 offset in 'data' to null-byte terminated strings (-1 if none)
 
int iUnderscore
 offset of (first) 'underscore' within menu text (-1 if none)
 
int iTooltipText
 offset in 'data' to null-byte terminated strings (-1 if none)
 
int iHotKey
 hotkey description (-1 if none)
 
int iAction
 
int nHotKey
 hotkey character translation (0 if none)
 
int iTextWidth
 width of menu text (in pixels; assign '-1' to calculate it)
 
int iPosition
 horizontal/vertical position of menu (in pixels; assign '-1' to calculate it)
 
int nDataSize
 total size of data
 
char data [4]
 data follows
 

Detailed Description

structure for managing menu items

Definition for the structure that defines a single menu item.

typedef struct __WBMenuItem__
{
unsigned int uiTag; // a 'tag' identifying this as a WBMenuItem
// the following data members are offsets from 'data' for each component of the menu item
// '-1' generically indicates "none"
int iMenuItemText; // offset in 'data' to null-byte terminated strings (-1 if none)
int iUnderscore; // offset of (first) 'underscore' within menu text (-1 if none)
int iTooltipText; // offset in 'data' to null-byte terminated strings (-1 if none)
int iHotKey; // hotkey description (-1 if none)
// the following data members are numeric properties (not offsets)
int iAction; // high bit set for popup; -1 for separator, -2 for dynamic; otherwise, it's a message
// if high bit set, corresponding lower bits are the popup menu ID
int nHotKey; // hotkey character translation (0 if none)
int iTextWidth; // width of menu text (in pixels; assign '-1' to calculate it)
int iPosition; // horizontal/vertical position of menu (in pixels; assign '-1' to calculate it)
int nDataSize; // total size of data
char data[4]; // data follows
See also
WBMenu

Definition at line 127 of file menu.h.

Field Documentation

◆ iAction

int iAction

high bit set for popup; -1 for separator, -2 for dynamic; otherwise, it's a message if hight bit set, corresponding lower bits are the popup menu ID

Definition at line 139 of file menu.h.


The documentation for this struct was generated from the following file: