documented some of the object args

2000-11-05  Havoc Pennington  <hp@pobox.com>

* gtk/tmpl/gtktexttag.sgml: documented some of the object args

* gtk/text_widget.sgml: fixups
This commit is contained in:
Havoc Pennington 2000-11-05 16:09:04 +00:00 committed by Havoc Pennington
parent ab6b184e9d
commit 3f17a11137
4 changed files with 69 additions and 51 deletions

View File

@ -1,3 +1,9 @@
2000-11-05 Havoc Pennington <hp@pobox.com>
* gtk/tmpl/gtktexttag.sgml: documented some of the object args
* gtk/text_widget.sgml: fixups
2000-11-04 Havoc Pennington <hp@pobox.com> 2000-11-04 Havoc Pennington <hp@pobox.com>
* gtk/gtk-sections.txt: Added a bunch of stuff from unused * gtk/gtk-sections.txt: Added a bunch of stuff from unused

View File

@ -36,7 +36,7 @@ Text in a buffer can be marked with <firstterm>tags</firstterm>. A tag is an
attribute that can be applied to some range of text. For example, a tag might be attribute that can be applied to some range of text. For example, a tag might be
called "bold" and make the text inside the tag bold. However, the tag concept is called "bold" and make the text inside the tag bold. However, the tag concept is
more general than that; tags don't have to affect appearance. They can instead more general than that; tags don't have to affect appearance. They can instead
affect change the behavior of mouse and key presses, "lock" a range of text so affect the behavior of mouse and key presses, "lock" a range of text so
the user can't edit it, or countless other things. A tag is represented by a the user can't edit it, or countless other things. A tag is represented by a
<link linkend="GtkTextTag">GtkTextTag</link> object. One <link <link linkend="GtkTextTag">GtkTextTag</link> object. One <link
linkend="GtkTextTag">GtkTextTag</link> can be applied to any number of text linkend="GtkTextTag">GtkTextTag</link> can be applied to any number of text
@ -112,24 +112,25 @@ between the old and new positions).
The simplest usage of <link linkend="GtkTextView">GtkTextView</link> The simplest usage of <link linkend="GtkTextView">GtkTextView</link>
might look like this: might look like this:
<programlisting> <programlisting>
GtkWidget *view;
GtkTextBuffer *buffer;
/* Get a buffer (it's a GObject, not a GtkObject, so we own a reference view = gtk_text_view_new ();
* after this). Passing NULL as argument causes an empty tag table to be
* automatically created.
*/
buffer = gtk_text_buffer_new (NULL); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
view = gtk_text_view_new_with_buffer (buffer); gtk_text_buffer_set_text (buffer, "Hello, this is some text");
/* view holds a reference now */
g_object_unref (G_OBJECT (buffer));
/* Now you might put the view in a container and display it on the /* Now you might put the view in a container and display it on the
* screen; when the user edits the text, signals on the buffer * screen; when the user edits the text, signals on the buffer
* will be emitted, such as "changed", "insert_text", and so on. * will be emitted, such as "changed", "insert_text", and so on.
*/ */
</programlisting> </programlisting>
In many cases it's also convenient to first create the buffer with
gtk_text_buffer_new(), then create a widget for that buffer with
gtk_text_view_new_with_buffer(). Or you can change the buffer the
widget displays after the widget is created with
gtk_text_view_set_buffer().
</para> </para>
</refsect1> </refsect1>

View File

