package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Entry_buffer/index.html
Module Wrappers.Entry_buffer
type t = [ `entry_buffer | `object_ ] Gobject.objval new_ : string option -> int -> tCreate a new EntryBuffer
val set_text : t -> string -> int -> unitSets the text in the buffer.
This is roughly equivalent to calling method@Gtk.EntryBuffer.delete_text and method@Gtk.EntryBuffer.insert_text.
Note that @n_chars is in characters, not in bytes.
val set_max_length : t -> int -> unitSets the maximum allowed length of the contents of the buffer.
If the current contents are longer than the given length, then they will be truncated to fit.
val insert_text : t -> int -> string -> int -> intInserts @n_chars characters of @chars into the contents of the buffer, at position @position.
If @n_chars is negative, then characters from chars will be inserted until a null-terminator is found. If @position or @n_chars are out of bounds, or the maximum buffer text length is exceeded, then they are coerced to sane values.
Note that the position and length are in characters, not in bytes.
val get_text : t -> stringRetrieves the contents of the buffer.
The memory pointer returned by this call will not change unless this object emits a signal, or is finalized.
val get_max_length : t -> intRetrieves the maximum allowed length of the text in @buffer.
val get_length : t -> intRetrieves the length in characters of the buffer.
Retrieves the length in bytes of the buffer.
See method@Gtk.EntryBuffer.get_length.
val emit_inserted_text : t -> int -> string -> int -> unitUsed when subclassing `GtkEntryBuffer`.
val emit_deleted_text : t -> int -> int -> unitUsed when subclassing `GtkEntryBuffer`.
val delete_text : t -> int -> int -> intDeletes a sequence of characters from the buffer.
@n_chars characters are deleted starting at @position. If @n_chars is negative, then all characters until the end of the text are deleted.
If @position or @n_chars are out of bounds, then they are coerced to sane values.
Note that the positions are specified in characters, not bytes.
val on_deleted_text :
?after:bool ->
t ->
callback:(position:int -> n_chars:int -> unit) ->
Gobject.Signal.handler_idval on_inserted_text :
?after:bool ->
t ->
callback:(position:int -> chars:string -> n_chars:int -> unit) ->
Gobject.Signal.handler_id