gtkmm: Gtk::Activatable Class Reference
Activatable widgets can be connected to a Gtk::Action and reflect the state of the action. More...

Public Member Functions | |
| virtual | ~Activatable () |
| GtkActivatable* | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkActivatable* | gobj () const |
| Provides access to the underlying C GObject. | |
| void | do_set_related_action (const Glib::RefPtr< Action >& action) |
| This is a utility function for Gtk::Activatable implementors. | |
| Glib::RefPtr< Action > | get_related_action () |
| Gets the related Gtk::Action for activatable. | |
| Glib::RefPtr< const Action > | get_related_action () const |
| Gets the related Gtk::Action for activatable. | |
| bool | get_use_action_appearance () const |
| Gets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance. | |
| void | sync_action_properties (const Glib::RefPtr< Action >& action) |
| This is called to update the activatable completely, this is called internally when the Gtk::Activatable::property_related_action() property is set or unset and by the implementing class when Gtk::Activatable::property_use_action_appearance() changes. | |
| void | set_related_action (const Glib::RefPtr< Action >& action) |
| Sets the related action on the activatable object. | |
| void | set_use_action_appearance (bool use_appearance=true) |
| Sets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance. | |
| Glib::PropertyProxy < Glib::RefPtr< Action > > | property_related_action () |
| The action this activatable will activate and receive updates from. | |
| Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Action > > | property_related_action () const |
| The action this activatable will activate and receive updates from. | |
| Glib::PropertyProxy< bool > | property_use_action_appearance () |
| Whether to use the related actions appearance properties. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_use_action_appearance () const |
| Whether to use the related actions appearance properties. | |
| virtual void | update_vfunc (const Glib::RefPtr< Action >& action, const Glib::ustring& property_name) |
| virtual void | sync_action_properties_vfunc (const Glib::RefPtr< Action >& action) |
Static Public Member Functions | |
| static void | add_interface (GType gtype_implementer) |
Protected Member Functions | |
| Activatable () | |
| You should derive from this class to use it. | |
Related Functions | |
(Note that these are not member functions.) | |
| Glib::RefPtr< Gtk::Activatable > | wrap (GtkActivatable* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Detailed Description
Activatable widgets can be connected to a Gtk::Action and reflect the state of the action.
An Activatable can also provide feedback through its action, as it is responsible for activating the related action.
Constructor & Destructor Documentation
| Gtk::Activatable::Activatable | ( | ) | [protected] |
You should derive from this class to use it.
| virtual Gtk::Activatable::~Activatable | ( | ) | [virtual] |
Member Function Documentation
| static void Gtk::Activatable::add_interface | ( | GType | gtype_implementer | ) | [static] |
| void Gtk::Activatable::do_set_related_action | ( | const Glib::RefPtr< Action >& | action | ) |
This is a utility function for Gtk::Activatable implementors.
When implementing Gtk::Activatable you must call this when handling changes of the Gtk::Activatable::property_related_action(), and you must also use this to break references in Object->dispose().
This function adds a reference to the currently set related action for you, it also makes sure the Gtk::Activatable->update() method is called when the related Gtk::Action properties change and registers to the action's proxy list.
<note>Be careful to call this before setting the local copy of the Gtk::Action property, since this function uses gtk_activatable_get_action() to retrieve the previous action</note>
- Parameters:
-
action The Gtk::Action to set.
Gets the related Gtk::Action for activatable.
- Returns:
- The related Gtk::Action if one is set.
| Glib::RefPtr<const Action> Gtk::Activatable::get_related_action | ( | ) | const |
Gets the related Gtk::Action for activatable.
- Returns:
- The related Gtk::Action if one is set.
| bool Gtk::Activatable::get_use_action_appearance | ( | ) | const |
Gets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance.
- Returns:
- Whether activatable uses its actions appearance.
| GtkActivatable* Gtk::Activatable::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::Interface.
Reimplemented in Gtk::LinkButton, Gtk::Button, Gtk::ScaleButton, Gtk::ColorButton, Gtk::FontButton, Gtk::MenuItem, Gtk::RecentChooserMenu, Gtk::TearoffMenuItem, Gtk::CheckButton, Gtk::RadioButton, Gtk::ImageMenuItem, Gtk::SeparatorToolItem, Gtk::ToolItem, Gtk::RadioToolButton, Gtk::ToggleToolButton, Gtk::VolumeButton, Gtk::RadioMenuItem, Gtk::Switch, Gtk::CheckMenuItem, Gtk::MenuToolButton, Gtk::SeparatorMenuItem, Gtk::ToggleButton, and Gtk::ToolButton.
| const GtkActivatable* Gtk::Activatable::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::Interface.
Reimplemented in Gtk::LinkButton, Gtk::Button, Gtk::ScaleButton, Gtk::ColorButton, Gtk::FontButton, Gtk::MenuItem, Gtk::RecentChooserMenu, Gtk::TearoffMenuItem, Gtk::CheckButton, Gtk::RadioButton, Gtk::ImageMenuItem, Gtk::SeparatorToolItem, Gtk::ToolItem, Gtk::RadioToolButton, Gtk::ToggleToolButton, Gtk::VolumeButton, Gtk::RadioMenuItem, Gtk::Switch, Gtk::CheckMenuItem, Gtk::MenuToolButton, Gtk::SeparatorMenuItem, Gtk::ToggleButton, and Gtk::ToolButton.
The action this activatable will activate and receive updates from.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Action> > Gtk::Activatable::property_related_action | ( | ) | const |
The action this activatable will activate and receive updates from.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Whether to use the related actions appearance properties.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly< bool > Gtk::Activatable::property_use_action_appearance | ( | ) | const |
Whether to use the related actions appearance properties.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| void Gtk::Activatable::set_related_action | ( | const Glib::RefPtr< Action >& | action | ) |
Sets the related action on the activatable object.
<note>Gtk::Activatable implementors need to handle the Gtk::Activatable::property_related_action() property and call do_set_related_action() when it changes.</note>
- Parameters:
-
action The Gtk::Action to set.
| void Gtk::Activatable::set_use_action_appearance | ( | bool | use_appearance = true | ) |
Sets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance.
<note>Gtk::Activatable implementors need to handle the Gtk::Activatable::property_use_action_appearance() property and call sync_action_properties() to update activatable if needed.</note>
- Parameters:
-
use_appearance Whether to use the actions appearance.
| void Gtk::Activatable::sync_action_properties | ( | const Glib::RefPtr< Action >& | action | ) |
This is called to update the activatable completely, this is called internally when the Gtk::Activatable::property_related_action() property is set or unset and by the implementing class when Gtk::Activatable::property_use_action_appearance() changes.
- Parameters:
-
action The related Gtk::Action or 0.
| virtual void Gtk::Activatable::sync_action_properties_vfunc | ( | const Glib::RefPtr< Action >& | action | ) | [virtual] |
| virtual void Gtk::Activatable::update_vfunc | ( | const Glib::RefPtr< Action >& | action, |
| const Glib::ustring & | property_name | ||
| ) | [virtual] |
Friends And Related Function Documentation
| Glib::RefPtr< Gtk::Activatable > wrap | ( | GtkActivatable * | object, |
| bool | take_copy = false |
||
| ) | [related] |
A Glib::wrap() method for this object.
- Parameters:
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns:
- A C++ instance that wraps this C instance.
The documentation for this class was generated from the following file:
- gtkmm/activatable.h
