diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 00dd737b7d..d32fb22e00 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,10 @@ +2002-01-01 Havoc Pennington + + * gtk/tmpl/gtktexttag.sgml: docs updates, mention that invisible + property isn't implemented + + * gtk/text_widget.sgml: small tweaks + 2001-12-30 Matthias Clasen * gtk/tmpl/gtkbbox.sgml: Remove references to nonexisting functions. diff --git a/docs/reference/gtk/text_widget.sgml b/docs/reference/gtk/text_widget.sgml index b56b944262..e7ed7a1628 100644 --- a/docs/reference/gtk/text_widget.sgml +++ b/docs/reference/gtk/text_widget.sgml @@ -103,11 +103,14 @@ between the old and new positions). -Text buffers always contain at least one line, but may be empty (that is, -buffers can contain zero characters). The last line in the text buffer never -ends in a line separator (such as newline); the other lines in the buffer always -end in a line separator. Line separators count as characters when computing -character counts and character offsets. +Text buffers always contain at least one line, but may be empty (that +is, buffers can contain zero characters). The last line in the text +buffer never ends in a line separator (such as newline); the other +lines in the buffer always end in a line separator. Line separators +count as characters when computing character counts and character +offsets. Note that some Unicode line separators are represented with +multiple bytes in UTF-8, and the two-character sequence "\r\n" is also +considered a line separator. diff --git a/docs/reference/gtk/tmpl/gtktexttag.sgml b/docs/reference/gtk/tmpl/gtktexttag.sgml index f007f6b58c..e4b9f1897f 100644 --- a/docs/reference/gtk/tmpl/gtktexttag.sgml +++ b/docs/reference/gtk/tmpl/gtktexttag.sgml @@ -13,7 +13,18 @@ types related to the text widget and how they work together. +Tags should be in the #GtkTextTagTable for a given #GtkTextBuffer +before using them with that buffer. + + +gtk_text_buffer_create_tag() is the best way to create tags. +See gtk-demo for numerous examples. + + + +The "invisible" property was not implemented for GTK+ 2.0; it's +planned to be implemented in future releases. @@ -32,17 +43,23 @@ types related to the text widget and how they work together. Describes a type of line wrapping. -@GTK_WRAP_NONE: -@GTK_WRAP_CHAR: -@GTK_WRAP_WORD: +@GTK_WRAP_NONE: do not wrap lines; just make the text area wider +@GTK_WRAP_CHAR: wrap text, breaking lines anywhere the cursor can + appear (between characters, usually - if you want to + be technical, between graphemes, see + pango_get_log_attrs()) +@GTK_WRAP_WORD: wrap text, breaking lines in between words - +Using #GtkTextAttributes directly should rarely be necessary. It's +primarily useful with gtk_text_iter_get_attributes(). As with most +GTK+ structs, the fields in this struct should only be read, never +modified directly. -@refcount: -@appearance: +@refcount: private field, ignore +@appearance: pointer to sub-struct containing certain attributes @justification: @direction: @font: @@ -183,7 +200,7 @@ Describes a type of line wrapping. -Name of the tag, or NULL for anonymous tags. Can only be set +Name of the tag, or %NULL for anonymous tags. Can only be set when the tag is created. @@ -199,12 +216,12 @@ Foreground color as a string such as "red" or "#FFFFFF". -Background color, as a #GdkColor. +Background color, as a #GdkColor. The color need not be allocated. -Foreground color as a #GdkColor. +Foreground color as a #GdkColor. The color need not be allocated. @@ -229,42 +246,48 @@ Font as a #PangoFontDescription. - +Font family as a string. - +Font style as a #PangoStyle, e.g. #PANGO_STYLE_ITALIC. - +Font variant as a #PangoVariant, e.g. #PANGO_VARIANT_SMALL_CAPS. - +Font weight as an integer, see predefined values in #PangoWeight; +for example, #PANGO_WEIGHT_BOLD. - +Font stretch as a #PangoStretch, e.g. #PANGO_STRETCH_CONDENSED. - +Font size as an integer in Pango units, as for +pango_font_description_set_size(). Using the "scale" property is +usually better. - +Font size as a double, in points. Using the "scale" property is +usually better. - +Font size as a scale factor relative to the default font size. +This properly adapts to theme changes etc. so is recommended. +Pango predefines some scales such as #PANGO_SCALE_X_LARGE. @@ -311,7 +334,7 @@ Pixel width of left margin of the text. - +Pixel size of paragraph indentation; may be negative. @@ -331,7 +354,8 @@ A #PangoUnderline value. - +Used for superscript or subscript; value is given in pixels. +Negative rise means subscript. @@ -356,17 +380,19 @@ applies to the first character in a paragraph. - +Not implemented in GTK 2.0. Would make text disappear. - +If %TRUE, honor the background property. Automatically toggled +on when setting the background property. - +If %TRUE, honor the foreground property. Automatically toggled +on when setting the foreground property. diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 5b9c1466bf..2ab322e526 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4823,7 +4823,7 @@ gtk_text_view_ensure_layout (GtkTextView *text_view) * Obtains a copy of the default text attributes. These are the * attributes used for text unless a tag overrides them. * You'd typically pass the default attributes in to - * gtk_text_tag_get_attributes() in order to get the + * gtk_text_iter_get_attributes() in order to get the * attributes in effect at a given text position. * * The return value is a copy owned by the caller of this function,