Class
ClutterTextBuffer
Description [src]
class Clutter.TextBuffer : GObject.Object
{
/* No available fields */
}
Text buffer for ClutterText
The ClutterTextBuffer
class contains the actual text displayed in a
ClutterText
widget.
A single ClutterTextBuffer
object can be shared by multiple ClutterText
widgets which will then share the same text content, but not the cursor
position, visibility attributes, icon etc.
ClutterTextBuffer
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.
Instance methods
clutter_text_buffer_delete_text
Deletes 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.
clutter_text_buffer_get_bytes
Retrieves the length in bytes of the buffer.
See clutter_text_buffer_get_length()
.
clutter_text_buffer_get_max_length
Retrieves the maximum allowed length of the text in
buffer
. See clutter_text_buffer_set_max_length()
.
clutter_text_buffer_insert_text
Inserts n_chars
characters of chars
into the contents of the
buffer, at position position
.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct ClutterTextBufferClass {
void (* inserted_text) (
ClutterTextBuffer* buffer,
guint position,
const gchar* chars,
guint n_chars
);
void (* deleted_text) (
ClutterTextBuffer* buffer,
guint position,
guint n_chars
);
const gchar* (* get_text) (
ClutterTextBuffer* buffer,
gsize* n_bytes
);
guint (* get_length) (
ClutterTextBuffer* buffer
);
guint (* insert_text) (
ClutterTextBuffer* buffer,
guint position,
const gchar* chars,
guint n_chars
);
guint (* delete_text) (
ClutterTextBuffer* buffer,
guint position,
guint n_chars
);
}
The ClutterTextBufferClass
structure contains
only private data.
Class members
inserted_text: void (* inserted_text) ( ClutterTextBuffer* buffer, guint position, const gchar* chars, guint n_chars )
Default handler for the
ClutterTextBuffer::inserted-text
signal.deleted_text: void (* deleted_text) ( ClutterTextBuffer* buffer, guint position, guint n_chars )
Default handler for the
ClutterTextBuffer::deleted-text
signal.get_text: const gchar* (* get_text) ( ClutterTextBuffer* buffer, gsize* n_bytes )
Virtual function.
get_length: guint (* get_length) ( ClutterTextBuffer* buffer )
Virtual function.
insert_text: guint (* insert_text) ( ClutterTextBuffer* buffer, guint position, const gchar* chars, guint n_chars )
Virtual function.
delete_text: guint (* delete_text) ( ClutterTextBuffer* buffer, guint position, guint n_chars )
Virtual function.
Virtual methods
Clutter.TextBufferClass.delete_text
Deletes 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.
Clutter.TextBufferClass.deleted_text
Default handler for the ClutterTextBuffer::deleted-text
signal.
Clutter.TextBufferClass.insert_text
Inserts n_chars
characters of chars
into the contents of the
buffer, at position position
.
Clutter.TextBufferClass.inserted_text
Default handler for the ClutterTextBuffer::inserted-text
signal.