From 60a1fa69d0fe4f633e090e12ca056f2dbaf511b9 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Fri, 15 Mar 2002 21:47:52 +0000 Subject: [PATCH] add example to docs, as people are seeming to have trouble with this Fri Mar 15 12:51:42 2002 Jonathan Blandford * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_new_with_attributes): add example to docs, as people are seeming to have trouble with this function. Remake docs as well. --- ChangeLog | 6 + ChangeLog.pre-2-0 | 6 + ChangeLog.pre-2-10 | 6 + ChangeLog.pre-2-2 | 6 + ChangeLog.pre-2-4 | 6 + ChangeLog.pre-2-6 | 6 + ChangeLog.pre-2-8 | 6 + docs/reference/gtk/tmpl/gtk-unused.sgml | 167 ++++++++---------- docs/reference/gtk/tmpl/gtkcelleditable.sgml | 14 ++ docs/reference/gtk/tmpl/gtkeditable.sgml | 44 +++++ docs/reference/gtk/tmpl/gtkimagemenuitem.sgml | 6 - docs/reference/gtk/tmpl/gtkobject.sgml | 8 - docs/reference/gtk/tmpl/gtkrc.sgml | 6 - docs/reference/gtk/tmpl/gtksettings.sgml | 6 - docs/reference/gtk/tmpl/gtkstyle.sgml | 47 ----- docs/reference/gtk/tmpl/gtktextview.sgml | 6 - docs/reference/gtk/tmpl/gtktreesortable.sgml | 7 + gtk/gtktreeviewcolumn.c | 16 ++ 18 files changed, 201 insertions(+), 168 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6858c150a2..3ae368e71b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Mar 15 12:51:42 2002 Jonathan Blandford + + * gtk/gtktreeviewcolumn.c + (gtk_tree_view_column_new_with_attributes): add example to docs, + as people are seeming to have trouble with this function. + 2002-03-15 Tor Lillqvist * configure.in: Set MATH_LIB to empty also on Win32. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 6858c150a2..3ae368e71b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Fri Mar 15 12:51:42 2002 Jonathan Blandford + + * gtk/gtktreeviewcolumn.c + (gtk_tree_view_column_new_with_attributes): add example to docs, + as people are seeming to have trouble with this function. + 2002-03-15 Tor Lillqvist * configure.in: Set MATH_LIB to empty also on Win32. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6858c150a2..3ae368e71b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Fri Mar 15 12:51:42 2002 Jonathan Blandford + + * gtk/gtktreeviewcolumn.c + (gtk_tree_view_column_new_with_attributes): add example to docs, + as people are seeming to have trouble with this function. + 2002-03-15 Tor Lillqvist * configure.in: Set MATH_LIB to empty also on Win32. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 6858c150a2..3ae368e71b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Fri Mar 15 12:51:42 2002 Jonathan Blandford + + * gtk/gtktreeviewcolumn.c + (gtk_tree_view_column_new_with_attributes): add example to docs, + as people are seeming to have trouble with this function. + 2002-03-15 Tor Lillqvist * configure.in: Set MATH_LIB to empty also on Win32. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6858c150a2..3ae368e71b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Fri Mar 15 12:51:42 2002 Jonathan Blandford + + * gtk/gtktreeviewcolumn.c + (gtk_tree_view_column_new_with_attributes): add example to docs, + as people are seeming to have trouble with this function. + 2002-03-15 Tor Lillqvist * configure.in: Set MATH_LIB to empty also on Win32. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6858c150a2..3ae368e71b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Fri Mar 15 12:51:42 2002 Jonathan Blandford + + * gtk/gtktreeviewcolumn.c + (gtk_tree_view_column_new_with_attributes): add example to docs, + as people are seeming to have trouble with this function. + 2002-03-15 Tor Lillqvist * configure.in: Set MATH_LIB to empty also on Win32. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6858c150a2..3ae368e71b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Fri Mar 15 12:51:42 2002 Jonathan Blandford + + * gtk/gtktreeviewcolumn.c + (gtk_tree_view_column_new_with_attributes): add example to docs, + as people are seeming to have trouble with this function. + 2002-03-15 Tor Lillqvist * configure.in: Set MATH_LIB to empty also on Win32. diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index cae2b8cb69..5cdcf14f3f 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -285,6 +285,13 @@ has the focus. @klass: + + +Tests whether a #GtkObject has had a signal connected to it. + + +@obj: the object to examine. + Test whether a GtkObject's arguments have been prepared. @@ -637,14 +644,6 @@ Control-Return for #GtkText.) @editable: the object which received the signal. - - -Indicates that the user has changed the contents -of the widget. - - -@editable: the object which received the signal. - An action signal. Causes the characters in the current selection to @@ -662,42 +661,6 @@ the widget. @editable: the object which received the signal. - - -This signal is emitted when text is deleted from -the widget by the user. The default handler for -this signal will normally be responsible for inserting -the text, so by connecting to this signal and then -stopping the signal with gtk_signal_emit_stop(), it -is possible to modify the inserted text, or prevent -it from being inserted entirely. The @start_pos -and @end_pos parameters are interpreted as for -gtk_editable_delete_text() - - -@editable: the object which received the signal. -@start_pos: the starting position. -@end_pos: the end position. - - - -This signal is emitted when text is inserted into -the widget by the user. The default handler for -this signal will normally be responsible for inserting -the text, so by connecting to this signal and then -stopping the signal with gtk_signal_emit_stop(), it -is possible to modify the inserted text, or prevent -it from being inserted entirely. - - -@editable: the object which received the signal. -@new_text: the new text to insert. -@new_text_length: the length of the new text. -@position: the position at which to insert the new text. - this is an in-out paramter. After the signal - emission is finished, it should point after - the newly inserted text. - An action signal. Delete a single character. @@ -902,6 +865,12 @@ a RC file. @filename: filename to load @Returns: a #GtkPixmap representing @filename + + + + + + @@ -1090,12 +1059,24 @@ after other user handlers and the default handler. @PRIVATE_GTK_DIRECTION_SET: @PRIVATE_GTK_DIRECTION_LTR: + + + + + + + + + + + + A function which you can use to clean up when the @@ -1162,12 +1143,65 @@ Holds the data for a statusbar message. text holds th @context_id: @message_id: + + + + + +@parent_class: +@realize: +@unrealize: +@copy: +@clone: +@init_from_rc: +@set_background: +@render_icon: +@draw_hline: +@draw_vline: +@draw_shadow: +@draw_polygon: +@draw_arrow: +@draw_diamond: +@draw_string: +@draw_box: +@draw_flat_box: +@draw_check: +@draw_option: +@draw_tab: +@draw_shadow_gap: +@draw_box_gap: +@draw_extension: +@draw_focus: +@draw_slider: +@draw_handle: +@draw_expander: +@draw_layout: +@draw_resize_grip: +@_gtk_reserved1: +@_gtk_reserved2: +@_gtk_reserved3: +@_gtk_reserved4: +@_gtk_reserved5: +@_gtk_reserved6: +@_gtk_reserved7: +@_gtk_reserved8: +@_gtk_reserved9: +@_gtk_reserved10: +@_gtk_reserved11: +@_gtk_reserved12: + + + + + + + A #GtkJustification for the text. This is only used when the tag is @@ -1213,51 +1247,6 @@ produce superscript and subscript. - - - - - -@treemodel: the object which received the signal. -@arg1: -@arg2: - - - - - - -@treemodel: the object which received the signal. -@arg1: - - - - - - -@treemodel: the object which received the signal. -@arg1: -@arg2: - - - - - - -@treemodel: the object which received the signal. -@arg1: -@arg2: - - - - - - -@treemodel: the object which received the signal. -@arg1: -@arg2: -@arg3: - diff --git a/docs/reference/gtk/tmpl/gtkcelleditable.sgml b/docs/reference/gtk/tmpl/gtkcelleditable.sgml index 42f7860a61..ec8aae0d54 100644 --- a/docs/reference/gtk/tmpl/gtkcelleditable.sgml +++ b/docs/reference/gtk/tmpl/gtkcelleditable.sgml @@ -55,3 +55,17 @@ GtkCellEditable @cell_editable: + + + + + +@celleditable: the object which received the signal. + + + + + + +@celleditable: the object which received the signal. + diff --git a/docs/reference/gtk/tmpl/gtkeditable.sgml b/docs/reference/gtk/tmpl/gtkeditable.sgml index 0573f87205..3f890d9e0b 100644 --- a/docs/reference/gtk/tmpl/gtkeditable.sgml +++ b/docs/reference/gtk/tmpl/gtkeditable.sgml @@ -250,3 +250,47 @@ widget or not. @Returns: + + +Indicates that the user has changed the contents +of the widget. + + +@editable: the object which received the signal. + + + +This signal is emitted when text is deleted from +the widget by the user. The default handler for +this signal will normally be responsible for inserting +the text, so by connecting to this signal and then +stopping the signal with gtk_signal_emit_stop(), it +is possible to modify the inserted text, or prevent +it from being inserted entirely. The @start_pos +and @end_pos parameters are interpreted as for +gtk_editable_delete_text() + + +@editable: the object which received the signal. +@start_pos: the starting position. +@end_pos: the end position. + + + +This signal is emitted when text is inserted into +the widget by the user. The default handler for +this signal will normally be responsible for inserting +the text, so by connecting to this signal and then +stopping the signal with gtk_signal_emit_stop(), it +is possible to modify the inserted text, or prevent +it from being inserted entirely. + + +@editable: the object which received the signal. +@new_text: the new text to insert. +@new_text_length: the length of the new text. +@position: the position at which to insert the new text. + this is an in-out paramter. After the signal + emission is finished, it should point after + the newly inserted text. + diff --git a/docs/reference/gtk/tmpl/gtkimagemenuitem.sgml b/docs/reference/gtk/tmpl/gtkimagemenuitem.sgml index 4b5782499f..79d86a1168 100644 --- a/docs/reference/gtk/tmpl/gtkimagemenuitem.sgml +++ b/docs/reference/gtk/tmpl/gtkimagemenuitem.sgml @@ -20,12 +20,6 @@ GtkImageMenuItem - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkobject.sgml b/docs/reference/gtk/tmpl/gtkobject.sgml index 09b96e28d3..e7d68589ec 100644 --- a/docs/reference/gtk/tmpl/gtkobject.sgml +++ b/docs/reference/gtk/tmpl/gtkobject.sgml @@ -146,14 +146,6 @@ See the overview documentation for #GtkObject. @obj: the object to examine. - - -Tests whether a #GtkObject has had a signal connected to it. - - -@obj: the object to examine. - - Possible flags indicating how an argument should be treated. diff --git a/docs/reference/gtk/tmpl/gtkrc.sgml b/docs/reference/gtk/tmpl/gtkrc.sgml index c8635bb67c..843af11205 100644 --- a/docs/reference/gtk/tmpl/gtkrc.sgml +++ b/docs/reference/gtk/tmpl/gtkrc.sgml @@ -547,12 +547,6 @@ This can later be composited together with other @xthickness: @ythickness: - - - - - - The #GtkRcFlags enumeration is used as a bitmask diff --git a/docs/reference/gtk/tmpl/gtksettings.sgml b/docs/reference/gtk/tmpl/gtksettings.sgml index 6a40a5e3b1..7b04170154 100644 --- a/docs/reference/gtk/tmpl/gtksettings.sgml +++ b/docs/reference/gtk/tmpl/gtksettings.sgml @@ -20,12 +20,6 @@ GtkSettings - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkstyle.sgml b/docs/reference/gtk/tmpl/gtkstyle.sgml index 3f3e9b6f8d..2f2fb10f64 100644 --- a/docs/reference/gtk/tmpl/gtkstyle.sgml +++ b/docs/reference/gtk/tmpl/gtkstyle.sgml @@ -52,53 +52,6 @@ Returns whether the style is attached to a window. @white_gc: @bg_pixmap: - - - - - -@parent_class: -@realize: -@unrealize: -@copy: -@clone: -@init_from_rc: -@set_background: -@render_icon: -@draw_hline: -@draw_vline: -@draw_shadow: -@draw_polygon: -@draw_arrow: -@draw_diamond: -@draw_string: -@draw_box: -@draw_flat_box: -@draw_check: -@draw_option: -@draw_tab: -@draw_shadow_gap: -@draw_box_gap: -@draw_extension: -@draw_focus: -@draw_slider: -@draw_handle: -@draw_expander: -@draw_layout: -@draw_resize_grip: -@_gtk_reserved1: -@_gtk_reserved2: -@_gtk_reserved3: -@_gtk_reserved4: -@_gtk_reserved5: -@_gtk_reserved6: -@_gtk_reserved7: -@_gtk_reserved8: -@_gtk_reserved9: -@_gtk_reserved10: -@_gtk_reserved11: -@_gtk_reserved12: - diff --git a/docs/reference/gtk/tmpl/gtktextview.sgml b/docs/reference/gtk/tmpl/gtktextview.sgml index 72742cf105..af3f7a7d1c 100644 --- a/docs/reference/gtk/tmpl/gtktextview.sgml +++ b/docs/reference/gtk/tmpl/gtktextview.sgml @@ -329,12 +329,6 @@ types related to the text widget and how they work together. - - - - - - diff --git a/docs/reference/gtk/tmpl/gtktreesortable.sgml b/docs/reference/gtk/tmpl/gtktreesortable.sgml index 438e310015..1c9cf1e2ab 100644 --- a/docs/reference/gtk/tmpl/gtktreesortable.sgml +++ b/docs/reference/gtk/tmpl/gtktreesortable.sgml @@ -106,3 +106,10 @@ GtkTreeSortable @Returns: + + + + + +@treesortable: the object which received the signal. + diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 394608ac19..666f25d473 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -1075,6 +1075,22 @@ gtk_tree_view_column_new (void) * equivalent to calling gtk_tree_view_column_set_title(), * gtk_tree_view_column_pack_start(), and * gtk_tree_view_column_set_attributes() on the newly created #GtkTreeViewColumn. + * + * Here's a simple example: + * + * enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS }; + * ... + * { + * GtkTreeViewColumn *column; + * GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + * + * column = gtk_tree_view_column_new_with_attributes ("Title", + * renderer, + * "text", TEXT_COLUMN, + * "foreground", COLOR_COLUMN, + * NULL); + * } + * * * Return value: A newly created #GtkTreeViewColumn. **/