![]() |
![]() |
Public Types | |
typedef sigc::slot<void> | SlotActivate |
For instance, void on_activate();. | |
Public Member Functions | |
void | activate () |
Emits the "activate" signal on the specified action, if it isn't insensitive. | |
void | connect_accelerator () |
Installs the accelerator for action if action has an accel path and group. | |
void | connect_proxy (Widget& proxy) |
Connects a widget to an action object as a proxy. | |
Image* | create_icon (IconSize icon_size) |
This function is intended for use by action implementations to create icons displayed in the proxy widgets. | |
MenuItem* | create_menu_item () |
Creates a menu item widget that proxies for the given action. | |
ToolItem* | create_tool_item () |
Creates a toolbar item widget that proxies for the given action. | |
void | disconnect_accelerator () |
Undoes the effect of one call to connect_accelerator(). | |
void | disconnect_proxy (Widget& proxy) |
Disconnects a proxy widget from an action. | |
Glib::ustring | get_accel_path () const |
Returns the accel path for this action. | |
Glib::ustring | get_name () const |
Returns the name of the action. | |
Glib::SListHandle<const Widget*> | get_proxies () const |
Returns the proxy widgets for an action. | |
Glib::SListHandle<Widget*> | get_proxies () |
Returns the proxy widgets for an action. | |
bool | get_sensitive () const |
Returns whether the action itself is sensitive. | |
bool | get_visible () const |
Returns whether the action itself is visible. | |
const GtkAction* | gobj () const |
Provides access to the underlying C GObject. | |
GtkAction* | gobj () |
Provides access to the underlying C GObject. | |
GtkAction* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
bool | is_sensitive () const |
Returns whether the action is effectively sensitive. | |
bool | is_visible () const |
Returns whether the action is effectively visible. | |
Glib::PropertyProxy_ReadOnly< bool > | property_hide_if_empty () const |
When TRUE. | |
Glib::PropertyProxy<bool> | property_hide_if_empty () |
When TRUE. | |
Glib::PropertyProxy_ReadOnly< bool > | property_is_important () const |
Whether the action is considered important. | |
Glib::PropertyProxy<bool> | property_is_important () |
Whether the action is considered important. | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_label () const |
The label used for menu items and buttons that activate this action. | |
Glib::PropertyProxy<Glib::ustring> | property_label () |
The label used for menu items and buttons that activate this action. | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const |
A unique name for the action. | |
Glib::PropertyProxy_ReadOnly< bool > | property_sensitive () const |
Whether the action is enabled. | |
Glib::PropertyProxy<bool> | property_sensitive () |
Whether the action is enabled. | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_short_label () const |
A shorter label that may be used on toolbar buttons. | |
Glib::PropertyProxy<Glib::ustring> | property_short_label () |
A shorter label that may be used on toolbar buttons. | |
Glib::PropertyProxy_ReadOnly< StockID > | property_stock_id () const |
The stock icon displayed in widgets representing this action. | |
Glib::PropertyProxy<StockID> | property_stock_id () |
The stock icon displayed in widgets representing this action. | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_tooltip () const |
A tooltip for this action. | |
Glib::PropertyProxy<Glib::ustring> | property_tooltip () |
A tooltip for this action. | |
Glib::PropertyProxy_ReadOnly< bool > | property_visible () const |
Whether the action is visible. | |
Glib::PropertyProxy<bool> | property_visible () |
Whether the action is visible. | |
Glib::PropertyProxy_ReadOnly< bool > | property_visible_horizontal () const |
Whether the toolbar item is visible when the toolbar is in a horizontal orientation. | |
Glib::PropertyProxy<bool> | property_visible_horizontal () |
Whether the toolbar item is visible when the toolbar is in a horizontal orientation. | |
Glib::PropertyProxy_ReadOnly< bool > | property_visible_vertical () const |
Whether the toolbar item is visible when the toolbar is in a vertical orientation. | |
Glib::PropertyProxy<bool> | property_visible_vertical () |
Whether the toolbar item is visible when the toolbar is in a vertical orientation. | |
void | set_accel_group (const Glib::RefPtr<AccelGroup>& accel_group) |
Sets the Gtk::AccelGroup in which the accelerator for this action will be installed. | |
void | set_accel_path (const Glib::ustring& accel_path) |
Sets the accel path for this action. | |
void | set_sensitive (bool sensitive=true) |
Sets the sensitive property of the action to sensitive . | |
void | set_tooltip (const Glib::ustring& tooltip) |
void | set_visible (bool visible=true) |
Sets the visible property of the action to visible . | |
Glib::SignalProxy0<void> | signal_activate () |
The "activate" signal is emitted when the action is activated. | |
virtual | ~Action () |
Static Public Member Functions | |
static Glib::RefPtr<Action> | create (const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring()) |
static Glib::RefPtr<Action> | create (const Glib::ustring& name, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring()) |
static Glib::RefPtr<Action> | create () |
Protected Member Functions | |
Action (const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring()) | |
Action () | |
void | block_activate_from (Widget& proxy) |
Disables calls to the activate() function by signals on the given proxy widget. | |
virtual void | connect_proxy_vfunc (Widget* proxy) |
virtual Widget* | create_menu_item_vfunc () |
virtual Widget* | create_tool_item_vfunc () |
virtual void | disconnect_proxy_vfunc (Widget* proxy) |
virtual void | on_activate () |
void | unblock_activate_from (Widget& proxy) |
Re-enables calls to the activate() function by signals on the given proxy widget. | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Gtk::Action> | wrap (GtkAction* object, bool take_copy=false) |
|
For instance, void on_activate();.
|
|
|
|
|
|
|
|
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.
|
|
Disables calls to the activate() function by signals on the given proxy widget. This is used to break notification loops for things like check or radio actions. This function is intended for use by action implementations.
|
|
Installs the accelerator for action if action has an accel path and group. See set_accel_path() and 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 disconnect_accelerator() has been called as many times.
|
|
Connects a widget to an action object as a proxy. Synchronises various properties of the action with the widget (such as label text, icon, tooltip, etc), and attaches a callback so that the action gets activated when the proxy widget does. If the widget is already connected to an action, it is disconnected first.
|
|
|
|
|
|
|
|
Reimplemented in Gtk::RadioAction, and Gtk::ToggleAction. |
|
This function is intended for use by action implementations to create icons displayed in the proxy widgets.
|
|
Creates a menu item widget that proxies for the given action.
|
|
|
|
Creates a toolbar item widget that proxies for the given action.
|
|
|
|
Undoes the effect of one call to connect_accelerator().
|
|
Disconnects a proxy widget from an action. Does not destroy the widget, however.
|
|
|
|
Returns the accel path for this action.
|
|
Returns the name of the action.
|
|
Returns the proxy widgets for an action.
|
|
Returns the proxy widgets for an action.
|
|
Returns whether the action itself is sensitive. Note that this doesn't necessarily mean effective sensitivity. See is_sensitive() for that.
|
|
Returns whether the action itself is visible. Note that this doesn't necessarily mean effective visibility. See is_sensitive() for that.
|
|
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase. Reimplemented in Gtk::RadioAction, and Gtk::ToggleAction. |
|
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase. Reimplemented in Gtk::RadioAction, and Gtk::ToggleAction. |
|
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented in Gtk::RadioAction, and Gtk::ToggleAction. |
|
Returns whether the action is effectively sensitive.
|
|
Returns whether the action is effectively visible.
|
|
|
|
When TRUE. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
When TRUE. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the action is considered important. When TRUE You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the action is considered important. When TRUE You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The label used for menu items and buttons that activate this action. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The label used for menu items and buttons that activate this action. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
A unique name for the action. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the action is enabled. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the action is enabled. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
A shorter label that may be used on toolbar buttons. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
A shorter label that may be used on toolbar buttons. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The stock icon displayed in widgets representing this action. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
The stock icon displayed in widgets representing this action. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
A tooltip for this action. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
A tooltip for this action. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the action is visible. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the action is visible. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the toolbar item is visible when the toolbar is in a horizontal orientation. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the toolbar item is visible when the toolbar is in a horizontal orientation. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the toolbar item is visible when the toolbar is in a vertical orientation. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Whether the toolbar item is visible when the toolbar is in a vertical orientation. You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Sets the Gtk::AccelGroup in which the accelerator for this action will be installed.
|
|
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.
|
|
Sets the sensitive property of the action to sensitive . Note that this doesn't necessarily mean effective sensitivity. See is_sensitive() for that.
|
|
|
|
Sets the visible property of the action to visible . Note that this doesn't necessarily mean effective visibility. See is_visible() for that.
|
|
The "activate" signal is emitted when the action is activated.
|
|
Re-enables calls to the activate() function by signals on the given proxy widget. This undoes the blocking done by block_activate_from(). This function is intended for use by action implementations.
|
|
|