@ -541,14 +541,6 @@ The first "flat" (no struct) enumerated type value.
@func_data: @func_data:
@args: @args:
<!-- ##### MACRO GTK_PRIVATE_UNSET_FLAG ##### -->
<para>
</para>
@wid:
@flag:
<!-- ##### FUNCTION gtk_window_set_focus ##### --> <!-- ##### FUNCTION gtk_window_set_focus ##### -->
<para> <para>
@ -557,6 +549,14 @@ The first "flat" (no struct) enumerated type value.
@window: @window:
@focus: @focus:
<!-- ##### MACRO GTK_PRIVATE_UNSET_FLAG ##### -->
<para>
</para>
@wid:
@flag:
<!-- ##### MACRO gtk_marshal_NONE__BOXED ##### --> <!-- ##### MACRO gtk_marshal_NONE__BOXED ##### -->
<para> <para>
@ -799,6 +799,10 @@ The pointer is allocated just for you: you must g_free() it.
@func_data: @func_data:
@args: @args:
<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Short_Description ##### -->
<!-- ##### FUNCTION gtk_text_mark_deleted ##### --> <!-- ##### FUNCTION gtk_text_mark_deleted ##### -->
<para> <para>
@ -807,10 +811,6 @@ The pointer is allocated just for you: you must g_free() it.
@mark: @mark:
@Returns: @Returns:
<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Short_Description ##### -->
<!-- ##### FUNCTION gtk_text_buffer_cut ##### --> <!-- ##### FUNCTION gtk_text_buffer_cut ##### -->
<para> <para>

View File

