Module GText


module GText: sig .. end
The text widget and associated objects
GTK documentation: TextWidget

The text widget and associated objects
type mark = [ `INSERT | `MARK of Gtk.text_mark | `NAME of string | `SEL_BOUND ] 
class child_anchor : Gtk.text_child_anchor -> object .. end

val child_anchor : unit -> child_anchor

GtkTextTag


type tag_property = [ `BACKGROUND of string
| `BACKGROUND_FULL_HEIGHT of bool
| `BACKGROUND_FULL_HEIGHT_SET of bool
| `BACKGROUND_GDK of Gdk.color
| `BACKGROUND_SET of bool
| `BACKGROUND_STIPPLE of Gdk.bitmap
| `BACKGROUND_STIPPLE_SET of bool
| `DIRECTION of Gtk.Tags.text_direction
| `EDITABLE of bool
| `EDITABLE_SET of bool
| `FAMILY of string
| `FAMILY_SET of bool
| `FONT of string
| `FONT_DESC of Pango.font_description
| `FOREGROUND of string
| `FOREGROUND_GDK of Gdk.color
| `FOREGROUND_SET of bool
| `FOREGROUND_STIPPLE of Gdk.bitmap
| `FOREGROUND_STIPPLE_SET of bool
| `INDENT of int
| `INDENT_SET of bool
| `INVISIBLE of bool
| `INVISIBLE_SET of bool
| `JUSTIFICATION of Gtk.Tags.justification
| `JUSTIFICATION_SET of bool
| `LANGUAGE of string
| `LANGUAGE_SET of bool
| `LEFT_MARGIN of int
| `LEFT_MARGIN_SET of bool
| `PIXELS_ABOVE_LINES of int
| `PIXELS_ABOVE_LINES_SET of bool
| `PIXELS_BELOW_LINES of int
| `PIXELS_BELOW_LINES_SET of bool
| `PIXELS_INSIDE_WRAP of int
| `PIXELS_INSIDE_WRAP_SET of bool
| `RIGHT_MARGIN of int
| `RIGHT_MARGIN_SET of bool
| `RISE of int
| `RISE_SET of bool
| `SCALE of Pango.Tags.scale
| `SCALE_SET of bool
| `SIZE of int
| `SIZE_POINTS of float
| `SIZE_SET of bool
| `STRETCH of Pango.Tags.stretch
| `STRETCH_SET of bool
| `STRIKETHROUGH of bool
| `STRIKETHROUGH_SET of bool
| `STYLE of Pango.Tags.style
| `STYLE_SET of bool
| `TABS_SET of bool
| `UNDERLINE of Pango.Tags.underline
| `UNDERLINE_SET of bool
| `VARIANT of Pango.Tags.variant
| `VARIANT_SET of bool
| `WEIGHT of Pango.Tags.weight
| `WEIGHT_SET of bool
| `WRAP_MODE of Gtk.Tags.wrap_mode
| `WRAP_MODE_SET of bool ]
class tag_signals : [> `texttag ] Gtk.obj -> object .. end

class tag : Gtk.text_tag -> object .. end
A tag that can be applied to text in a GText.buffer

val tag : ?name:string -> unit -> tag
GTK documentation: GtkTextTag

Text buffer iterator


type contents = [ `CHAR of Glib.unichar
| `CHILD of child_anchor
| `PIXBUF of GdkPixbuf.pixbuf
| `UNKNOWN ]

Movement functions returning an iter are truly functional i.e. the returned iter shares nothing with the originale one.

If you need to move some iter in an imperative way use #nocopy#....

class nocopy_iter : Gtk.text_iter -> object .. end

class iter : Gtk.text_iter -> object .. end

val as_iter : iter -> Gtk.text_iter
GTK documentation: gtk-GtkTextIter

GtkTextTagTable


class tag_table_signals : [> `texttagtable ] Gtk.obj -> object .. end

class tag_table_skel : [> `texttagtable ] Gtk.obj -> object .. end

class tag_table : [> `texttagtable ] Gtk.obj -> object .. end
Collection of tags that can be used together

val tag_table : unit -> tag_table
GTK documentation: GtkTextTagTable

GtkTextBuffer


class type buffer_signals_skel_type = object .. end
class virtual buffer_signals_skel : object .. end

class type ['a] buffer_signals_type = object .. end
class buffer_signals : [> `textbuffer ] Gtk.obj -> [[> `textbuffer ] as 'a] buffer_signals_type

exception No_such_mark of string
type position = [ `END
| `INSERT
| `ITER of iter
| `LINE of int
| `LINEBYTE of int * int
| `LINECHAR of int * int
| `MARK of Gtk.text_mark
| `NAME of string
| `OFFSET of int
| `SEL_BOUND
| `START ]
class buffer_skel : [> `textbuffer ] Gtk.obj -> object .. end
Stores attributed text for display in a GText.view

class buffer : [> `textbuffer ] Gtk.obj -> object .. end

val buffer : ?tag_table:tag_table -> ?text:string -> unit -> buffer
GTK documentation: GtkTextBuffer

GtkTextView


class view_signals : [> Gtk.text_view ] Gtk.obj -> object .. end

class view_skel : [> Gtk.text_view ] Gtk.obj -> object .. end
Widget that displays a GText.buffer

class view : [> Gtk.text_view ] Gtk.obj -> object .. end

val view : ?buffer:buffer ->
?editable:bool ->
?cursor_visible:bool ->
?justification:Gtk.Tags.justification ->
?wrap_mode:Gtk.Tags.wrap_mode ->
?accepts_tab:bool ->
?border_width:int ->
?width:int ->
?height:int ->
?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> view
GTK documentation: GtkTextView