.\" Automatically generated by Pandoc 3.1.3 .\" .\" 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 "al_insert_menu_item" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_insert_menu_item - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include int al_insert_menu_item(ALLEGRO_MENU *parent, int pos, char const *title, uint16_t id, int flags, ALLEGRO_BITMAP *icon, ALLEGRO_MENU *submenu) \f[R] .fi .SH DESCRIPTION .PP Inserts a menu item at the spot specified. See the introductory text for a detailed explanation of how the \f[V]pos\f[R] parameter is interpreted. .PP The \f[V]parent\f[R] menu can be a popup menu or a regular menu. To underline one character in the \f[V]title\f[R], prefix it with an ampersand. .PP The \f[V]flags\f[R] can be any combination of: .TP ALLEGRO_MENU_ITEM_DISABLED The item is \[lq]grayed out\[rq] and cannot be selected. .TP ALLEGRO_MENU_ITEM_CHECKBOX The item is a check box. This flag can only be set at the time the menu is created. If a check box is clicked, it will automatically be toggled. .TP ALLEGRO_MENU_ITEM_CHECKED The item is checked. If set, ALLEGRO_MENU_ITEM_CHECKBOX will automatically be set as well. .PP The \f[V]icon\f[R] is not yet supported. .PP The \f[V]submenu\f[R] parameter indicates that this item contains a child menu. The child menu must have previously been created with \f[V]al_create_menu\f[R], and not be associated with any other menu. .PP Returns \f[V]true\f[R] on success. .SH SINCE .PP 5.1.0 .SH SEE ALSO .PP al_append_menu_item(3alleg5), al_remove_menu_item(3alleg5)