ALLEGRO_MENU_INFO(3)
ALLEGRO_MENU_INFO(3) π
okay so bestie π this page is from the Library Functions Manual, and the manual name near the top is Allegro 5 API. We're doing the menu-info structure and she's lowkey iconic.
β¨ NAME β¨
ALLEGRO_MENU_INFO β Allegro 5 API
π SYNOPSIS π
#include <allegro5/allegro_native_dialog.h>
typedef struct ALLEGRO_MENU_INFO {
the struct opens right there and the page does not give us more lines β that's the synopsis, no cap π
π DESCRIPTION π
okay so ALLEGRO_MENU_INFO is a structure that defines how to create a complete menu system. For standard menu items, the following format is used:
{ caption, id, flags, icon }
For special items, these macros are helpful:
ALLEGRO_START_OF_MENU(caption, id)ALLEGRO_MENU_SEPARATORALLEGRO_END_OF_MENU
A well-defined menu will begin with ALLEGRO_START_OF_MENU, contain one or more menu items, and end with ALLEGRO_END_OF_MENU. A menu may contain sub-menus. An example:
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);
If you prefer, you can build the menu without the structure by using al_create_menu(3) and al_insert_menu_item(3). That's the whole vibe, and it absolutely ate πΈ
π¦ SEE ALSO π¦
cute little sign-off bestie: this is the Allegro reference manual, page ALLEGRO_MENU_INFO(3), source/version Allegro reference manual. The footer doesn't give a date, so consider this your sparkly no-date moment π«Άππ
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms