From 7f5968aa0781f33918016adfc2eb571efd727451 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 1 Jul 2003 19:46:22 +0000 Subject: [PATCH] Add GtkExpander docs. --- ChangeLog | 6 + ChangeLog.pre-2-10 | 6 + ChangeLog.pre-2-4 | 6 + ChangeLog.pre-2-6 | 6 + ChangeLog.pre-2-8 | 6 + docs/reference/ChangeLog | 8 ++ docs/reference/gtk/gtk-docs.sgml | 6 + docs/reference/gtk/gtk-sections.txt | 82 +++++++++++ docs/reference/gtk/gtk.types | 3 + docs/reference/gtk/tmpl/gtkexpander.sgml | 173 +++++++++++++++++++++++ gtk/gtk.h | 3 + gtk/gtkexpander.c | 59 +++++++- 12 files changed, 359 insertions(+), 5 deletions(-) create mode 100644 docs/reference/gtk/tmpl/gtkexpander.sgml diff --git a/ChangeLog b/ChangeLog index cd233bd418..ff6680976b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-01 Matthias Clasen + + * gtk/gtk.h: Include gtkexpander.h + + * gtk/gtkexpander.c: Small additions to the docs. + 2003-07-01 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_get_pointer): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index cd233bd418..ff6680976b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2003-07-01 Matthias Clasen + + * gtk/gtk.h: Include gtkexpander.h + + * gtk/gtkexpander.c: Small additions to the docs. + 2003-07-01 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_get_pointer): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index cd233bd418..ff6680976b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2003-07-01 Matthias Clasen + + * gtk/gtk.h: Include gtkexpander.h + + * gtk/gtkexpander.c: Small additions to the docs. + 2003-07-01 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_get_pointer): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index cd233bd418..ff6680976b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2003-07-01 Matthias Clasen + + * gtk/gtk.h: Include gtkexpander.h + + * gtk/gtkexpander.c: Small additions to the docs. + 2003-07-01 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_get_pointer): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index cd233bd418..ff6680976b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2003-07-01 Matthias Clasen + + * gtk/gtk.h: Include gtkexpander.h + + * gtk/gtkexpander.c: Small additions to the docs. + 2003-07-01 Tor Lillqvist * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_get_pointer): diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 04dcc6d244..11ad48fd0b 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,13 @@ 2003-07-01 Matthias Clasen + * gtk/tmpl/gtkexpander.sgml: New file. Template for GtkExpander docs. + + * gtk/gtk-sections.txt: Add a section for GtkExpander. + + * gtk/gtk-docs.sgml: Add an entity for GtkExpander. + + * gtk/gtk.types: Add gtk_expander_get_type + * gdk/gdk-sections.txt: Add gdk_cursor_new_from_pixbuf(), gdk_display_supports_cursor_alpha(), gdk_display_supports_cursor_color(), gdk_display_get_default_cursor_size() and diff --git a/docs/reference/gtk/gtk-docs.sgml b/docs/reference/gtk/gtk-docs.sgml index eff8daba74..2cf412914f 100644 --- a/docs/reference/gtk/gtk-docs.sgml +++ b/docs/reference/gtk/gtk-docs.sgml @@ -14,6 +14,7 @@ + @@ -26,8 +27,10 @@ + + @@ -379,9 +382,11 @@ that is, GUI components such as GtkButton or Selectors (File/Font/Color/Input Devices) + &GtkColorButton; &GtkColorSelection; &GtkColorSelectionDialog; &GtkFileSelection; + &GtkFontButton; &GtkFontSelection; &GtkFontSelectionDialog; &GtkInputDialog; @@ -401,6 +406,7 @@ that is, GUI components such as GtkButton or &GtkLayout; &GtkNotebook; &GtkTable; + &GtkExpander; diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index 59f438afd2..3cffd88129 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -466,6 +466,31 @@ GTK_CLIST_GET_CLASS gtk_clist_get_type +
+gtkcolorbutton +GtkColorButton +GtkColorButton +gtk_color_button_new +gtk_color_button_set_color +gtk_color_button_get_color +gtk_color_button_set_alpha +gtk_color_button_get_alpha +gtk_color_button_set_use_alpha +gtk_color_button_get_use_alpha +gtk_color_button_set_title +gtk_color_button_get_title + +GTK_COLOR_BUTTON +GTK_IS_COLOR_BUTTON +GTK_TYPE_COLOR_BUTTON +GTK_COLOR_BUTTON_CLASS +GTK_IS_COLOR_BUTTON_CLASS +GTK_COLOR_BUTTON_GET_CLASS +GTK_COLOR_BUTTON_GET_PRIVATE + +gtk_color_button_get_type +
+
gtkcolorsel GtkColorSelection @@ -860,6 +885,33 @@ GTK_EVENT_BOX_GET_CLASS gtk_event_box_get_type
+
+gtkexpander +GtkExpander +GtkExpander +gtk_expander_new +gtk_expander_new_with_mnemonic +gtk_expander_set_expanded +gtk_expander_get_expanded +gtk_expander_set_spacing +gtk_expander_get_spacing +gtk_expander_set_label +gtk_expander_get_label +gtk_expander_set_use_underline +gtk_expander_get_use_underline +gtk_expander_set_label_widget +gtk_expander_get_label_widget + +GTK_TYPE_EXPANDER +GTK_EXPANDER_CLASS +GTK_EXPANDER +GTK_IS_EXPANDER +GTK_IS_EXPANDER_CLASS +GTK_EXPANDER_GET_CLASS + +gtk_expander_get_type +
+
gtkfilesel GtkFileSelection @@ -905,6 +957,36 @@ GTK_FIXED_GET_CLASS gtk_fixed_get_type
+
+gtkfontbutton +GtkFontButton +GtkFontButton +gtk_font_button_new +gtk_font_button_new_with_font +gtk_font_button_set_font_name +gtk_font_button_get_font_name +gtk_font_button_set_show_style +gtk_font_button_get_show_style +gtk_font_button_set_show_size +gtk_font_button_get_show_size +gtk_font_button_set_use_font +gtk_font_button_get_use_font +gtk_font_button_set_use_size +gtk_font_button_get_use_size +gtk_font_button_set_title +gtk_font_button_get_title + +GTK_FONT_BUTTON +GTK_IS_FONT_BUTTON +GTK_TYPE_FONT_BUTTON +GTK_FONT_BUTTON_CLASS +GTK_IS_FONT_BUTTON_CLASS +GTK_FONT_BUTTON_GET_CLASS +GTK_FONT_BUTTON_GET_PRIVATE + +gtk_font_button_get_type +
+
gtkfontsel GtkFontSelection diff --git a/docs/reference/gtk/gtk.types b/docs/reference/gtk/gtk.types index af3bcba1f1..66cd89ddc6 100644 --- a/docs/reference/gtk/gtk.types +++ b/docs/reference/gtk/gtk.types @@ -19,6 +19,7 @@ gtk_cell_renderer_toggle_get_type gtk_check_button_get_type gtk_check_menu_item_get_type gtk_clist_get_type +gtk_color_button_get_type gtk_color_selection_dialog_get_type gtk_color_selection_get_type gtk_combo_get_type @@ -29,8 +30,10 @@ gtk_dialog_get_type gtk_drawing_area_get_type gtk_entry_get_type gtk_event_box_get_type +gtk_expander_get_type gtk_file_selection_get_type gtk_fixed_get_type +gtk_font_button_get_type gtk_font_selection_dialog_get_type gtk_font_selection_get_type gtk_frame_get_type diff --git a/docs/reference/gtk/tmpl/gtkexpander.sgml b/docs/reference/gtk/tmpl/gtkexpander.sgml new file mode 100644 index 0000000000..cb4869b86b --- /dev/null +++ b/docs/reference/gtk/tmpl/gtkexpander.sgml @@ -0,0 +1,173 @@ + +GtkExpander + + +A container which can hide its child + + + +A #GtkExpander allows the user to hide or show its child by clicking on an expander triangle similar to +the triangles used in a #GtkTreeView. + + + + + + + + + + + + + + + + + + +@label: +@Returns: + + + + + + + +@label: +@Returns: + + + + + + + +@expander: +@expanded: + + + + + + + +@expander: +@Returns: + + + + + + + +@expander: +@spacing: + + + + + + + +@expander: +@Returns: + + + + + + + +@expander: +@label: + + + + + + + +@expander: +@Returns: + + + + + + + +@expander: +@use_underline: + + + + + + + +@expander: +@Returns: + + + + + + + +@expander: +@label_widget: + + + + + + + +@expander: +@Returns: + + + + + + + +@expander: the object which received the signal. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/gtk.h b/gtk/gtk.h index 9a9016e64f..3bafe27bc9 100644 --- a/gtk/gtk.h +++ b/gtk/gtk.h @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -64,8 +65,10 @@ #include #include #include +#include #include #include +#include #include #include #include diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index 6c3ba51cde..06948807f2 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -246,7 +246,9 @@ gtk_expander_class_init (GtkExpanderClass *klass) G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkExpanderClass, activate), NULL, NULL, - _gtk_marshal_VOID__VOID, + _gtk_marsha /** + +l_VOID__VOID, G_TYPE_NONE, 0); } @@ -1081,12 +1083,39 @@ gtk_expander_activate (GtkExpander *expander) gtk_expander_set_expanded (expander, !expander->priv->expanded); } + +/** + * gtk_expander_new: + * @label: the text of the label + * + * Creates a new expander using @label as the text of the label. + * + * Return value: a new #GtkExpander widget. + * + * Since: 2.4 + **/ GtkWidget * gtk_expander_new (const gchar *label) { return g_object_new (GTK_TYPE_EXPANDER, "label", label, NULL); } +/** + * gtk_expander_new_with_mnemonic: + * @label: the text of the label with an underscore in front of the + * mnemonic character + * + * Creates a new expander using @label as the text of the label. + * If characters in @label are preceded by an underscore, they are underlined. + * If you need a literal underscore character in a label, use '__' (two + * underscores). The first underlined character represents a keyboard + * accelerator called a mnemonic. + * Pressing Alt and that key activates the button. + * + * Return value: a new #GtkExpander widget. + * + * Since: 2.4 + **/ GtkWidget * gtk_expander_new_with_mnemonic (const gchar *label) { @@ -1166,9 +1195,11 @@ gtk_expander_start_animation (GtkExpander *expander) * @expander: a #GtkExpander * @expanded: whether the child widget is revealed * - * Sets the state of the expander. Set to #TRUE, if you want - * the child widget to be revealed, and #FALSE if you want the + * Sets the state of the expander. Set to %TRUE, if you want + * the child widget to be revealed, and %FALSE if you want the * child widget to be hidden. + * + * Since: 2.4 **/ void gtk_expander_set_expanded (GtkExpander *expander, @@ -1205,12 +1236,14 @@ gtk_expander_set_expanded (GtkExpander *expander, * gtk_expander_get_expanded: * @expander:a #GtkExpander * - * Queries a #GtkExpander and returns its current state. Returns #TRUE + * Queries a #GtkExpander and returns its current state. Returns %TRUE * if the child widget is revealed. * * See gtk_expander_set_expanded(). * * Return value: the current state of the expander. + * + * Since: 2.4 **/ gboolean gtk_expander_get_expanded (GtkExpander *expander) @@ -1227,6 +1260,8 @@ gtk_expander_get_expanded (GtkExpander *expander) * * Sets the spacing field of @expander, which is the number of pixels to * place between expander and the child. + * + * Since: 2.4 **/ void gtk_expander_set_spacing (GtkExpander *expander, @@ -1252,6 +1287,8 @@ gtk_expander_set_spacing (GtkExpander *expander, * Gets the value set by gtk_expander_set_spacing(). * * Return value: spacing between the expander and child. + * + * Since: 2.4 **/ gint gtk_expander_get_spacing (GtkExpander *expander) @@ -1269,6 +1306,8 @@ gtk_expander_get_spacing (GtkExpander *expander) * Sets the text of the label of the expander to @label. * * This will also clear any previously set labels. + * + * Since: 2.4 **/ void gtk_expander_set_label (GtkExpander *expander, @@ -1306,6 +1345,8 @@ gtk_expander_set_label (GtkExpander *expander, * * Return value: The text of the label widget. This string is owned * by the widget and must not be modified or freed. + * + * Since: 2.4 **/ G_CONST_RETURN char * gtk_expander_get_label (GtkExpander *expander) @@ -1329,6 +1370,8 @@ gtk_expander_get_label (GtkExpander *expander) * * If true, an underline in the text of the expander label indicates * the next character should be used for the mnemonic accelerator key. + * + * Since: 2.4 **/ void gtk_expander_set_use_underline (GtkExpander *expander, @@ -1358,10 +1401,12 @@ gtk_expander_set_use_underline (GtkExpander *expander, * @expander: a #GtkExpander * * Returns whether an embedded underline in the expander label indicates a - * mnemonic. See gtk_expander_set_use_underline (). + * mnemonic. See gtk_expander_set_use_underline(). * * Return value: %TRUE if an embedded underline in the expander label * indicates the mnemonic accelerator keys. + * + * Since: 2.4 **/ gboolean gtk_expander_get_use_underline (GtkExpander *expander) @@ -1378,6 +1423,8 @@ gtk_expander_get_use_underline (GtkExpander *expander) * * Set the label widget for the expander. This is the widget * that will appear embedded alongside the expander arrow. + * + * Since: 2.4 **/ void gtk_expander_set_label_widget (GtkExpander *expander, @@ -1422,6 +1469,8 @@ gtk_expander_set_label_widget (GtkExpander *expander, * gtk_expander_set_label_widget(). * * Return value: the label widget, or %NULL if there is none. + * + * Since: 2.4 **/ GtkWidget * gtk_expander_get_label_widget (GtkExpander *expander)