Interface
GtkActionable
since: 3.4
Description [src]
interface Gtk.Actionable : Gtk.Widget
This interface provides a convenient way of associating widgets with
actions on a GtkApplicationWindow
or GtkApplication
.
It primarily consists of two properties: GtkActionable:action-name
and GtkActionable:action-target
. There are also some convenience APIs
for setting these properties.
The action will be looked up in action groups that are found among
the widgets ancestors. Most commonly, these will be the actions with
the “win.” or “app.” prefix that are associated with the GtkApplicationWindow
or GtkApplication
, but other action groups that are added with
gtk_widget_insert_action_group()
will be consulted as well.
Available since: 3.4
Prerequisite
In order to implement Actionable, your type must inherit fromGtkWidget
.
Implementations
- GtkButton
- GtkCheckButton
- GtkCheckMenuItem
- GtkColorButton
- GtkFontButton
- GtkImageMenuItem
- GtkLinkButton
- GtkListBoxRow
- GtkLockButton
- GtkMenuButton
- GtkMenuItem
- GtkMenuToolButton
- GtkModelButton
- GtkRadioButton
- GtkRadioMenuItem
- GtkRadioToolButton
- GtkScaleButton
- GtkSeparatorMenuItem
- GtkSwitch
- GtkTearoffMenuItem
- GtkToggleButton
- GtkToggleToolButton
- GtkToolButton
- GtkVolumeButton
Instance methods
gtk_actionable_set_action_name
Specifies the name of the action with which this widget should be
associated. If action_name
is NULL
then the widget will be
unassociated from any previous action.
since: 3.4
gtk_actionable_set_detailed_action_name
Sets the action-name and associated string target value of an actionable widget.
since: 3.4
Interface structure
struct GtkActionableInterface {
const gchar* (* get_action_name) (
GtkActionable* actionable
);
void (* set_action_name) (
GtkActionable* actionable,
const gchar* action_name
);
GVariant* (* get_action_target_value) (
GtkActionable* actionable
);
void (* set_action_target_value) (
GtkActionable* actionable,
GVariant* target_value
);
}
The interface vtable for GtkActionable
.
Interface members
get_action_name |
|
Virtual function for gtk_actionable_get_action_name(). |
|
set_action_name |
|
Virtual function for gtk_actionable_set_action_name(). |
|
get_action_target_value |
|
Virtual function for gtk_actionable_get_action_target_value(). |
|
set_action_target_value |
|
Virtual function for gtk_actionable_set_action_target_value(). |
Virtual methods
Gtk.Actionable.set_action_name
Specifies the name of the action with which this widget should be
associated. If action_name
is NULL
then the widget will be
unassociated from any previous action.
since: 3.4