.\" Automatically generated by Pandoc 2.2.1 .\" .TH "ALLEGRO_MENU_INFO" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP ALLEGRO_MENU_INFO \- Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include\ typedef\ struct\ ALLEGRO_MENU_INFO\ { \f[] .fi .SH DESCRIPTION .PP A structure that defines how to create a complete menu system. For standard menu items, the following format is used: .IP .nf \f[C] \ \ \ {\ caption,\ id,\ flags,\ icon\ } \f[] .fi .PP For special items, these macros are helpful: .IP .nf \f[C] ALLEGRO_START_OF_MENU(caption,\ id) ALLEGRO_MENU_SEPARATOR ALLEGRO_END_OF_MENU \f[] .fi .PP A well\-defined menu will begin with \f[C]ALLEGRO_START_OF_MENU\f[], contain one or more menu items, and end with \f[C]ALLEGRO_END_OF_MENU\f[]. A menu may contain sub\-menus. An example: .IP .nf \f[C] ALLEGRO_MENU_INFO\ menu_info[]\ =\ { \ \ \ ALLEGRO_START_OF_MENU("&File",\ 1), \ \ \ \ \ \ {\ "&Open",\ 2,\ 0,\ NULL\ }, \ \ \ \ \ \ ALLEGRO_START_OF_MENU("Open\ &Recent...",\ 3), \ \ \ \ \ \ \ \ \ {\ "Recent\ 1",\ 4,\ 0,\ NULL\ }, \ \ \ \ \ \ \ \ \ {\ "Recent\ 2",\ 5,\ 0,\ NULL\ }, \ \ \ \ \ \ \ \ \ ALLEGRO_END_OF_MENU, \ \ \ \ \ \ ALLEGRO_MENU_SEPARATOR, \ \ \ \ \ \ {\ "E&xit",\ 6,\ 0,\ NULL\ }, \ \ \ \ \ \ ALLEGRO_END_OF_MENU, \ \ \ ALLEGRO_START_OF_MENU("&Help",\ 7), \ \ \ \ \ \ {"&About",\ 8,\ 0,\ NULL\ }, \ \ \ \ \ \ ALLEGRO_END_OF_MENU, \ \ \ ALLEGRO_END_OF_MENU }; ALLEGRO_MENU\ *menu\ =\ al_build_menu(menu_info); \f[] .fi .PP If you prefer, you can build the menu without the structure by using al_create_menu(3alleg5) and al_insert_menu_item(3alleg5). .SH SEE ALSO .PP al_build_menu(3alleg5)