.\" Automatically generated by Pandoc 2.9.2.1 .\" .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[C]pos\f[R] parameter is interpreted. .PP The \f[C]parent\f[R] menu can be a popup menu or a regular menu. To underline one character in the \f[C]title\f[R], prefix it with an ampersand. .PP The \f[C]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[C]icon\f[R] is not yet supported. .PP The \f[C]submenu\f[R] parameter indicates that this item contains a child menu. The child menu must have previously been created with \f[C]al_create_menu\f[R], and not be associated with any other menu. .PP Returns \f[C]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)