summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-11-05 16:09:04 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-11-05 16:09:04 +0000
commit3f17a1113721ce8bd85681eb55be39b4ad1eefbd (patch)
treec56ae3cb176f9de74c2d3eec0e1c65ec5bf9e7f7 /docs
parentab6b184e9d7b9dbb50e3571b26e32f5c1a74bdce (diff)
downloadgdk-pixbuf-3f17a1113721ce8bd85681eb55be39b4ad1eefbd.tar.gz
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
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/ChangeLog6
-rw-r--r--docs/reference/gtk/text_widget.sgml21
-rw-r--r--docs/reference/gtk/tmpl/gtk-unused.sgml20
-rw-r--r--docs/reference/gtk/tmpl/gtktexttag.sgml69
4 files changed, 67 insertions, 49 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 12b5a9c42..a6949f877 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -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>
* gtk/gtk-sections.txt: Added a bunch of stuff from unused
diff --git a/docs/reference/gtk/text_widget.sgml b/docs/reference/gtk/text_widget.sgml
index 80cd81d2e..47ef788f5 100644
--- a/docs/reference/gtk/text_widget.sgml
+++ b/docs/reference/gtk/text_widget.sgml
@@ -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
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
-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
<link linkend="GtkTextTag">GtkTextTag</link> object. One <link
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>
might look like this:
<programlisting>
+ GtkWidget *view;
+ GtkTextBuffer *buffer;
- /* Get a buffer (it's a GObject, not a GtkObject, so we own a reference
- * after this). Passing NULL as argument causes an empty tag table to be
- * automatically created.
- */
-
- buffer = gtk_text_buffer_new (NULL);
+ view = gtk_text_view_new ();
- view = gtk_text_view_new_with_buffer (buffer);
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
- /* view holds a reference now */
- g_object_unref (G_OBJECT (buffer));
+ gtk_text_buffer_set_text (buffer, "Hello, this is some text");
/* 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
* will be emitted, such as "changed", "insert_text", and so on.
*/
</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>
</refsect1>
diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml
index c71e6595b..f4234a59c 100644
--- a/docs/reference/gtk/tmpl/gtk-unused.sgml
+++ b/docs/reference/gtk/tmpl/gtk-unused.sgml
@@ -541,21 +541,21 @@ The first "flat" (no struct) enumerated type value.
@func_data:
@args:
-<!-- ##### MACRO GTK_PRIVATE_UNSET_FLAG ##### -->
+<!-- ##### FUNCTION gtk_window_set_focus ##### -->
<para>
</para>
-@wid:
-@flag:
+@window:
+@focus:
-<!-- ##### FUNCTION gtk_window_set_focus ##### -->
+<!-- ##### MACRO GTK_PRIVATE_UNSET_FLAG ##### -->
<para>
</para>
-@window:
-@focus:
+@wid:
+@flag:
<!-- ##### MACRO gtk_marshal_NONE__BOXED ##### -->
<para>
@@ -799,6 +799,10 @@ The pointer is allocated just for you: you must g_free() it.
@func_data:
@args:
+<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Short_Description ##### -->
+
+
+
<!-- ##### FUNCTION gtk_text_mark_deleted ##### -->
<para>
@@ -807,10 +811,6 @@ The pointer is allocated just for you: you must g_free() it.
@mark:
@Returns:
-<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Short_Description ##### -->
-
-
-
<!-- ##### FUNCTION gtk_text_buffer_cut ##### -->
<para>
diff --git a/docs/reference/gtk/tmpl/gtktexttag.sgml b/docs/reference/gtk/tmpl/gtktexttag.sgml
index c15c14299..01e74955c 100644
--- a/docs/reference/gtk/tmpl/gtktexttag.sgml
+++ b/docs/reference/gtk/tmpl/gtktexttag.sgml
@@ -41,12 +41,12 @@ types related to the text widget and how they work together.
<!-- ##### ENUM GtkWrapMode ##### -->
<para>
-
+Describes a type of line wrapping.
</para>
-@GTK_WRAPMODE_NONE:
-@GTK_WRAPMODE_CHAR:
-@GTK_WRAPMODE_WORD:
+@GTK_WRAPMODE_NONE: don't wrap lines; just use scrollbars
+@GTK_WRAPMODE_CHAR: allow line breaks between any two characters
+@GTK_WRAPMODE_WORD: allow line breaks only between words
<!-- ##### STRUCT GtkTextAttributes ##### -->
<para>
@@ -176,127 +176,138 @@ types related to the text widget and how they work together.
<!-- ##### ARG GtkTextTag:name ##### -->
<para>
-
+Name of the tag, or NULL for anonymous tags. Can only be set
+when the tag is created.
</para>
<!-- ##### ARG GtkTextTag:background ##### -->
<para>
-
+Background color, as a string such as "red" or "#FFFFFF"
</para>
<!-- ##### ARG GtkTextTag:background_gdk ##### -->
<para>
-
+Background color, as a #GdkColor.
</para>
<!-- ##### ARG GtkTextTag:background_full_height ##### -->
<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>
<!-- ##### ARG GtkTextTag:background_stipple ##### -->
<para>
-
+A #GdkBitmap to use for stippling the background color.
</para>
<!-- ##### ARG GtkTextTag:direction ##### -->
<para>
-
+The #GtkTextDirection for the tagged text.
</para>
<!-- ##### ARG GtkTextTag:editable ##### -->
<para>
-
+Whether the user can modify the tagged text.
</para>
<!-- ##### ARG GtkTextTag:font ##### -->
<para>
-
+Font as a Pango font name, e.g. "Sans Italic 12"
</para>
<!-- ##### ARG GtkTextTag:font_desc ##### -->
<para>
-
+Font as a #PangoFontDescription.
</para>
<!-- ##### ARG GtkTextTag:foreground ##### -->
<para>
-
+Foreground color as a string such as "red" or "#FFFFFF".
</para>
<!-- ##### ARG GtkTextTag:foreground_gdk ##### -->
<para>
-
+Foreground color as a #GdkColor.
</para>
<!-- ##### ARG GtkTextTag:foreground_stipple ##### -->
<para>
-
+A #GdkBitmap to use as a stipple pattern for the foreground.
</para>
<!-- ##### ARG GtkTextTag:justify ##### -->
<para>
-
+A #GtkJustification for the text. This is only used when the tag is
+applied to the first character in a paragraph.
</para>
<!-- ##### ARG GtkTextTag:language ##### -->
<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>
<!-- ##### ARG GtkTextTag:left_margin ##### -->
<para>
-
+Pixel width of left margin of the text.
</para>
<!-- ##### ARG GtkTextTag:left_wrapped_line_margin ##### -->
<para>
-
+Pixel width of the left margin of the text for lines after the first
+line in a wrapped paragraph.
</para>
<!-- ##### ARG GtkTextTag:offset ##### -->
<para>
-
+Pixels to offset the text horizontally or vertically, useful to
+produce superscript and subscript.
</para>
<!-- ##### ARG GtkTextTag:pixels_above_lines ##### -->
<para>
-
+Pixels of blank space to leave above each newline-terminated line.
</para>
<!-- ##### ARG GtkTextTag:pixels_below_lines ##### -->
<para>
-
+Pixels of blank space to leave below each newline-terminated line.
</para>
<!-- ##### ARG GtkTextTag:pixels_inside_wrap ##### -->
<para>
-
+Pixels of blank space to leave between wrapped lines inside the same
+newline-terminated line (paragraph).
</para>
<!-- ##### ARG GtkTextTag:right_margin ##### -->
<para>
-
+Pixel width of right margin.
</para>
<!-- ##### ARG GtkTextTag:strikethrough ##### -->
<para>
-
+%TRUE to draw a line through the text.
</para>
<!-- ##### ARG GtkTextTag:underline ##### -->
<para>
-
+A #PangoUnderline value.
</para>
<!-- ##### ARG GtkTextTag:wrap_mode ##### -->
<para>
-
+A #GtkWrapMode value. Only used if the tag applies to the first
+character in a paragraph.
</para>
<!-- ##### ARG GtkTextTag:tabs ##### -->
<para>
-
+A #PangoTabArray indicating tabs for this text. Only used if the tag
+applies to the first character in a paragraph.
</para>
<!-- ##### ARG GtkTextTag:background_set ##### -->