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