A menu item with a check box
A <gtk-check-menu-item>
is a menu item that maintains the state of a
boolean value in addition to a <gtk-menu-item>
's usual role in activating
application code.
A check box indicating the state of the boolean value is displayed at the left
side of the <gtk-menu-item>
. Activating the <gtk-menu-item>
toggles the value.
Derives from
<gtk-menu-item>
.This class defines the following slots:
active
- Whether the menu item is checked
inconsistent
- Whether to display an "inconsistent" state
draw-as-radio
- Whether the menu item looks like a radio menu item
This signal is emitted when the state of the check box is changed.
A signal handler can examine the
<gtk-check-menu-item>
struct to discover the new state.
<gtk-widget>
)Creates a new
<gtk-check-menu-item>
.
- ret
- a new
<gtk-check-menu-item>
.
mchars
) ⇒ (ret <gtk-widget>
)Creates a new
<gtk-check-menu-item>
with a label.
- label
- the string to use for the label.
- ret
- a new
<gtk-check-menu-item>
.
<gtk-check-menu-item>
) ⇒ (ret bool
)Returns whether the check menu item is active. See
gtk-check-menu-item-set-active
.
- check-menu-item
- a
<gtk-check-menu-item>
- ret
- ‘
#t
’ if the menu item is checked.