From 518d030220e81e715832e08b5dc1fe4bb2a5ec9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Mon, 11 Apr 2011 22:52:00 +0100 Subject: [PATCH] Move documentation to inline comments: GtkTearoffMenuItem --- docs/reference/gtk/tmpl/.gitignore | 1 + .../gtk/tmpl/gtktearoffmenuitem.sgml | 60 ------------------- gtk/gtktearoffmenuitem.c | 29 +++++++++ 3 files changed, 30 insertions(+), 60 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index acc4adac8a..1ceddcfe83 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/docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml b/docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml deleted file mode 100644 index 450c4aa09a..0000000000 --- a/docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml +++ /dev/null @@ -1,60 +0,0 @@ - -GtkTearoffMenuItem - - -A menu item used to tear off and reattach its menu - - - -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. - - - - - - - -#GtkMenu -for further discussion of menus in GTK. - - - - - - - - - - - - - -The #GtkTearoffMenuItem-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkTearoffMenuItem. - - -@void: -@Returns: a new #GtkTearoffMenuItem. - - diff --git a/gtk/gtktearoffmenuitem.c b/gtk/gtktearoffmenuitem.c index f7fa89cd39..bf3a37c766 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) {