From 009ea4211202b62bd455da7f7b25490674419ab0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 16 Oct 2010 01:01:06 -0400 Subject: [PATCH] Add docs for GtkComboBoxText (cherry picked from commit 3e9bdf6fd91175907c4b74b7a242a4ee0f5dbb11) --- docs/reference/gtk/gtk-docs.sgml | 1 + docs/reference/gtk/gtk-sections.txt | 24 ++++++++++++++++++++++++ docs/reference/gtk/gtk.types | 1 + gtk/gtkcombobox.c | 2 +- gtk/gtkcomboboxtext.c | 18 ++++++++++++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) diff --git a/docs/reference/gtk/gtk-docs.sgml b/docs/reference/gtk/gtk-docs.sgml index 858ff3caaa..f71c9983c8 100644 --- a/docs/reference/gtk/gtk-docs.sgml +++ b/docs/reference/gtk/gtk-docs.sgml @@ -229,6 +229,7 @@ that is, GUI components such as #GtkButton or #GtkTextView. Menus, Combo Box, Toolbar + diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index 3015feb79d..5251f29b34 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -1002,6 +1002,30 @@ gtk_combo_box_entry_get_type
+gtkcomboboxtext +GtkComboBoxText +GtkComboBoxText +gtk_combo_box_text_new +gtk_combo_box_text_new_with_entry +gtk_combo_box_text_append_text +gtk_combo_box_text_insert_text +gtk_combo_box_text_prepend_text +gtk_combo_box_text_remove_text +gtk_combo_box_text_get_active_text + + +GTK_TYPE_COMBO_BOX_TEXT +GTK_COMBO_BOX_TEXT +GTK_IS_COMBO_BOX_TEXT +GTK_COMBO_BOX_TEXT_CLASS +GTK_IS_COMBO_BOX_TEXT_CLASS +GTK_COMBO_BOX_TEXT_GET_CLASS + + +GtkComboBoxTextPrivate +gtk_combo_box_text_get_type +
+ gtkcontainer GtkContainer GtkContainer diff --git a/docs/reference/gtk/gtk.types b/docs/reference/gtk/gtk.types index 1faa1f0d90..dc7295cdb0 100644 --- a/docs/reference/gtk/gtk.types +++ b/docs/reference/gtk/gtk.types @@ -43,6 +43,7 @@ gtk_color_selection_get_type gtk_combo_box_entry_get_type gtk_combo_box_get_type gtk_combo_get_type +gtk_combo_box_text_get_type gtk_container_get_type gtk_ctree_get_type gtk_curve_get_type diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 6a4c02016a..2daa469dd8 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -57,7 +57,7 @@ * SECTION:gtkcombobox * @Short_description: A widget used to choose from a list of items * @Title: GtkComboBox - * @See_also: #GtkComboBoxEntry, #GtkTreeModel, #GtkCellRenderer + * @See_also: #GtkComboBoxText, #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 diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c index 19aad4a651..914e6d3f29 100644 --- a/gtk/gtkcomboboxtext.c +++ b/gtk/gtkcomboboxtext.c @@ -25,6 +25,24 @@ #include "gtkalias.h" +/** + * SECTION:gtkcomboboxtext + * @Short_description: A simple, text-only combo box + * @Title: GtkComboBoxText + * @See_also: @GtkComboBox + * + * A GtkComboBoxText is a simple variant of #GtkComboBox that hides + * the model-view complexity for simple text-only use cases. + * + * To create a GtkComboBoxText, use gtk_combo_box_text_new() or + * gtk_combo_box_text_new_with_entry(). + * + * You can add items to a GtkComboBoxText with + * gtk_combo_box_text_append_text(), gtk_combo_box_text_insert_text() + * or gtk_combo_box_text_prepend_text() and remove options with + * gtk_combo_box_text_remove_text(). + */ + G_DEFINE_TYPE (GtkComboBoxText, gtk_combo_box_text, GTK_TYPE_COMBO_BOX); static void