[gtk+] Move documentation to inline comments: GtkTearoffMenuItem
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Move documentation to inline comments: GtkTearoffMenuItem
- Date: Mon, 11 Apr 2011 22:09:08 +0000 (UTC)
commit 518d030220e81e715832e08b5dc1fe4bb2a5ec9e
Author: Javier Jardón <jjardon gnome org>
Date: Mon Apr 11 22:52:00 2011 +0100
Move documentation to inline comments: GtkTearoffMenuItem
docs/reference/gtk/tmpl/.gitignore | 1 +
docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml | 60 -----------------------
gtk/gtktearoffmenuitem.c | 29 +++++++++++
3 files changed, 30 insertions(+), 60 deletions(-)
---
diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore
index acc4ada..1ceddcf 100644
--- a/docs/reference/gtk/tmpl/.gitignore
+++ b/docs/reference/gtk/tmpl/.gitignore
@@ -88,6 +88,7 @@ gtkseparatortoolitem.sgml
gtksettings.sgml
gtkstatusbar.sgml
gtkstyle.sgml
+gtktearoffmenuitem.sgml
gtktesting.sgml
gtktextiter.sgml
gtktexttag.sgml
diff --git a/gtk/gtktearoffmenuitem.c b/gtk/gtktearoffmenuitem.c
index f7fa89c..bf3a37c 100644
--- a/gtk/gtktearoffmenuitem.c
+++ b/gtk/gtktearoffmenuitem.c
@@ -31,6 +31,28 @@
#include "gtktearoffmenuitem.h"
#include "gtkintl.h"
+
+/**
+ * SECTION:gtktearoffmenuitem
+ * @Short_description: A menu item used to tear off and reattach its menu
+ * @Title: GtkTearoffMenuItem
+ * @See_also: #GtkMenu
+ *
+ * A #GtkTearoffMenuItem is a special #GtkMenuItem which is used to
+ * tear off and reattach its menu.
+ *
+ * When its menu is shown normally, the #GtkTearoffMenuItem is drawn as a
+ * dotted line indicating that the menu can be torn off. Activating it
+ * causes its menu to be torn off and displayed in its own window
+ * as a tearoff menu.
+ *
+ * When its menu is shown as a tearoff menu, the #GtkTearoffMenuItem is drawn
+ * as a dotted line which has a left pointing arrow graphic indicating that
+ * the tearoff menu can be reattached. Activating it will erase the tearoff
+ * menu window.
+ */
+
+
#define ARROW_SIZE 10
#define TEAR_LENGTH 5
#define BORDER_SPACING 3
@@ -54,6 +76,13 @@ static void gtk_tearoff_menu_item_parent_set (GtkWidget *widget,
G_DEFINE_TYPE (GtkTearoffMenuItem, gtk_tearoff_menu_item, GTK_TYPE_MENU_ITEM)
+/**
+ * gtk_tearoff_menu_item_new:
+ *
+ * Creates a new #GtkTearoffMenuItem.
+ *
+ * Returns: a new #GtkTearoffMenuItem.
+ */
GtkWidget*
gtk_tearoff_menu_item_new (void)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]