ActivatableT

Activatable widgets can be connected to a GtkAction and reflects the state of its action. A GtkActivatable can also provide feedback through its action, as they are responsible for activating their related actions.

Implementing GtkActivatable

When extending a class that is already GtkActivatable; it is only necessary to implement the GtkActivatable->sync_action_properties() and GtkActivatable->update() methods and chain up to the parent implementation, however when introducing a new GtkActivatable class; the "related-action" and "use-action-appearance" properties need to be handled by the implementor. Handling these properties is mostly a matter of installing the action pointer and boolean flag on your instance, and calling gtk_activatable_do_set_related_action() and gtk_activatable_sync_action_properties() at the appropriate times.

Members

Functions

doSetRelatedAction
void doSetRelatedAction(Action action)

Warning gtk_activatable_do_set_related_action is deprecated and should not be used in newly-written code. 3.10 This is a utility function for GtkActivatable implementors. When implementing GtkActivatable you must call this when handling changes of the "related-action", and you must also use this to break references in GObject->dispose(). This function adds a reference to the currently set related action for you, it also makes sure the GtkActivatable->update() method is called when the related GtkAction properties change and registers to the action's proxy list. Note Be careful to call this before setting the local copy of the GtkAction property, since this function uses gtk_activatable_get_related_action() to retrieve the previous action Since 2.16

getActivatableTStruct
GtkActivatable* getActivatableTStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getRelatedAction
Action getRelatedAction()

Warning gtk_activatable_get_related_action is deprecated and should not be used in newly-written code. 3.10 Gets the related GtkAction for activatable. Since 2.16

getUseActionAppearance
int getUseActionAppearance()

Warning gtk_activatable_get_use_action_appearance is deprecated and should not be used in newly-written code. 3.10 Gets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance. Since 2.16

setRelatedAction
void setRelatedAction(Action action)

Warning gtk_activatable_set_related_action is deprecated and should not be used in newly-written code. 3.10 Sets the related action on the activatable object. Note GtkActivatable implementors need to handle the "related-action" property and call gtk_activatable_do_set_related_action() when it changes. Since 2.16

setUseActionAppearance
void setUseActionAppearance(int useAppearance)

Warning gtk_activatable_set_use_action_appearance is deprecated and should not be used in newly-written code. 3.10 Sets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance Note GtkActivatable implementors need to handle the "use-action-appearance" property and call gtk_activatable_sync_action_properties() to update activatable if needed. Since 2.16

syncActionProperties
void syncActionProperties(Action action)

Warning gtk_activatable_sync_action_properties is deprecated and should not be used in newly-written code. 3.10 This is called to update the activatable completely, this is called internally when the "related-action" property is set or unset and by the implementing class when "use-action-appearance" changes. Since 2.16

Variables

gtkActivatable
GtkActivatable* gtkActivatable;

the main Gtk struct

Meta