Class: Gtk::Action
- Inherits:
-
Object
- Object
- Gtk::Action
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#accel_closure ⇒ GObject::Closure
Returns the accel closure for this action.
-
#accel_group=(accel_group) ⇒ nil
Sets the Gtk::AccelGroup in which the accelerator for this action will be installed.
-
#accel_path ⇒ String
Returns the accel path for this action.
-
#accel_path=(accel_path) ⇒ nil
Sets the accel path for this action.
-
#action_group ⇒ Gtk::ActionGroup
The GtkActionGroup this GtkAction is associated with, or NULL (for internal use).
-
#action_group=(action_group) ⇒ Gtk::ActionGroup
The GtkActionGroup this GtkAction is associated with, or NULL (for internal use).
-
#activate ⇒ nil
Emits the “activate” signal on the specified action, if it isn’t insensitive.
-
#always_show_image ⇒ TrueClass
Returns whether action’s menu item proxies will always show their image, if available.
-
#always_show_image=(always_show_image) ⇒ TrueClass
If true, the action’s menu item proxies will ignore the Gtk::Settings:gtk-menu-images setting and always show their image, if available.
-
#always_show_image? ⇒ TrueClass
If true, the action’s menu item proxies will ignore the Gtk::Settings:gtk-menu-images setting and always show their image, if available.
-
#block_activate ⇒ nil
Disable activation signals from the action.
-
#connect_accelerator ⇒ nil
Installs the accelerator for action if action has an accel path and group.
-
#create_icon(icon_size) ⇒ Gtk::Widget
This function is intended for use by action implementations to create icons displayed in the proxy widgets.
-
#create_menu ⇒ Gtk::Widget
If action provides a Gtk::Menu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu.
-
#create_menu_item ⇒ Gtk::Widget
Creates a menu item widget that proxies for the given action.
-
#create_tool_item ⇒ Gtk::Widget
Creates a toolbar item widget that proxies for the given action.
-
#disconnect_accelerator ⇒ nil
Undoes the effect of one call to gtk_action_connect_accelerator().
-
#gicon ⇒ Gio::Icon
The #GIcon displayed in the Gtk::Action.
-
#gicon=(gicon) ⇒ Gio::Icon
The #GIcon displayed in the Gtk::Action.
-
#hide_if_empty=(hide_if_empty) ⇒ TrueClass
When TRUE, empty menu proxies for this action are hidden.
-
#hide_if_empty? ⇒ TrueClass
When TRUE, empty menu proxies for this action are hidden.
-
#icon_name ⇒ String
The name of the icon from the icon theme.
-
#icon_name=(icon_name) ⇒ String
The name of the icon from the icon theme.
-
#is_important ⇒ TrueClass
Checks whether action is important or not.
-
#is_important=(is_important) ⇒ TrueClass
Whether the action is considered important.
-
#is_important? ⇒ TrueClass
Whether the action is considered important.
-
#is_sensitive ⇒ TrueClass
Returns whether the action is effectively sensitive.
-
#is_visible ⇒ TrueClass
Returns whether the action is effectively visible.
-
#label ⇒ String
The label used for menu items and buttons that activate this action.
-
#label=(label) ⇒ String
The label used for menu items and buttons that activate this action.
-
#name ⇒ String
A unique name for the action.
-
#name=(name) ⇒ String
A unique name for the action.
-
#new(name, label, tooltip, stock_id) ⇒ Gtk::Action
Creates a new Gtk::Action object.
-
#proxies ⇒ GLib::SList
Returns the proxy widgets for an action.
-
#sensitive ⇒ TrueClass
Returns whether the action itself is sensitive.
-
#sensitive=(sensitive) ⇒ TrueClass
Whether the action is enabled.
-
#sensitive? ⇒ TrueClass
Whether the action is enabled.
-
#short_label ⇒ String
A shorter label that may be used on toolbar buttons.
-
#short_label=(short_label) ⇒ String
A shorter label that may be used on toolbar buttons.
-
#stock_id ⇒ String
The stock icon displayed in widgets representing this action.
-
#stock_id=(stock_id) ⇒ String
The stock icon displayed in widgets representing this action.
-
#tooltip ⇒ String
A tooltip for this action.
-
#tooltip=(tooltip) ⇒ String
A tooltip for this action.
-
#unblock_activate ⇒ nil
Reenable activation signals from the action.
-
#visible ⇒ TrueClass
Returns whether the action itself is visible.
-
#visible=(visible) ⇒ TrueClass
Whether the action is visible.
-
#visible? ⇒ TrueClass
Whether the action is visible.
-
#visible_horizontal ⇒ TrueClass
Checks whether action is visible when horizontal.
-
#visible_horizontal=(visible_horizontal) ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
-
#visible_horizontal? ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
-
#visible_overflown=(visible_overflown) ⇒ TrueClass
When true, toolitem proxies for this action are represented in the toolbar overflow menu.
-
#visible_overflown? ⇒ TrueClass
When true, toolitem proxies for this action are represented in the toolbar overflow menu.
-
#visible_vertical ⇒ TrueClass
Checks whether action is visible when horizontal.
-
#visible_vertical=(visible_vertical) ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a vertical orientation.
-
#visible_vertical? ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a vertical orientation.
Instance Method Details
#accel_closure ⇒ GObject::Closure
Returns the accel closure for this action.
#accel_group=(accel_group) ⇒ nil
Sets the Gtk::AccelGroup in which the accelerator for this action will be installed.
#accel_path ⇒ String
Returns the accel path for this action.
#accel_path=(accel_path) ⇒ nil
Sets the accel path for this action. All proxy widgets associated with the action will have this accel path, so that their accelerators are consistent.
Note that accel_path string will be stored in a #GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().
#action_group ⇒ Gtk::ActionGroup
The GtkActionGroup this GtkAction is associated with, or NULL (for internal use).
#action_group=(action_group) ⇒ Gtk::ActionGroup
The GtkActionGroup this GtkAction is associated with, or NULL (for internal use).
#activate ⇒ nil
Emits the “activate” signal on the specified action, if it isn’t insensitive. This gets called by the proxy widgets when they get activated.
It can also be used to manually activate an action.
#always_show_image ⇒ TrueClass
Returns whether action’s menu item proxies will always show their image, if available.
#always_show_image=(always_show_image) ⇒ TrueClass
If true, the action’s menu item proxies will ignore the Gtk::Settings:gtk-menu-images setting and always show their image, if available.
Use this property if the menu item would be useless or hard to use without their image.
#always_show_image? ⇒ TrueClass
If true, the action’s menu item proxies will ignore the Gtk::Settings:gtk-menu-images setting and always show their image, if available.
Use this property if the menu item would be useless or hard to use without their image.
#block_activate ⇒ nil
Disable activation signals from the action
This is needed when updating the state of your proxy Gtk::Activatable widget could result in calling gtk_action_activate(), this is a convenience function to avoid recursing in those cases (updating toggle state for instance).
#connect_accelerator ⇒ nil
Installs the accelerator for action if action has an accel path and group. See gtk_action_set_accel_path() and gtk_action_set_accel_group()
Since multiple proxies may independently trigger the installation of the accelerator, the action counts the number of times this function has been called and doesn’t remove the accelerator until gtk_action_disconnect_accelerator() has been called as many times.
#create_icon(icon_size) ⇒ Gtk::Widget
This function is intended for use by action implementations to create icons displayed in the proxy widgets.
#create_menu ⇒ Gtk::Widget
If action provides a Gtk::Menu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu.
#create_menu_item ⇒ Gtk::Widget
Creates a menu item widget that proxies for the given action.
#create_tool_item ⇒ Gtk::Widget
Creates a toolbar item widget that proxies for the given action.
#disconnect_accelerator ⇒ nil
Undoes the effect of one call to gtk_action_connect_accelerator().
#gicon ⇒ Gio::Icon
The #GIcon displayed in the Gtk::Action.
Note that the stock icon is preferred, if the Gtk::Action:stock-id property holds the id of an existing stock icon.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#gicon=(gicon) ⇒ Gio::Icon
The #GIcon displayed in the Gtk::Action.
Note that the stock icon is preferred, if the Gtk::Action:stock-id property holds the id of an existing stock icon.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#hide_if_empty=(hide_if_empty) ⇒ TrueClass
When TRUE, empty menu proxies for this action are hidden.
#hide_if_empty? ⇒ TrueClass
When TRUE, empty menu proxies for this action are hidden.
#icon_name ⇒ String
The name of the icon from the icon theme.
Note that the stock icon is preferred, if the Gtk::Action:stock-id property holds the id of an existing stock icon, and the #GIcon is preferred if the Gtk::Action:gicon property is set.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#icon_name=(icon_name) ⇒ String
The name of the icon from the icon theme.
Note that the stock icon is preferred, if the Gtk::Action:stock-id property holds the id of an existing stock icon, and the #GIcon is preferred if the Gtk::Action:gicon property is set.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#is_important ⇒ TrueClass
Checks whether action is important or not
#is_important=(is_important) ⇒ TrueClass
Whether the action is considered important. When TRUE, toolitem proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.
#is_important? ⇒ TrueClass
Whether the action is considered important. When TRUE, toolitem proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.
#is_sensitive ⇒ TrueClass
Returns whether the action is effectively sensitive. are both sensitive.
#is_visible ⇒ TrueClass
Returns whether the action is effectively visible. are both visible.
#label ⇒ String
The label used for menu items and buttons that activate this action. If the label is nil, GTK+ uses the stock label specified via the stock-id property.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#label=(label) ⇒ String
The label used for menu items and buttons that activate this action. If the label is nil, GTK+ uses the stock label specified via the stock-id property.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#name ⇒ String
A unique name for the action.
#name=(name) ⇒ String
A unique name for the action.
#new(name, label, tooltip, stock_id) ⇒ Gtk::Action
Creates a new Gtk::Action object. To add the action to a Gtk::ActionGroup and set the accelerator for the action, call gtk_action_group_add_action_with_accel(). See the [UI Definition section] for information on allowed action names.
#proxies ⇒ GLib::SList
Returns the proxy widgets for an action. See also gtk_activatable_get_related_action(). and must not be modified.
#sensitive ⇒ TrueClass
Returns whether the action itself is sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk_action_is_sensitive() for that.
#sensitive=(sensitive) ⇒ TrueClass
Whether the action is enabled.
#sensitive? ⇒ TrueClass
Whether the action is enabled.
#short_label ⇒ String
A shorter label that may be used on toolbar buttons.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#short_label=(short_label) ⇒ String
A shorter label that may be used on toolbar buttons.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#stock_id ⇒ String
The stock icon displayed in widgets representing this action.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#stock_id=(stock_id) ⇒ String
The stock icon displayed in widgets representing this action.
This is an appearance property and thus only applies if Gtk::Activatable:use-action-appearance is true.
#tooltip ⇒ String
A tooltip for this action.
#tooltip=(tooltip) ⇒ String
A tooltip for this action.
#unblock_activate ⇒ nil
Reenable activation signals from the action
#visible ⇒ TrueClass
Returns whether the action itself is visible. Note that this doesn’t necessarily mean effective visibility. See gtk_action_is_sensitive() for that.
#visible=(visible) ⇒ TrueClass
Whether the action is visible.
#visible? ⇒ TrueClass
Whether the action is visible.
#visible_horizontal ⇒ TrueClass
Checks whether action is visible when horizontal
#visible_horizontal=(visible_horizontal) ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
#visible_horizontal? ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
#visible_overflown=(visible_overflown) ⇒ TrueClass
When true, toolitem proxies for this action are represented in the toolbar overflow menu.
#visible_overflown? ⇒ TrueClass
When true, toolitem proxies for this action are represented in the toolbar overflow menu.
#visible_vertical ⇒ TrueClass
Checks whether action is visible when horizontal
#visible_vertical=(visible_vertical) ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a vertical orientation.
#visible_vertical? ⇒ TrueClass
Whether the toolbar item is visible when the toolbar is in a vertical orientation.