11.55Class GtkEntryBuffer

Text buffer for GtkEntry

Class GtkEntryBuffer( [initial_text] )
initial_text (string) Optionally, specify initial text to set in the buffer.

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
get_bytesRetrieves the length in bytes of the buffer.
get_lengthRetrieves the length in characters of the buffer.
get_max_lengthRetrieves the maximum allowed length of the text in buffer.
get_textRetrieves the contents of the buffer.
set_max_lengthSets the maximum allowed length of the contents of the buffer.
set_textSets the text in the buffer.

Methods

get_bytes

Retrieves the length in bytes of the buffer.

GtkEntryBuffer.get_bytes()
ReturnThe byte length of the buffer.

See get_length().

get_length

Retrieves the length in characters of the buffer.

GtkEntryBuffer.get_length()
ReturnThe number of characters in the buffer.

get_max_length

Retrieves the maximum allowed length of the text in buffer.

GtkEntryBuffer.get_max_length()
Returnthe maximum allowed number of characters in GtkEntryBuffer, or 0 if there is no maximum.

See set_max_length().

get_text

Retrieves the contents of the buffer.

GtkEntryBuffer.get_text()
Return(string) contents of buffer

The memory pointer returned by this call will not change unless this object emits a signal, or is finalized.

set_max_length

Sets the maximum allowed length of the contents of the buffer.

GtkEntryBuffer.set_max_length( max_length )
max_length the maximum length of the entry buffer, or 0 for no maximum.

If the current contents are longer than the given length, then they will be truncated to fit.

set_text

Sets the text in the buffer.

GtkEntryBuffer.set_text( text )
text the new text

This is roughly equivalent to calling delete_text() and insert_text().

Made with http://www.falconpl.org