GtkCheckMenuItem

GtkCheckMenuItem

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);
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_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);

Description

Details

GtkCheckMenuItem

typedef struct {
  GtkMenuItem menu_item;
} GtkCheckMenuItem;


gtk_check_menu_item_new ()

GtkWidget*          gtk_check_menu_item_new             (void);

Returns :


gtk_check_menu_item_new_with_label ()

GtkWidget*          gtk_check_menu_item_new_with_label  (const gchar *label);

label :

Returns :


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_label_new_with_mnemonic(), so underscores in label indicate the mnemonic for the menu item.

label :

The text of the button, with an underscore in front of the mnemonic character

Returns :

a new GtkCheckMenuItem

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().

check_menu_item :

a GtkCheckMenuItem

Returns :

TRUE if the menu item is checked.

gtk_check_menu_item_set_active ()

void                gtk_check_menu_item_set_active      (GtkCheckMenuItem *check_menu_item,
                                                         gboolean is_active);

check_menu_item :

is_active :


gtk_check_menu_item_toggled ()

void                gtk_check_menu_item_toggled         (GtkCheckMenuItem *check_menu_item);

check_menu_item :


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().

check_menu_item :

a GtkCheckMenuItem

Returns :

TRUE if inconsistent

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_inconsistent() only affects visual appearance, it doesn't affect the semantics of the widget.

check_menu_item :

a GtkCheckMenuItem

setting :

TRUE to display an "inconsistent" third state check

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 check_menu_item is drawn like a GtkRadioMenuItem

check_menu_item :

a GtkCheckMenuItem

draw_as_radio :

whether check_menu_item is drawn like a GtkRadioMenuItem

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 check_menu_item looks like a GtkRadioMenuItem

check_menu_item :

a GtkCheckMenuItem

Returns :

Whether check_menu_item looks like a GtkRadioMenuItem

Since 2.4