ActivatableIF

Description 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)

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_action() to retrieve the previous action Since 2.16

getActivatableTStruct
GtkActivatable* getActivatableTStruct()
Undocumented in source.
getRelatedAction
Action getRelatedAction()

Gets the related GtkAction for activatable. Since 2.16

getStruct
void* getStruct()

the main Gtk struct as a void*

getUseActionAppearance
int getUseActionAppearance()

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)

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)

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)

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

Meta