2003-08-24 20:47:37 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkAction
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-10-11 18:08:35 +00:00
|
|
|
An action which can be triggered by a menu or toolbar item
|
2003-08-24 20:47:37 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2003-08-31 00:27:15 +00:00
|
|
|
Actions represent operations that the user can be perform, along with
|
|
|
|
some information how it should be presented in the interface. Each action
|
|
|
|
provides methods to create icons, menu items and toolbar items representing
|
|
|
|
itself.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
As well as the callback that is called when the action gets activated, the
|
|
|
|
following also gets associated with the action:
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para>a name (not translated, for path lookup)</para></listitem>
|
|
|
|
<listitem><para>a label (translated, for display)</para></listitem>
|
|
|
|
<listitem><para>an accelerator</para></listitem>
|
|
|
|
<listitem><para>whether label indicates a stock id</para></listitem>
|
|
|
|
<listitem><para>a tooltip (optional, translated)</para></listitem>
|
|
|
|
<listitem><para>a toolbar label (optional, shorter than label)</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
The action will also have some state information:
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para>visible (shown/hidden)</para></listitem>
|
|
|
|
<listitem><para>sensitive (enabled/disabled)</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Apart from regular actions, there are <link linkend="GtkToggleAction">toggle
|
|
|
|
actions</link>, which can be toggled between two states and <link
|
|
|
|
linkend="GtkRadioAction">radio actions</link>, of which only one in a group
|
|
|
|
can be in the "active" state. Other actions can be implemented as #GtkAction
|
|
|
|
subclasses.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Each action can have one or more proxy menu item, toolbar button or
|
|
|
|
other proxy widgets. Proxies mirror the state of the action (text
|
|
|
|
label, tooltip, icon, visible, sensitive, etc), and should change when
|
|
|
|
the action's state changes. When the proxy is activated, it should
|
|
|
|
activate its action.
|
2003-08-24 20:47:37 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2003-09-30 22:48:10 +00:00
|
|
|
#GtkActionGroup, #GtkUIManager
|
2003-08-24 20:47:37 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### STRUCT GtkAction ##### -->
|
|
|
|
<para>
|
2003-08-31 00:27:15 +00:00
|
|
|
The <structname>GtkAction</structname> struct contains only private members
|
|
|
|
and should not be accessed directly.
|
2003-08-24 20:47:37 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### SIGNAL GtkAction::activate ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action: the object which received the signal.
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:action-group ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:hide-if-empty ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:is-important ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:label ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:name ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:sensitive ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:short-label ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:stock-id ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:tooltip ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:visible ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkAction:visible-horizontal ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-08-25 16:21:15 +00:00
|
|
|
<!-- ##### ARG GtkAction:visible-overflown ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### ARG GtkAction:visible-vertical ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-01-22 06:48:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@name:
|
|
|
|
@label:
|
|
|
|
@tooltip:
|
|
|
|
@stock_id:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_get_name ##### -->
|
2003-08-24 20:47:37 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2004-01-22 06:48:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_is_sensitive ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_action_get_sensitive ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2004-08-25 16:21:15 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_set_sensitive ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@sensitive:
|
|
|
|
|
|
|
|
|
2004-01-22 06:48:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_is_visible ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_action_get_visible ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2004-08-25 16:21:15 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_set_visible ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@visible:
|
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_activate ##### -->
|
2003-09-30 17:10:02 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_create_icon ##### -->
|
2003-09-30 17:10:02 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
2003-12-08 22:55:03 +00:00
|
|
|
@icon_size:
|
|
|
|
@Returns:
|
2003-09-30 17:10:02 +00:00
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_create_menu_item ##### -->
|
2003-08-24 20:47:37 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
2003-12-08 22:55:03 +00:00
|
|
|
@Returns:
|
2003-08-24 20:47:37 +00:00
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_create_tool_item ##### -->
|
2003-08-24 20:47:37 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
2003-12-08 22:55:03 +00:00
|
|
|
@Returns:
|
2003-08-24 20:47:37 +00:00
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_connect_proxy ##### -->
|
2003-08-24 20:47:37 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
2003-12-08 22:55:03 +00:00
|
|
|
@proxy:
|
2003-08-24 20:47:37 +00:00
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_disconnect_proxy ##### -->
|
2003-09-30 17:10:02 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
2003-12-08 22:55:03 +00:00
|
|
|
@proxy:
|
2003-09-30 17:10:02 +00:00
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_get_proxies ##### -->
|
2003-08-31 00:27:15 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
@action:
|
|
|
|
@Returns:
|
2003-10-24 22:16:07 +00:00
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_action_connect_accelerator ##### -->
|
2003-09-30 17:10:02 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
@action:
|
2003-10-24 22:16:07 +00:00
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_action_disconnect_accelerator ##### -->
|
2003-09-30 17:10:02 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
@action:
|
2003-09-30 17:10:02 +00:00
|
|
|
|
2003-10-24 22:16:07 +00:00
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_block_activate_from ##### -->
|
2003-09-15 22:21:26 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
@action:
|
|
|
|
@proxy:
|
2003-08-31 00:27:15 +00:00
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_unblock_activate_from ##### -->
|
2003-08-31 00:27:15 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
@action:
|
|
|
|
@proxy:
|
2003-08-31 00:27:15 +00:00
|
|
|
|
|
|
|
|
2004-11-12 17:52:08 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_get_accel_path ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@action:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_set_accel_path ##### -->
|
2003-08-31 00:27:15 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
@action:
|
|
|
|
@accel_path:
|
2003-08-31 00:27:15 +00:00
|
|
|
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
<!-- ##### FUNCTION gtk_action_set_accel_group ##### -->
|
2003-08-31 00:27:15 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2003-12-08 22:55:03 +00:00
|
|
|
@action:
|
|
|
|
@accel_group:
|
2003-08-31 00:27:15 +00:00
|
|
|
|
|
|
|
|