1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkText
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-10-11 20:10:52 +00:00
|
|
|
A text widget
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
2001-01-31 03:51:14 +00:00
|
|
|
<warning>
|
|
|
|
<para>
|
|
|
|
#GtkText is deprecated and unsupported. It is known to be
|
|
|
|
buggy. To use it, you must define the symbol %GTK_ENABLE_BROKEN
|
|
|
|
prior to including the GTK+ header files. Use #GtkTextView instead.
|
|
|
|
</para>
|
|
|
|
</warning>
|
2001-12-06 21:38:12 +00:00
|
|
|
A #GtkText widget allows one to display any given text and manipulate it
|
|
|
|
by deleting from one point to another, selecting a region, and various
|
|
|
|
other functions as outlined below. It is inherited from #GtkEditable.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### STRUCT GtkText ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Most of the #GtkText-struct struct members should not be accessed directly.
|
|
|
|
Listed below are a few exceptions and how to use them.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### SIGNAL GtkText::set-scroll-adjustments ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
@arg2:
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkText:hadjustment ##### -->
|
|
|
|
<para>
|
|
|
|
Used by the #GtkText widget to keep track of the size of its horizontal
|
|
|
|
text.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkText:line-wrap ##### -->
|
|
|
|
<para>
|
|
|
|
Boolean value indicating whether line wrap is enabled or not.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkText:vadjustment ##### -->
|
|
|
|
<para>
|
|
|
|
Used by the #GtkText widget to keep track of the size of its vertical
|
|
|
|
text.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkText:word-wrap ##### -->
|
|
|
|
<para>
|
|
|
|
Boolean value indicated whether word wrap is enabled or not.
|
|
|
|
</para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### STRUCT GtkTextFont ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Internal #GtkText data type.
|
|
|
|
<!-- Pretty sure.. declared in gtktext.c -->
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### STRUCT GtkPropertyMark ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Internal #GtkText data type. Should not be accessed directly.
|
|
|
|
<!-- FIXME: unsure about this -->
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@property:
|
|
|
|
@offset:
|
|
|
|
@index:
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_new ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Creates a new #GtkText widget, initialized with the given pointers to
|
|
|
|
#GtkAdjustments. These pointers can be used to track the viewing position
|
|
|
|
of the #GtkText widget. Passing %NULL to either or both of them will make
|
2003-04-07 00:16:43 +00:00
|
|
|
the #GtkText create its own. You can set these later with the function
|
2001-12-06 21:38:12 +00:00
|
|
|
gtk_text_set_adjustment().
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@hadj: horizontal adjustment.
|
|
|
|
@vadj: vertical adjustment.
|
|
|
|
@Returns: the new #GtkText widget.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_set_editable ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Sets whether the #GtkText widget can be edited by the user or not. This
|
|
|
|
still allows you the programmer to make changes with the various #GtkText
|
|
|
|
functions.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@editable: %TRUE makes it editable, %FALSE makes it immutable by the user
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_set_word_wrap ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Sets whether the #GtkText widget wraps words down to the next line if it
|
|
|
|
can't be completed on the current line.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@word_wrap: %TRUE makes it word wrap, %FALSE disables word wrapping
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_set_line_wrap ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Controls how #GtkText handles long lines of continuous text. If line wrap
|
|
|
|
is on, the line is broken when it reaches the extent of the #GtkText widget
|
|
|
|
viewing area and the rest is displayed on the next line. If it is not set,
|
|
|
|
the line continues regardless size of current viewing area. Similar to word
|
|
|
|
wrap but it disregards word boundaries.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@line_wrap: %TRUE turns line wrap on, %FALSE turns it off
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_set_adjustments ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Allows you to set #GtkAdjustment pointers which in turn allows you to
|
|
|
|
keep track of the viewing position of the #GtkText widget.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@hadj: the horizontal adjustment
|
|
|
|
@vadj: the vertical adjustment
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_set_point ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Sets the cursor at the given point. In this case a point constitutes
|
|
|
|
the number of characters from the extreme upper left corner of the #GtkText
|
|
|
|
widget.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@index: the number of characters from the upper left corner
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_get_point ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Gets the current position of the cursor as the number of characters from
|
|
|
|
the upper left corner of the #GtkText widget.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@Returns: the number of characters from the upper left corner
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_get_length ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Returns the length of the all the text contained within the #GtkText widget;
|
|
|
|
disregards current point position.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@Returns: the length of the text
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_freeze ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Freezes the #GtkText widget which disallows redrawing of the widget until
|
|
|
|
it is thawed. This is useful if a large number of changes are going to
|
|
|
|
made to the text within the widget, reducing the amount of flicker seen
|
|
|
|
by the user.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_thaw ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Allows the #GtkText widget to be redrawn again by GTK.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_insert ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Inserts given text into the #GtkText widget with the given properties as
|
|
|
|
outlined below.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@font: the #GdkFont to use
|
|
|
|
@fore: the foreground color to insert with
|
|
|
|
@back: the background color to insert with
|
|
|
|
@chars: the actual text to be inserted
|
2001-12-06 21:38:12 +00:00
|
|
|
@length: the length of the text to be inserted, passing -1 makes it insert
|
1999-08-16 18:51:52 +00:00
|
|
|
all the text.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_backward_delete ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Deletes from the current point position backward the given number of
|
|
|
|
characters.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@nchars: the number of characters to delete
|
|
|
|
@Returns: %TRUE if the operation was successful, otherwise returns %FALSE
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_text_forward_delete ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Deletes from the current point position forward the given number of
|
|
|
|
characters.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@text: the #GtkText widget
|
|
|
|
@nchars: the number of characters to delete
|
|
|
|
@Returns: %TRUE if the operation was successful, otherwise returns %FALSE
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GTK_TEXT_INDEX ##### -->
|
2001-12-06 21:38:12 +00:00
|
|
|
<para>
|
|
|
|
Returns the character at the given index within the #GtkText widget.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@t: the #GtkText widget
|
|
|
|
@index: the number of characters from the upper left corner
|
|
|
|
|
|
|
|
|