From 5a30dad53108fe3ffa269a4ad7597980adee4580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Mon, 4 Oct 2010 02:05:45 +0200 Subject: [PATCH] docs: Move documentation to inline comments: GtkComboBox --- docs/reference/gtk/tmpl/.gitignore | 1 + docs/reference/gtk/tmpl/gtkcombobox.sgml | 461 ----------------------- gtk/gtkcombobox.c | 31 ++ gtk/gtknotebook.c | 5 +- 4 files changed, 34 insertions(+), 464 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkcombobox.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index e21801899e..24fa3ad14d 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -7,6 +7,7 @@ gtkbuilder.sgml gtkbutton.sgml gtkcalendar.sgml gtkcelleditable.sgml +gtkcombobox.sgml gtkcomboboxentry.sgml gtkeditable.sgml gtkentrybuffer.sgml diff --git a/docs/reference/gtk/tmpl/gtkcombobox.sgml b/docs/reference/gtk/tmpl/gtkcombobox.sgml deleted file mode 100644 index b4e303f1b2..0000000000 --- a/docs/reference/gtk/tmpl/gtkcombobox.sgml +++ /dev/null @@ -1,461 +0,0 @@ - -GtkComboBox - - -A widget used to choose from a list of items - - - -A #GtkComboBox is a widget that allows the user to choose from a -list of valid choices. The #GtkComboBox displays the selected -choice. When activated, the #GtkComboBox displays a popup -which allows the user to make a new choice. The style in which -the selected value is displayed, and the style of the popup is -determined by the current theme. It may be similar to a #GtkOptionMenu, -or similar to a Windows-style combo box. - - - -Unlike its predecessors #GtkCombo and #GtkOptionMenu, the #GtkComboBox -uses the model-view pattern; the list of valid choices is specified in the -form of a tree model, and the display of the choices can be adapted to -the data in the model by using cell renderers, as you would in a tree view. -This is possible since #GtkComboBox implements the #GtkCellLayout interface. -The tree model holding the valid choices is not restricted to a flat list, -it can be a real tree, and the popup will reflect the tree structure. - - - -In addition to the model-view API, #GtkComboBox offers a simple API which -is suitable for text-only combo boxes, and hides the complexity of managing -the data in a model. It consists of the functions gtk_combo_box_new_text(), -gtk_combo_box_append_text(), gtk_combo_box_insert_text(), -gtk_combo_box_prepend_text(), gtk_combo_box_remove_text() and -gtk_combo_box_get_active_text(). - - - - -#GtkComboBoxEntry, #GtkTreeModel, #GtkCellRenderer - - - - - - - - - - - - - - - - - - - -@combobox: the object which received the signal. - - - - - - -@combobox: the object which received the signal. -@arg1: - - - - - - -@combobox: the object which received the signal. -@Returns: - - - - - - -@combobox: the object which received the signal. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@model: -@Returns: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@width: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@row_span: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@column_span: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@index_: - - - - - - - -@combo_box: -@iter: -@Returns: - - - - - - - -@combo_box: -@iter: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@model: - - - - - - - -@void: -@Returns: - - - - - - - -@combo_box: -@text: - - - - - - - -@combo_box: -@position: -@text: - - - - - - - -@combo_box: -@text: - - - - - - - -@combo_box: -@position: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@device: - - - - - - - -@combo_box: - - - - - - - -@combo_box: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@func: -@data: -@destroy: - - - - - - - -@combo_box: -@add_tearoffs: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo_box: -@title: - - - - - - - -@combo_box: -@Returns: - - - - - - - -@combo: -@focus_on_click: - - - - - - - -@combo: -@Returns: - - - - - - - -@combo_box: -@sensitivity: - - - - - - - -@combo_box: -@Returns: - - diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 6076c6ccfd..aeb5e91a36 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -52,6 +52,37 @@ #include "gtktreeprivate.h" + +/** + * SECTION:gtkcombobox + * @Short_description: A widget used to choose from a list of items + * @Title: GtkComboBox + * @See_also: #GtkComboBoxEntry, #GtkTreeModel, #GtkCellRenderer + * + * A GtkComboBox is a widget that allows the user to choose from a list of + * valid choices. The GtkComboBox displays the selected choice. When + * activated, the GtkComboBox displays a popup which allows the user to + * make a new choice. The style in which the selected value is displayed, + * and the style of the popup is determined by the current theme. It may + * be similar to a Windows-style combo box. + * + * The GtkComboBox uses the model-view pattern; the list of valid choices + * is specified in the form of a tree model, and the display of the choices + * can be adapted to the data in the model by using cell renderers, as you + * would in a tree view. This is possible since GtkComboBox implements the + * #GtkCellLayout interface. The tree model holding the valid choices is + * not restricted to a flat list, it can be a real tree, and the popup will + * reflect the tree structure. + * + * In addition to the model-view API, GtkComboBox offers a simple API which + * is suitable for text-only combo boxes, and hides the complexity of + * managing the data in a model. It consists of the functions + * gtk_combo_box_new_text(), gtk_combo_box_append_text(), + * gtk_combo_box_insert_text(), gtk_combo_box_prepend_text(), + * gtk_combo_box_remove_text() and gtk_combo_box_get_active_text(). + */ + + /* WELCOME, to THE house of evil code */ typedef struct _ComboCellInfo ComboCellInfo; diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 95e1325f66..beb19d8179 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -72,12 +72,11 @@ * of the tab must be created before the tab can be filled. * A tab child can be specified without specifying a <child> * type attribute. - * - * + * * To add a child widget in the notebooks action area, specify * "action-start" or "action-end" as the "type" attribute of the <child> * element. - * + * * * A UI definition fragment with GtkNotebook *