.\" Automatically generated by Pandoc 3.5 .\" .TH "al_insert_menu_item" "3" "" "Allegro reference manual" .SH NAME al_insert_menu_item \- Allegro 5 API .SH SYNOPSIS .IP .EX #include \f[B]\f[R] int al_insert_menu_item(ALLEGRO_MENU *parent, int pos, char const *title, uint16_t id, int flags, ALLEGRO_BITMAP *icon, ALLEGRO_MENU *submenu) .EE .SH DESCRIPTION Inserts a menu item at the spot specified. See the introductory text for a detailed explanation of how the \f[CR]pos\f[R] parameter is interpreted. .PP The \f[CR]parent\f[R] menu can be a popup menu or a regular menu. To underline one character in the \f[CR]title\f[R], prefix it with an ampersand. .PP The \f[CR]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[CR]icon\f[R] is not yet supported. .PP The \f[CR]submenu\f[R] parameter indicates that this item contains a child menu. The child menu must have previously been created with \f[CR]al_create_menu\f[R], and not be associated with any other menu. .PP Returns the index at which the item was inserted (which can be different than what is implied by \f[CR]pos\f[R]), or \-1 if there was an error. .SH SINCE 5.1.0 .SH SEE ALSO al_append_menu_item(3), al_remove_menu_item(3)