RadioMenuItem

Description A radio menu item is a check menu item that belongs to a group. At each instant exactly one of the radio menu items from a group is selected. The group list does not need to be freed, as each GtkRadioMenuItem will remove itself and its list item when it is destroyed. The correct way to create a group of radio menu items is approximatively this:

Constructors

this
this(GtkRadioMenuItem* gtkRadioMenuItem)

Sets our main struct and passes it to the parent class

this
this(RadioMenuItem radioMenuItem, string label, bool mnemonic)

Creates a new GtkRadioMenuItem whose child is a simple GtkLabel. The new GtkRadioMenuItem is added to the same group as group. If mnemonic is true the label will be created using gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic for the menu item. Since 2.4

this
this(ListSG group, string label, bool mnemonic)

Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.

this
this(ListSG group)

Creates a new GtkRadioMenuItem.

this
this(RadioMenuItem group)

Creates a new GtkRadioMenuItem adding it to the same group as group. Since 2.4

Members

Functions

addOnGroupChanged
void addOnGroupChanged(void delegate(RadioMenuItem) dlg, ConnectFlags connectFlags)

See Also GtkMenuItem because a radio menu item is a menu item. GtkCheckMenuItem to know how to handle the check.

getGroup
ListSG getGroup()

Returns the group to which the radio menu item belongs, as a GList of GtkRadioMenuItem. The list belongs to GTK+ and should not be freed. Returns the group to which the radio menu item belongs, as a GList of GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.

getRadioMenuItemStruct
GtkRadioMenuItem* getRadioMenuItemStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setGroup
void setGroup(ListSG group)

Sets the group of a radio menu item, or changes it.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

callBackGroupChanged
void callBackGroupChanged(GtkRadioMenuItem* radiomenuitemStruct, RadioMenuItem _radioMenuItem)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

connectedSignals
int[string] connectedSignals;
gtkRadioMenuItem
GtkRadioMenuItem* gtkRadioMenuItem;

the main Gtk struct

onGroupChangedListeners
void delegate(RadioMenuItem)[] onGroupChangedListeners;
Undocumented in source.

Inherited Members

From CheckMenuItem

gtkCheckMenuItem
GtkCheckMenuItem* gtkCheckMenuItem;

the main Gtk struct

getCheckMenuItemStruct
GtkCheckMenuItem* getCheckMenuItemStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
connectedSignals
int[string] connectedSignals;
onToggledListeners
void delegate(CheckMenuItem)[] onToggledListeners;
Undocumented in source.
addOnToggled
void addOnToggled(void delegate(CheckMenuItem) dlg, ConnectFlags connectFlags)

This signal is emitted when the state of the check box is changed. A signal handler can examine the active field of the GtkCheckMenuItem struct to discover the new state.

callBackToggled
void callBackToggled(GtkCheckMenuItem* checkmenuitemStruct, CheckMenuItem _checkMenuItem)
Undocumented in source. Be warned that the author may not have intended to support it.
getActive
int getActive()

Returns whether the check menu item is active. See gtk_check_menu_item_set_active().

setActive
void setActive(int isActive)

Sets the active state of the menu item's check box.

setShowToggle
void setShowToggle(int always)

Warning gtk_check_menu_item_set_show_toggle is deprecated and should not be used in newly-written code. 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.

toggled
void toggled()

Emits the GtkCheckMenuItem::toggled signal.

getInconsistent
int getInconsistent()

Retrieves the value set by gtk_check_menu_item_set_inconsistent().

setInconsistent
void setInconsistent(int 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.

setDrawAsRadio
void setDrawAsRadio(int drawAsRadio)

Sets whether check_menu_item is drawn like a GtkRadioMenuItem Since 2.4

getDrawAsRadio
int getDrawAsRadio()

Returns whether check_menu_item looks like a GtkRadioMenuItem Since 2.4

Meta