summaryrefslogtreecommitdiff
path: root/gtk/gtkaction.c
diff options
context:
space:
mode:
authorTadej Borovšak <tadeboro@gmail.com>2010-03-05 23:33:29 +0100
committerJavier Jardón <jjardon@gnome.org>2010-04-18 04:49:51 +0200
commitb6a61425562fc9ffcb4a0a9a19d2e85184dfcd1e (patch)
tree67d241f4389e4abd4d549e1ff05534d996ab4907 /gtk/gtkaction.c
parent6cdeb370a11b81ded06203bd5af12e8207830f46 (diff)
downloadgtk+-b6a61425562fc9ffcb4a0a9a19d2e85184dfcd1e.tar.gz
[docs] Move documentation to inline comments: GtkAction
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611952 Signed-off-by: Javier Jardón <jjardon@gnome.org>
Diffstat (limited to 'gtk/gtkaction.c')
-rw-r--r--gtk/gtkaction.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c
index 6c552cc4ae..1cb1cecaae 100644
--- a/gtk/gtkaction.c
+++ b/gtk/gtkaction.c
@@ -28,6 +28,45 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+/**
+ * SECTION:gtkaction
+ * @Short_description: An action which can be triggered by a menu or toolbar item
+ * @Title: GtkAction
+ * @See_also: #GtkActionGroup, #GtkUIManager
+ *
+ * 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.
+ *
+ * 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>
+ * 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.
+ *
+ * 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.
+ */
+
#include "config.h"
#include "gtkaction.h"