Class: Gio::SimpleAction
- Inherits:
-
Object
- Object
- Gio::SimpleAction
- Defined in:
- (unknown)
Overview
A GSimple::Action is the obvious simple implementation of the #GAction interface. This is the easiest way to create an action for purposes of adding it to a GSimple::ActionGroup.
See also Gtk::Action.
Instance Method Summary collapse
-
#enabled=(enabled) ⇒ TrueClass
If action is currently enabled.
-
#enabled? ⇒ TrueClass
If action is currently enabled.
-
#name ⇒ String
The name of the action.
-
#name=(name) ⇒ String
The name of the action.
-
#new(name, parameter_type) ⇒ Gio::SimpleAction
Creates a new action.
-
#new_stateful(name, parameter_type, state) ⇒ Gio::SimpleAction
Creates a new stateful action.
-
#parameter_type ⇒ GLib::VariantType
The type of the parameter that must be given when activating the action.
-
#parameter_type=(parameter_type) ⇒ GLib::VariantType
The type of the parameter that must be given when activating the action.
-
#state ⇒ GLib::Variant
The state of the action, or nil if the action is stateless.
-
#state=(state) ⇒ GLib::Variant
The state of the action, or nil if the action is stateless.
-
#state_hint=(state_hint) ⇒ nil
Sets the state hint for the action.
-
#state_type ⇒ GLib::VariantType
The GVariant::Type of the state that the action has, or nil if the action is stateless.
-
#state_type=(state_type) ⇒ GLib::VariantType
The GVariant::Type of the state that the action has, or nil if the action is stateless.
Instance Method Details
#enabled=(enabled) ⇒ TrueClass
If action is currently enabled.
If the action is disabled then calls to g_action_activate() and g_action_change_state() have no effect.
#enabled? ⇒ TrueClass
If action is currently enabled.
If the action is disabled then calls to g_action_activate() and g_action_change_state() have no effect.
#name ⇒ String
The name of the action. This is mostly meaningful for identifying the action once it has been added to a GSimple::ActionGroup.
#name=(name) ⇒ String
The name of the action. This is mostly meaningful for identifying the action once it has been added to a GSimple::ActionGroup.
#new(name, parameter_type) ⇒ Gio::SimpleAction
Creates a new action.
The created action is stateless. See g_simple_action_new_stateful() to create an action that has state.
#new_stateful(name, parameter_type, state) ⇒ Gio::SimpleAction
Creates a new stateful action.
All future state values must have the same GVariant::Type as the initial state.
If the state #GVariant is floating, it is consumed.
#parameter_type ⇒ GLib::VariantType
The type of the parameter that must be given when activating the action.
#parameter_type=(parameter_type) ⇒ GLib::VariantType
The type of the parameter that must be given when activating the action.
#state ⇒ GLib::Variant
The state of the action, or nil if the action is stateless.
#state=(state) ⇒ GLib::Variant
The state of the action, or nil if the action is stateless.
#state_hint=(state_hint) ⇒ nil
Sets the state hint for the action.
See g_action_get_state_hint() for more information about action state hints.
#state_type ⇒ GLib::VariantType
The GVariant::Type of the state that the action has, or nil if the action is stateless.
#state_type=(state_type) ⇒ GLib::VariantType
The GVariant::Type of the state that the action has, or nil if the action is stateless.