gtk.entry_buffer

Module for [EntryBuffer] class

Types 3

A [gtk.entry_buffer.EntryBuffer] hold the text displayed in a [gtk.text.Text] widget.

A single [gtk.entry_buffer.EntryBuffer] object can be shared by multiple widgets which will then share the same text content, but not the cursor position, visibility attributes, icon etc.

[gtk.entry_buffer.EntryBuffer] may be derived from. Such a derived class might allow text to be stored in an alternate location, such as non-pageable memory, useful in the case of important passwords. Or a derived class could integrate with an application’s concept of undo/redo.

Methods
GType _gType() @property
EntryBuffer self()Returns `this`, for use in `with` statements.
EntryBufferGidBuilder builder()Get builder for [gtk.entry_buffer.EntryBuffer] Returns: New builder object
uint length() @propertyGet `length` property. Returns: The length (in characters) of the text in buffer.
int maxLength() @propertyGet `maxLength` property. Returns: The maximum length (in characters) of the text in the buffer.
void maxLength(int propval) @propertySet `maxLength` property. Params: propval = The maximum length (in characters) of the text in the buffer.
string text() @propertyGet `text` property. Returns: The contents of the buffer.
void text(string propval) @propertySet `text` property. Params: propval = The contents of the buffer.
uint deleteText(uint position, int nChars)Deletes a sequence of characters from the buffer.
void emitDeletedText(uint position, uint nChars)Used when subclassing [gtk.entry_buffer.EntryBuffer].
void emitInsertedText(uint position, string chars)Used when subclassing [gtk.entry_buffer.EntryBuffer].
size_t getBytes()Retrieves the length in bytes of the buffer.
uint getLength()Retrieves the length in characters of the buffer. Returns: The number of characters in the buffer.
int getMaxLength()Retrieves the maximum allowed length of the text in buffer. Returns: the maximum allowed number of characters in [gtk.entry_buffer.EntryBuffer], or 0 if there is no maximum.
string getText()Retrieves the contents of the buffer.
uint insertText(uint position, string chars)Inserts n_chars characters of chars into the contents of the buffer, at position position.
void setMaxLength(int maxLength)Sets the maximum allowed length of the contents of the buffer.
void setText(string chars)Sets the text in the buffer.
gulong connectDeletedText(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == uint))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == uint))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gtk.entry_buffer.EntryBuffer))) && Parameters!T.length < 4)Connect to `DeletedText` signal.
gulong connectInsertedText(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == uint))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == string))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gtk.entry_buffer.EntryBuffer))) && Parameters!T.length < 4)Connect to `InsertedText` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(string initialChars = null)Create a new [gtk.entry_buffer.EntryBuffer] object.
Methods
T maxLength(int propval)Set `maxLength` property. Params: propval = The maximum length (in characters) of the text in the buffer. Returns: Builder instance for fluent chaining
T text(string propval)Set `text` property. Params: propval = The contents of the buffer. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.entry_buffer.EntryBuffer]