Class

GtkToggleAction

Description [src]

class Gtk.ToggleAction : Gtk.Action {
  parent: GtkAction
}

A GtkToggleAction corresponds roughly to a GtkCheckMenuItem. It has an “active” state specifying whether the action has been checked or not.

Hierarchy

hierarchy this GtkToggleAction implements_0 GtkBuildable this--implements_0 ancestor_0 GtkAction ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Ancestors

Descendants

Implements

Constructors

gtk_toggle_action_new

Creates a new GtkToggleAction object. To add the action to a GtkActionGroup and set the accelerator for the action, call gtk_action_group_add_action_with_accel().

deprecated: 3.10 since: 2.4

Instance methods

gtk_toggle_action_get_active

Returns the checked state of the toggle action.

deprecated: 3.10 since: 2.4

gtk_toggle_action_get_draw_as_radio

Returns whether the action should have proxies like a radio action.

deprecated: 3.10 since: 2.4

gtk_toggle_action_set_active

Sets the checked state on the toggle action.

deprecated: 3.10 since: 2.4

gtk_toggle_action_set_draw_as_radio

Sets whether the action should have proxies like a radio action.

deprecated: 3.10 since: 2.4

gtk_toggle_action_toggled

Emits the “toggled” signal on the toggle action.

deprecated: 3.10 since: 2.4

Methods inherited from GtkAction (41)

Please see GtkAction for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from GtkBuildable (10)
gtk_buildable_add_child

Adds a child to buildable. type is an optional string describing how the child should be added.

since: 2.12

gtk_buildable_construct_child

Constructs a child of buildable with the name name.

since: 2.12

gtk_buildable_custom_finished

This is similar to gtk_buildable_parser_finished() but is called once for each custom tag handled by the buildable.

since: 2.12

gtk_buildable_custom_tag_end

This is called at the end of each custom element handled by the buildable.

since: 2.12

gtk_buildable_custom_tag_start

This is called for each unknown element under <child>.

since: 2.12

gtk_buildable_get_internal_child

Get the internal child called childname of the buildable object.

since: 2.12

gtk_buildable_get_name

Gets the name of the buildable object.

since: 2.12

gtk_buildable_parser_finished

Called when the builder finishes the parsing of a [GtkBuilder UI definition][BUILDER-UI]. Note that this will be called once for each time gtk_builder_add_from_file() or gtk_builder_add_from_string() is called on a builder.

since: 2.12

gtk_buildable_set_buildable_property

Sets the property name name to value on the buildable object.

since: 2.12

gtk_buildable_set_name

Sets the name of the buildable object.

since: 2.12

Properties

Gtk.ToggleAction:active

Whether the toggle action should be active.

deprecated: 3.10 since: 2.10

Gtk.ToggleAction:draw-as-radio

Whether the proxies for this action look like radio action proxies.

deprecated: 3.10 

Properties inherited from GtkAction (16)
Gtk.Action:action-group

The GtkActionGroup this GtkAction is associated with, or NULL (for internal use).

deprecated: 3.10 

Gtk.Action:always-show-image

If TRUE, the action’s menu item proxies will ignore the GtkSettings:gtk-menu-images setting and always show their image, if available.

deprecated: 3.10 since: 2.20

Gtk.Action:gicon

The GIcon displayed in the GtkAction.

deprecated: 3.10 since: 2.16

Gtk.Action:hide-if-empty

When TRUE, empty menu proxies for this action are hidden.

deprecated: 3.10 

Gtk.Action:icon-name

The name of the icon from the icon theme.

deprecated: 3.10 since: 2.10

Gtk.Action:is-important

Whether the action is considered important. When TRUE, toolitem proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.

deprecated: 3.10 

Gtk.Action:label

The label used for menu items and buttons that activate this action. If the label is NULL, GTK+ uses the stock label specified via the stock-id property.

deprecated: 3.10 

Gtk.Action:name

A unique name for the action.

deprecated: 3.10 

Gtk.Action:sensitive

Whether the action is enabled.

deprecated: 3.10 

Gtk.Action:short-label

A shorter label that may be used on toolbar buttons.

deprecated: 3.10 

Gtk.Action:stock-id

The stock icon displayed in widgets representing this action.

deprecated: 3.10 

Gtk.Action:tooltip

A tooltip for this action.

deprecated: 3.10 

Gtk.Action:visible

Whether the action is visible.

deprecated: 3.10 

Gtk.Action:visible-horizontal

Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

deprecated: 3.10 

Gtk.Action:visible-overflown

When TRUE, toolitem proxies for this action are represented in the toolbar overflow menu.

deprecated: 3.10 since: 2.6

Gtk.Action:visible-vertical

Whether the toolbar item is visible when the toolbar is in a vertical orientation.

deprecated: 3.10 

Signals

Gtk.ToggleAction::toggled

Should be connected if you wish to perform an action whenever the GtkToggleAction state is changed.

deprecated: 3.10 

Signals inherited from GtkAction (1)
GtkAction::activate

The “activate” signal is emitted when the action is activated.

deprecated: 3.10 since: 2.4

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct GtkToggleActionClass {
  GtkActionClass parent_class;
  void (* toggled) (
    GtkToggleAction* action
  );
  void (* _gtk_reserved1) (
void
  );
  void (* _gtk_reserved2) (
void
  );
  void (* _gtk_reserved3) (
void
  );
  void (* _gtk_reserved4) (
void
  );
  
}
No description available.
Class members
parent_class: GtkActionClass
No description available.
toggled: void (* toggled) ( GtkToggleAction* action )
No description available.
_gtk_reserved1: void (* _gtk_reserved1) ( void )
No description available.
_gtk_reserved2: void (* _gtk_reserved2) ( void )
No description available.
_gtk_reserved3: void (* _gtk_reserved3) ( void )
No description available.
_gtk_reserved4: void (* _gtk_reserved4) ( void )
No description available.

Virtual methods

Gtk.ToggleActionClass.toggled

Emits the “toggled” signal on the toggle action.

deprecated: 3.10 since: 2.4