.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .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[R] .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[R] .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[R] .fi .PP A well-defined menu will begin with \f[V]ALLEGRO_START_OF_MENU\f[R], contain one or more menu items, and end with \f[V]ALLEGRO_END_OF_MENU\f[R]. A menu may contain sub-menus. An example: .IP .nf \f[C] 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); \f[R] .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)