@ -41,12 +41,12 @@ types related to the text widget and how they work together.
<!-- ##### ENUM GtkWrapMode ##### --> <!-- ##### ENUM GtkWrapMode ##### -->
<para> <para>
Describes a type of line wrapping.
</para> </para>
@GTK_WRAPMODE_NONE: @GTK_WRAPMODE_NONE: don't wrap lines; just use scrollbars
@GTK_WRAPMODE_CHAR: @GTK_WRAPMODE_CHAR: allow line breaks between any two characters
@GTK_WRAPMODE_WORD: @GTK_WRAPMODE_WORD: allow line breaks only between words
<!-- ##### STRUCT GtkTextAttributes ##### --> <!-- ##### STRUCT GtkTextAttributes ##### -->
<para> <para>
@ -176,127 +176,138 @@ types related to the text widget and how they work together.
<!-- ##### ARG GtkTextTag:name ##### --> <!-- ##### ARG GtkTextTag:name ##### -->
<para> <para>
Name of the tag, or NULL for anonymous tags. Can only be set
when the tag is created.
</para> </para>
<!-- ##### ARG GtkTextTag:background ##### --> <!-- ##### ARG GtkTextTag:background ##### -->
<para> <para>
Background color, as a string such as "red" or "#FFFFFF"
</para> </para>
<!-- ##### ARG GtkTextTag:background_gdk ##### --> <!-- ##### ARG GtkTextTag:background_gdk ##### -->
<para> <para>
Background color, as a #GdkColor.
</para> </para>
<!-- ##### ARG GtkTextTag:background_full_height ##### --> <!-- ##### ARG GtkTextTag:background_full_height ##### -->
<para> <para>
Whether to make the background color for each character the height of
the highest font used on the current line, or the height of the font
used for the current character.
</para> </para>
<!-- ##### ARG GtkTextTag:background_stipple ##### --> <!-- ##### ARG GtkTextTag:background_stipple ##### -->
<para> <para>
A #GdkBitmap to use for stippling the background color.
</para> </para>
<!-- ##### ARG GtkTextTag:direction ##### --> <!-- ##### ARG GtkTextTag:direction ##### -->
<para> <para>
The #GtkTextDirection for the tagged text.
</para> </para>
<!-- ##### ARG GtkTextTag:editable ##### --> <!-- ##### ARG GtkTextTag:editable ##### -->
<para> <para>
Whether the user can modify the tagged text.
</para> </para>
<!-- ##### ARG GtkTextTag:font ##### --> <!-- ##### ARG GtkTextTag:font ##### -->
<para> <para>
Font as a Pango font name, e.g. "Sans Italic 12"
</para> </para>
<!-- ##### ARG GtkTextTag:font_desc ##### --> <!-- ##### ARG GtkTextTag:font_desc ##### -->
<para> <para>
Font as a #PangoFontDescription.
</para> </para>
<!-- ##### ARG GtkTextTag:foreground ##### --> <!-- ##### ARG GtkTextTag:foreground ##### -->
<para> <para>
Foreground color as a string such as "red" or "#FFFFFF".
</para> </para>
<!-- ##### ARG GtkTextTag:foreground_gdk ##### --> <!-- ##### ARG GtkTextTag:foreground_gdk ##### -->
<para> <para>
Foreground color as a #GdkColor.
</para> </para>
<!-- ##### ARG GtkTextTag:foreground_stipple ##### --> <!-- ##### ARG GtkTextTag:foreground_stipple ##### -->
<para> <para>
A #GdkBitmap to use as a stipple pattern for the foreground.
</para> </para>
<!-- ##### ARG GtkTextTag:justify ##### --> <!-- ##### ARG GtkTextTag:justify ##### -->
<para> <para>
A #GtkJustification for the text. This is only used when the tag is
applied to the first character in a paragraph.
</para> </para>
<!-- ##### ARG GtkTextTag:language ##### --> <!-- ##### ARG GtkTextTag:language ##### -->
<para> <para>
The language this text is in, as an ISO code. Pango can use this as a
hint when rendering the text. If you don't understand this argument,
you probably don't need it.
</para> </para>
<!-- ##### ARG GtkTextTag:left_margin ##### --> <!-- ##### ARG GtkTextTag:left_margin ##### -->
<para> <para>
Pixel width of left margin of the text.
</para> </para>
<!-- ##### ARG GtkTextTag:left_wrapped_line_margin ##### --> <!-- ##### ARG GtkTextTag:left_wrapped_line_margin ##### -->
<para> <para>
Pixel width of the left margin of the text for lines after the first
line in a wrapped paragraph.
</para> </para>
<!-- ##### ARG GtkTextTag:offset ##### --> <!-- ##### ARG GtkTextTag:offset ##### -->
<para> <para>
Pixels to offset the text horizontally or vertically, useful to
produce superscript and subscript.
</para> </para>
<!-- ##### ARG GtkTextTag:pixels_above_lines ##### --> <!-- ##### ARG GtkTextTag:pixels_above_lines ##### -->
<para> <para>
Pixels of blank space to leave above each newline-terminated line.
</para> </para>
<!-- ##### ARG GtkTextTag:pixels_below_lines ##### --> <!-- ##### ARG GtkTextTag:pixels_below_lines ##### -->
<para> <para>
Pixels of blank space to leave below each newline-terminated line.
</para> </para>
<!-- ##### ARG GtkTextTag:pixels_inside_wrap ##### --> <!-- ##### ARG GtkTextTag:pixels_inside_wrap ##### -->
<para> <para>
Pixels of blank space to leave between wrapped lines inside the same
newline-terminated line (paragraph).
</para> </para>
<!-- ##### ARG GtkTextTag:right_margin ##### --> <!-- ##### ARG GtkTextTag:right_margin ##### -->
<para> <para>
Pixel width of right margin.
</para> </para>
<!-- ##### ARG GtkTextTag:strikethrough ##### --> <!-- ##### ARG GtkTextTag:strikethrough ##### -->
<para> <para>
%TRUE to draw a line through the text.
</para> </para>
<!-- ##### ARG GtkTextTag:underline ##### --> <!-- ##### ARG GtkTextTag:underline ##### -->
<para> <para>
A #PangoUnderline value.
</para> </para>
<!-- ##### ARG GtkTextTag:wrap_mode ##### --> <!-- ##### ARG GtkTextTag:wrap_mode ##### -->
<para> <para>
A #GtkWrapMode value. Only used if the tag applies to the first
character in a paragraph.
</para> </para>
<!-- ##### ARG GtkTextTag:tabs ##### --> <!-- ##### ARG GtkTextTag:tabs ##### -->
<para> <para>
A #PangoTabArray indicating tabs for this text. Only used if the tag
applies to the first character in a paragraph.
</para> </para>
<!-- ##### ARG GtkTextTag:background_set ##### --> <!-- ##### ARG GtkTextTag:background_set ##### -->