File: al_insert_menu_item.3

package info (click to toggle)
allegro5 2%3A5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,032 kB
  • sloc: ansic: 120,340; cpp: 15,707; objc: 4,805; python: 2,915; java: 2,195; sh: 887; xml: 86; makefile: 49; perl: 37; pascal: 24
file content (58 lines) | stat: -rw-r--r-- 1,502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.TH "al_insert_menu_item" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_insert_menu_item \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro_native_dialog.h>

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(3), al_remove_menu_item(3)