Synopsis#include <gtk/gtk.h> GtkCheckMenuItem; GtkWidget* gtk_check_menu_item_new (void); GtkWidget* gtk_check_menu_item_new_with_label (const gchar *label); GtkWidget* gtk_check_menu_item_new_with_mnemonic (const gchar *label); #define gtk_check_menu_item_set_state gboolean gtk_check_menu_item_get_active (GtkCheckMenuItem *check_menu_item); void gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item, gboolean is_active); void gtk_check_menu_item_set_show_toggle (GtkCheckMenuItem *menu_item, gboolean always); void gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item); gboolean gtk_check_menu_item_get_inconsistent (GtkCheckMenuItem *check_menu_item); void gtk_check_menu_item_set_inconsistent (GtkCheckMenuItem *check_menu_item, gboolean setting); void gtk_check_menu_item_set_draw_as_radio (GtkCheckMenuItem *check_menu_item, gboolean draw_as_radio); gboolean gtk_check_menu_item_get_draw_as_radio (GtkCheckMenuItem *check_menu_item); Object HierarchyGObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkItem +----GtkMenuItem +----GtkCheckMenuItem +----GtkRadioMenuItem Properties"active" gboolean : Read / Write "draw-as-radio" gboolean : Read / Write "inconsistent" gboolean : Read / Write DescriptionA GtkCheckMenuItem is a menu item that maintains the state of a boolean value in addition to a GtkMenuItem'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 GtkMenuItem. Activating the GtkMenuItem toggles the value. DetailsGtkCheckMenuItemtypedef struct _GtkCheckMenuItem GtkCheckMenuItem; The GtkCheckMenuItem struct contains the following fields. (These fields should be considered read-only. They should never be set by an application.)
gtk_check_menu_item_new ()GtkWidget* gtk_check_menu_item_new (void); Creates a new GtkCheckMenuItem.
gtk_check_menu_item_new_with_label ()GtkWidget* gtk_check_menu_item_new_with_label (const gchar *label); Creates a new GtkCheckMenuItem with a label.
gtk_check_menu_item_new_with_mnemonic ()GtkWidget* gtk_check_menu_item_new_with_mnemonic (const gchar *label);
Creates a new GtkCheckMenuItem containing a label. The label
will be created using
gtk_check_menu_item_set_state#define gtk_check_menu_item_set_state gtk_check_menu_item_set_active Warning
This macro is provided to preserve compatibility with older code.
New code should use gtk_check_menu_item_get_active ()gboolean gtk_check_menu_item_get_active (GtkCheckMenuItem *check_menu_item);
Returns whether the check menu item is active. See
gtk_check_menu_item_set_active ()void gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item, gboolean is_active); Sets the active state of the menu item's check box.
gtk_check_menu_item_set_show_toggle ()void gtk_check_menu_item_set_show_toggle (GtkCheckMenuItem *menu_item, gboolean always); Warning
Controls whether the check box is shown at all times. Normally the check box is shown only when it is active or while the menu item is selected.
gtk_check_menu_item_toggled ()void gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item); Emits the GtkCheckMenuItem::toggled signal.
gtk_check_menu_item_get_inconsistent ()gboolean gtk_check_menu_item_get_inconsistent (GtkCheckMenuItem *check_menu_item);
Retrieves the value set by
gtk_check_menu_item_set_inconsistent ()void gtk_check_menu_item_set_inconsistent (GtkCheckMenuItem *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,
gtk_check_menu_item_set_draw_as_radio ()void gtk_check_menu_item_set_draw_as_radio (GtkCheckMenuItem *check_menu_item, gboolean draw_as_radio);
Sets whether
Since 2.4 gtk_check_menu_item_get_draw_as_radio ()gboolean gtk_check_menu_item_get_draw_as_radio (GtkCheckMenuItem *check_menu_item);
Returns whether
Since 2.4 Property DetailsThe
|
|
the object which received the signal. |
|
user data set when the signal handler was connected. |