This widget displays any given text that can be manipulated by both the user and the programmer. The text can optionally be interactively modified by the user. Different colors and fonts can be used for any given part of the text. The background can have any color, or even be a pixmap.
Widget Hierarchy |
---|
Gtk_Object (see section Package Gtk.Object) \___ Gtk_Widget (see section Package Gtk.Widget) \___ Gtk_Editable (see section Package Gtk.Editable) \___ Gtk_Text (see section Package Gtk.Text) |
Subprograms |
---|
procedure Gtk_New (Text : out Gtk_Text; Hadj : in Adjustment.Gtk_Adjustment := Adjustment.Null_Adjustment; Vadj : in Adjustment.Gtk_Adjustment := Adjustment.Null_Adjustment); | ||
Create a new text widget with the given adjustments. | ||
function Get_Type return Gtk.Gtk_Type; | ||
Return the internal value associated with a Gtk_Text.
| ||
function Get_Text_Area (Text : access Gtk_Text_Record) return Gdk.Window.Gdk_Window; | ||
Return the specific window into which the text is displayed. | ||
function Backward_Delete (Text : access Gtk_Text_Record; Nchars : in Guint) return Boolean; | ||
Backward delete Nchars characters from the current cursor position. | ||
function Forward_Delete (Text : access Gtk_Text_Record; Nchars : in Guint) return Boolean; | ||
Forward delete Nchars characters from the current point position. | ||
procedure Freeze (Text : access Gtk_Text_Record); | ||
Freeze the Gtk_Text widget.
Note that you can not call Set_Position while the widget is frozen.
This will create a Storage_Error otherwise.
| ||
procedure Thaw (Text : access Gtk_Text_Record); | ||
Cancel the previous call to Freeze. | ||
function Get_Hadj (Text : access Gtk_Text_Record) return Gtk.Adjustment.Gtk_Adjustment; | ||
Return the horizontal scrollbar associated with Text.
| ||
function Get_Vadj (Text : access Gtk_Text_Record) return Gtk.Adjustment.Gtk_Adjustment; | ||
Return the vertical scrollbar associated to the given text widget.
| ||
function Get_Length (Text : access Gtk_Text_Record) return Guint; | ||
Return the total length of the text contained within the text widget.
| ||
function Get_Point (Text : access Gtk_Text_Record) return Guint; | ||
Get the current position of the insertion point (cursor). | ||
procedure Set_Point (Text : access Gtk_Text_Record; Index : in Guint); | ||
Set the insertion point position. | ||
procedure Insert (Text : access Gtk_Text_Record; Font : in Gdk.Font.Gdk_Font := Gdk.Font.Null_Font; Fore : in Gdk.Color.Gdk_Color := Gdk.Color.Null_Color; Back : in Gdk.Color.Gdk_Color := Gdk.Color.Null_Color; Chars : in String := ""; Length : in Gint := -1); | ||
Insert the given string (Chars) inside the text of the text widget. | ||
procedure Set_Adjustments (Text : access Gtk_Text_Record; Hadj : Gtk.Adjustment.Gtk_Adjustment; Vadj : Gtk.Adjustment.Gtk_Adjustment); | ||
Set the horizontal and vertical adjustments associated with Text.
| ||
procedure Set_Editable (Text : access Gtk_Text_Record; Editable : in Boolean := True); | ||
Toggle the editable state of the given text widget. | ||
procedure Set_Line_Wrap (Text : access Gtk_Text_Record; Line_Wrap : in Boolean := True); | ||
Set the Line_Wrap state of the given text widget. | ||
procedure Set_Word_Wrap (Text : access Gtk_Text_Record; Word_Wrap : in Boolean := True); | ||
Set the Word_Wrap state of the given text widget. |