gtk.entry_buffer
Module for [EntryBuffer] class
Types 3
The #GtkEntryBuffer class contains the actual text displayed in a #GtkEntry widget.
A single #GtkEntryBuffer object can be shared by multiple #GtkEntry widgets which will then share the same text content, but not the cursor position, visibility attributes, icon etc.
#GtkEntryBuffer 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
EntryBuffer self()Returns `this`, for use in `with` statements.EntryBufferGidBuilder builder()Get builder for [gtk.entry_buffer.EntryBuffer] Returns: New builder objectuint 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.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. nchars characters are deleted starting at position. If nchars is negative, then all characters until the end of the text are deleted.void emitDeletedText(uint position, uint nChars)Used when subclassing #GtkEntryBuffervoid emitInsertedText(uint position, string chars)Used when subclassing #GtkEntryBuffersize_t getBytes()Retrieves the length in bytes of the buffer. See [gtk.entry_buffer.EntryBuffer.getLength]. Returns: The byte length 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. See [gtk.entry_buffer.EntryBuffer.setMaxLength]. Returns: the maximum allowed number of characters in #GtkEntryBuffer, or 0 if there is n...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. If the current contents are longer than the given length, then they will be truncated to fit.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.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 chainingT text(string propval)Set `text` property. Params: propval = The contents of the buffer. Returns: Builder instance for fluent chainingFluent builder for [gtk.entry_buffer.EntryBuffer]
Methods