| Top |
| CtkWidget * | ctk_check_menu_item_new () |
| CtkWidget * | ctk_check_menu_item_new_with_label () |
| CtkWidget * | ctk_check_menu_item_new_with_mnemonic () |
| gboolean | ctk_check_menu_item_get_active () |
| void | ctk_check_menu_item_set_active () |
| void | ctk_check_menu_item_toggled () |
| gboolean | ctk_check_menu_item_get_inconsistent () |
| void | ctk_check_menu_item_set_inconsistent () |
| void | ctk_check_menu_item_set_draw_as_radio () |
| gboolean | ctk_check_menu_item_get_draw_as_radio () |
| gboolean | active | Read / Write |
| gboolean | draw-as-radio | Read / Write |
| gboolean | inconsistent | Read / Write |
GObject
╰── GInitiallyUnowned
╰── CtkWidget
╰── CtkContainer
╰── CtkBin
╰── CtkMenuItem
╰── CtkCheckMenuItem
╰── CtkRadioMenuItem
CtkCheckMenuItem implements AtkImplementorIface, CtkBuildable, CtkActivatable and CtkActionable.
A CtkCheckMenuItem is a menu item that maintains the state of a boolean value in addition to a CtkMenuItem usual role in activating application code.
A check box indicating the state of the boolean value is displayed at the left side of the CtkMenuItem. Activating the CtkMenuItem toggles the value.
CtkWidget *
ctk_check_menu_item_new (void);
Creates a new CtkCheckMenuItem.
CtkWidget *
ctk_check_menu_item_new_with_label (const gchar *label);
Creates a new CtkCheckMenuItem with a label.
CtkWidget *
ctk_check_menu_item_new_with_mnemonic (const gchar *label);
Creates a new CtkCheckMenuItem containing a label. The label
will be created using ctk_label_new_with_mnemonic(), so underscores
in label
indicate the mnemonic for the menu item.
gboolean
ctk_check_menu_item_get_active (CtkCheckMenuItem *check_menu_item);
Returns whether the check menu item is active. See
ctk_check_menu_item_set_active().
void ctk_check_menu_item_set_active (CtkCheckMenuItem *check_menu_item,gboolean is_active);
Sets the active state of the menu item’s check box.
void
ctk_check_menu_item_toggled (CtkCheckMenuItem *check_menu_item);
Emits the “toggled” signal.
gboolean
ctk_check_menu_item_get_inconsistent (CtkCheckMenuItem *check_menu_item);
Retrieves the value set by ctk_check_menu_item_set_inconsistent().
void ctk_check_menu_item_set_inconsistent (CtkCheckMenuItem *check_menu_item,gboolean setting);
If the user has selected a range of elements (such as some text or
spreadsheet cells) that are affected by a boolean setting, and the
current values in that range are inconsistent, you may want to
display the check in an “in between” state. This function turns on
“in between” display. Normally you would turn off the inconsistent
state again if the user explicitly selects a setting. This has to be
done manually, ctk_check_menu_item_set_inconsistent() only affects
visual appearance, it doesn’t affect the semantics of the widget.
void ctk_check_menu_item_set_draw_as_radio (CtkCheckMenuItem *check_menu_item,gboolean draw_as_radio);
Sets whether check_menu_item
is drawn like a CtkRadioMenuItem
Since: 2.4
gboolean
ctk_check_menu_item_get_draw_as_radio (CtkCheckMenuItem *check_menu_item);
Returns whether check_menu_item
looks like a CtkRadioMenuItem
Since: 2.4
“active” property “active” gboolean
Whether the menu item is checked.
Owner: CtkCheckMenuItem
Flags: Read / Write
Default value: FALSE
“draw-as-radio” property “draw-as-radio” gboolean
Whether the menu item looks like a radio menu item.
Owner: CtkCheckMenuItem
Flags: Read / Write
Default value: FALSE
“toggled” signalvoid user_function (CtkCheckMenuItem *checkmenuitem, gpointer user_data)
This signal is emitted when the state of the check box is changed.
A signal handler can use ctk_check_menu_item_get_active()
to discover the new state.
checkmenuitem |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First