EZ_CreateSimpleMenu


NAME

EZ_CreateSimpleMenu - create a menu

SYNOPSIS

#include <EZ.h> EZ_CreateSimpleMenu( char *str, ...)

ARGUMENTS

str Specifies a string which configures the menu. There are six menu item type flags. %t Makes non-formating text in this item as the menu title string. %F Gets the callback procedure and the client data to be passed to the callback from the optional arguments. This callback procedure will be invoked whenever a valid selection has been made on this menu. (callback of the menu.) %c Sets the class name of the current menu-item to be the string following this formating text and before the next '%' or '|'. %c Sets the instance name of the current menu-item to be the string following this formating text and before the next '%' or '|'. %f Gets the callback procedure and the client data to be passed to the callback for this menu-item from the optional arguments. %l Inserts a menu separator. %m Makes a submenu-item and gets the submenu from the optional arguments. %n Sets the instace name of this menu item to be the sub- string after the current formating character and before the next formating character or |. %c Sets the class name of this menu item to be the sub- string after the current formating characters and before the next formating characters or |. %u# Sets the index of the character to be underlined. %p Set the client pointer data to be attached to the menu. The client data will be retrieved from the optional arguments. %p Set the client integer data to be attached to the menu. The client data will be retrieved from the optional arguments. %x[0-9]+ Sets the return value for this item. This value overrides the default position-based return value assigned to this menu-item.

DESCRIPTION

EZ_CreateSimpleMenu creates a menu widget and returns the pointer to the menu.

EXAMPLE

void submenu1Callback(EZ_Widget *, void *); void Item2Callback(EZ_Widget *, void *); EZ_Widget *submenu1 = EZ_CreateSimpleMenu(``%F|red|green%x123%cGreenItem|blue%nBlueItem|%l|||'', submenu1Callback, NULL); EZ_Widget *menu = EZ_CreateSimpleMenu(``%T Test Menu|Item 1|Item 2%f|submenu%m|last item'' Item2Callback, NULL, submenu1);

SEE ALSO

EZ_DoPopup(3)