Class: Gtk::ActionGroup
- Inherits:
-
Object
- Object
- Gtk::ActionGroup
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#accel_group ⇒ Gtk::AccelGroup
The accelerator group the actions of this group should use.
-
#accel_group=(accel_group) ⇒ Gtk::AccelGroup
The accelerator group the actions of this group should use.
-
#add_action(action) ⇒ nil
Adds an action object to the action group.
-
#add_action_with_accel(action, accelerator) ⇒ nil
Adds an action object to the action group and sets up the accelerator.
-
#add_actions(entries, n_entries, user_data) ⇒ nil
This is a convenience function to create a number of actions and add them to the action group.
-
#add_actions_full(entries, n_entries, user_data, destroy) ⇒ nil
This variant of gtk_action_group_add_actions() adds a GDestroy::Notify callback for user_data.
-
#add_radio_actions(entries, n_entries, value, on_change, user_data) ⇒ nil
This is a convenience routine to create a group of radio actions and add them to the action group.
-
#add_radio_actions_full(entries, n_entries, value, on_change, user_data, destroy) ⇒ nil
This variant of gtk_action_group_add_radio_actions() adds a GDestroy::Notify callback for user_data.
-
#add_toggle_actions(entries, n_entries, user_data) ⇒ nil
This is a convenience function to create a number of toggle actions and add them to the action group.
-
#add_toggle_actions_full(entries, n_entries, user_data, destroy) ⇒ nil
This variant of gtk_action_group_add_toggle_actions() adds a GDestroy::Notify callback for user_data.
-
#get_action(action_name) ⇒ Gtk::Action
Looks up an action in the action group by name.
-
#list_actions ⇒ GLib::List
Lists the actions in the action group.
-
#name ⇒ String
A name for the action.
-
#name=(name) ⇒ String
A name for the action.
-
#new(name) ⇒ Gtk::ActionGroup
Creates a new Gtk::ActionGroup object.
-
#remove_action(action) ⇒ nil
Removes an action object from the action group.
-
#sensitive ⇒ TrueClass
Returns true if the group is sensitive.
-
#sensitive=(sensitive) ⇒ TrueClass
Whether the action group is enabled.
-
#sensitive? ⇒ TrueClass
Whether the action group is enabled.
-
#set_translate_func(func, data, notify) ⇒ nil
Sets a function to be used for translating the label and tooltip of Gtk::ActionEntrys added by gtk_action_group_add_actions().
-
#translate_string(string) ⇒ String
Translates a string using the function set with gtk_action_group_set_translate_func().
-
#translation_domain=(domain) ⇒ nil
Sets the translation domain and uses g_dgettext() for translating the label and tooltip of Gtk::ActionEntrys added by gtk_action_group_add_actions().
-
#visible ⇒ TrueClass
Returns true if the group is visible.
-
#visible=(visible) ⇒ TrueClass
Whether the action group is visible.
-
#visible? ⇒ TrueClass
Whether the action group is visible.
Instance Method Details
#accel_group ⇒ Gtk::AccelGroup
The accelerator group the actions of this group should use.
#accel_group=(accel_group) ⇒ Gtk::AccelGroup
The accelerator group the actions of this group should use.
#add_action(action) ⇒ nil
Adds an action object to the action group. Note that this function does not set up the accel path of the action, which can lead to problems if a user tries to modify the accelerator of a menuitem associated with the action. Therefore you must either set the accel path yourself with gtk_action_set_accel_path(), or use ‘gtk_action_group_add_action_with_accel (…, NULL)`.
#add_action_with_accel(action, accelerator) ⇒ nil
Adds an action object to the action group and sets up the accelerator.
If accelerator is nil, attempts to use the accelerator associated with the stock_id of the action.
Accel paths are set to ‘<Actions>/group-name/action-name`.
#add_actions(entries, n_entries, user_data) ⇒ nil
This is a convenience function to create a number of actions and add them to the action group.
The “activate” signals of the actions are connected to the callbacks and their accel paths are set to ‘<Actions>/group-name/action-name`.
#add_actions_full(entries, n_entries, user_data, destroy) ⇒ nil
This variant of gtk_action_group_add_actions() adds a GDestroy::Notify callback for user_data.
#add_radio_actions(entries, n_entries, value, on_change, user_data) ⇒ nil
This is a convenience routine to create a group of radio actions and add them to the action group.
The “changed” signal of the first radio action is connected to the on_change callback and the accel paths of the actions are set to ‘<Actions>/group-name/action-name`.
#add_radio_actions_full(entries, n_entries, value, on_change, user_data, destroy) ⇒ nil
This variant of gtk_action_group_add_radio_actions() adds a GDestroy::Notify callback for user_data.
#add_toggle_actions(entries, n_entries, user_data) ⇒ nil
This is a convenience function to create a number of toggle actions and add them to the action group.
The “activate” signals of the actions are connected to the callbacks and their accel paths are set to ‘<Actions>/group-name/action-name`.
#add_toggle_actions_full(entries, n_entries, user_data, destroy) ⇒ nil
This variant of gtk_action_group_add_toggle_actions() adds a GDestroy::Notify callback for user_data.
#get_action(action_name) ⇒ Gtk::Action
Looks up an action in the action group by name.
#list_actions ⇒ GLib::List
Lists the actions in the action group.
#name ⇒ String
A name for the action.
#name=(name) ⇒ String
A name for the action.
#new(name) ⇒ Gtk::ActionGroup
Creates a new Gtk::ActionGroup object. The name of the action group is used when associating [keybindings] with the actions.
#remove_action(action) ⇒ nil
Removes an action object from the action group.
#sensitive ⇒ TrueClass
Returns true if the group is sensitive. The constituent actions can only be logically sensitive (see gtk_action_is_sensitive()) if they are sensitive (see gtk_action_get_sensitive()) and their group is sensitive.
#sensitive=(sensitive) ⇒ TrueClass
Whether the action group is enabled.
#sensitive? ⇒ TrueClass
Whether the action group is enabled.
#set_translate_func(func, data, notify) ⇒ nil
Sets a function to be used for translating the label and tooltip of Gtk::ActionEntrys added by gtk_action_group_add_actions().
If you’re using gettext(), it is enough to set the translation domain with gtk_action_group_set_translation_domain().
#translate_string(string) ⇒ String
Translates a string using the function set with gtk_action_group_set_translate_func(). This is mainly intended for language bindings.
#translation_domain=(domain) ⇒ nil
Sets the translation domain and uses g_dgettext() for translating the label and tooltip of Gtk::ActionEntrys added by gtk_action_group_add_actions().
If you’re not using gettext() for localization, see gtk_action_group_set_translate_func(). calls, or nil to use the domain set with textdomain()
#visible ⇒ TrueClass
Returns true if the group is visible. The constituent actions can only be logically visible (see gtk_action_is_visible()) if they are visible (see gtk_action_get_visible()) and their group is visible.
#visible=(visible) ⇒ TrueClass
Whether the action group is visible.
#visible? ⇒ TrueClass
Whether the action group is visible.