GtkText
Editable text-display widget.
Object Hierarchy
Direct subclasses
None.
Description
GtkText provides a scrolling widget with a white
background which can have text strings passed to it programmatically or
directly from the keyboard (if it is set to be editable). There are a
number of keybindings for the editing features; these are listed under
GtkEditable, as they are generally shared by the
GtkEntry widget.
GtkText is one of two widgets marked as
BROKEN throughout the 1.3 series of GTK+ releases,
and is being replaced entirely by a new set of text and editing widgets
in GTK 2.0. If you can avoid using it, do so. If you can't, be aware
that it has issues which are never going to be fixed.
One of these issues is that the horizontal
GtkAdjustment does not work in the
GtkText widget, and that trying to declare it as
anything other than NULL causes the application to
stall. There is no problem with the vertical adjustment, and a vertical
scrollbar associated with the text widget will work just fine.
Another feature is that it cannot cope with very frequent text updates
for long, that being when you're most likely to generate a string that
is too big for its XWindow to handle. You may find it better to use a
GtkCList if you are using it to display
the output for any form of network monitoring, for example.
There is also a problem with the linewrap when the
GtkText widget is utilised under Windows, causing
it to display 'little black boxes' at every soft wrap. You can get
around this by using PHP's wordwrap() function to
create a line-end within the GTK line-end, but bear in mind that PHP
uses a given number of characters to determine the length of the line,
whereas GTK uses pixels to configure the relationship between the font
size, the line-end, and the container's border.
See also: GtkEditable,
GdkFont,
GtkFontSelectionDialog.
A final note: the signal set_scroll_adjustments has
not been covered here as it is purely used internally to allow the text
widget to communicate with scrolling-aware container widgets.
Constructor
--
Creates a scrollable text widget.
Properties
hadj:??
Horizontal adjustment. *broken*
vadj:??
Vertical adjustment.