EZ
Up Prev Next Contents


3.7.3 Creating Menu Items

Menu items are created by calling EZ_CreateWidget with type EZ_WIDGET_MENU_SEPARATOR or EZ_WIDGET_MENU_NORMAL_BUTTON or EZ_WIDGET_MENU_CHECK_BUTTON or EZ_WIDGET_MENU_RADIO_BUTTON or EZ_WIDGET_MENU_SUBMENU. Alternatively, menu items can be created by the next four widget specific functions.

EZ_Widget *EZ_CreateMenuSeparator(EZ_Widget *menu)

This function inserts a menu separator into a menu.

EZ_Widget *EZ_CreateMenuNormalButton(EZ_Widget *menu, char *label,

int underline, int return_value)

This function adds a menu-normal-button item to a menu. A menu-normal-button supports the same set of configuration options as that of a normal button.

EZ_Widget *EZ_CreateMenuCheckButton(EZ_Widget *menu, char *label,

int underline, int on_value, int off_value,

int init_state, int return_value)

This function adds a menu-check-button item to a menu. a menu-check-button supports the same set of configuration options as that of a check button.

EZ_Widget *EZ_CreateMenuRadioButton(EZ_Widget *menu, char *label,

int underline, int group_id, int value, int return_value)

This function adds a menu-radio-button item to a menu. A menu-radio-button supports the same set of attributes as that of a radio button.

To add a sub-menu item to a menu, use

EZ_Widget *EZ_CreateMenuSubMenu(EZ_Widget *menu, char *label, int underline)

This function inserts a submenu item into a menu. A submenu item supports the same set of configuration options as that of a normal button.

void EZ_SetSubMenuMenu(EZ_Widget *submenu, EZ_Widget *menu)

This function attaches a submenu to a submenu item.


HTML Documentation Maintainance:Arturo Espinosa <arturo@nuclecu.unam.mx>