.\" Automatically generated by Pandoc 1.17.2 .\" .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[] .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[] parameter is interpreted. .PP The \f[C]parent\f[] menu can be a popup menu or a regular menu. To underline one character in the \f[C]title\f[], prefix it with an ampersand. .PP The \f[C]flags\f[] can be any combination of: .TP .B ALLEGRO_MENU_ITEM_DISABLED The item is "grayed out" and cannot be selected. .RS .RE .TP .B 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. .RS .RE .TP .B ALLEGRO_MENU_ITEM_CHECKED The item is checked. If set, ALLEGRO_MENU_ITEM_CHECKBOX will automatically be set as well. .RS .RE .PP The \f[C]icon\f[] is not yet supported. .PP The \f[C]submenu\f[] parameter indicates that this item contains a child menu. The child menu must have previously been created with \f[C]al_create_menu\f[], and not be associated with any other menu. .PP Returns \f[C]true\f[] on success. .SH SINCE .PP 5.1.0 .SH SEE ALSO .PP al_append_menu_item(3alleg5), al_remove_menu_item(3alleg5)