Clutter.Text¶
- Subclasses:
None
Methods¶
- Inherited:
Clutter.Actor (238), GObject.Object (37), Clutter.Animatable (5), Clutter.Container (17), Clutter.Scriptable (4)
- Structs:
Virtual Methods¶
- Inherited:
Clutter.Actor (35), GObject.Object (7), Clutter.Animatable (5), Clutter.Container (13), Clutter.Scriptable (4)
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Whether pressing return causes the activate signal to be emitted |
||
r/w |
A list of style attributes to apply to the contents of the actor |
||
r/w |
The buffer for the text |
||
r/w |
Color of the font used by the text |
||
r/w |
Cursor Color |
||
r |
Whether the cursor color has been set |
||
r/w |
The cursor position |
||
r/w |
The width of the cursor, in pixels |
||
r/w |
Whether the input cursor is visible |
||
r/w |
Whether the text is editable |
||
r/w |
The preferred place to ellipsize the string |
||
r/w |
The font description to be used |
||
r/w |
The font to be used by the text |
||
r/w |
Whether the text should be justified |
||
r/w |
The preferred alignment for the string, for multi-line text |
||
r/w |
If set, wrap the lines if the text becomes too wide |
||
r/w |
Control how line-wrapping is done |
||
r/w |
Maximum length of the text inside the actor |
||
r/w |
If non-zero, use this character to display the actor’s contents |
||
r/w |
Whether the text is selectable |
||
r/w |
Selected Text Color |
||
r |
Whether the selected text color has been set |
||
r/w |
The cursor position of the other end of the selection |
||
r/w |
Selection Color |
||
r |
Whether the selection color has been set |
||
r/w |
Whether the text should be a single line |
||
r/w |
The text to render |
||
r/w |
Whether or not the text includes Pango markup |
Signals¶
- Inherited:
Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)
Name |
Short Description |
---|---|
The |
|
The |
|
The |
|
This signal is emitted when text is deleted from the actor by the user. |
|
This signal is emitted when text is inserted into the actor by the user. |
|
The |
Fields¶
- Inherited:
Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Clutter.Text(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Clutter.Text
struct contains only private data.New in version 1.0.
- classmethod new()¶
- Returns:
the newly created
Clutter.Text
actor- Return type:
Creates a new
Clutter.Text
actor. This actor can be used to display and edit text.New in version 1.0.
- classmethod new_full(font_name, text, color)¶
- Parameters:
font_name (
str
) – a string with a font descriptiontext (
str
) – the contents of the actorcolor (
Clutter.Color
) – the color to be used to render text
- Returns:
the newly created
Clutter.Text
actor- Return type:
Creates a new
Clutter.Text
actor, using font_name as the font description; text will be used to set the contents of the actor; and color will be used as the color to render text.This function is equivalent to calling
Clutter.Text.new
(),Clutter.Text.set_font_name
(),Clutter.Text.set_text
() andClutter.Text.set_color
().New in version 1.0.
- classmethod new_with_buffer(buffer)¶
- Parameters:
buffer (
Clutter.TextBuffer
) – The buffer to use for the newClutter.Text
.- Returns:
a new
Clutter.Text
- Return type:
Creates a new entry with the specified text buffer.
New in version 1.10.
- classmethod new_with_text(font_name, text)¶
- Parameters:
- Returns:
the newly created
Clutter.Text
actor- Return type:
Creates a new
Clutter.Text
actor, using font_name as the font description; text will be used to set the contents of the actor.This function is equivalent to calling
Clutter.Text.new
(),Clutter.Text.set_font_name
(), andClutter.Text.set_text
().New in version 1.0.
- activate()¶
- Returns:
True
if the::activate
signal has been emitted, andFalse
otherwise- Return type:
Emits the
Clutter.Text
::activate
signal, if self has been set as activatable usingClutter.Text.set_activatable
().This function can be used to emit the
::activate
signal inside aClutter.Actor
::captured-event
orClutter.Actor
::key-press-event
signal handlers before the default signal handler for theClutter.Text
is invoked.New in version 1.0.
- coords_to_position(x, y)¶
- Parameters:
- Returns:
the position of the character
- Return type:
Retrieves the position of the character at the given coordinates.
New in version 1.10.
- delete_chars(n_chars)¶
- Parameters:
n_chars (
int
) – the number of characters to delete
Deletes n_chars inside a
Clutter.Text
actor, starting from the current cursor position.Somewhat awkwardly, the cursor position is decremented by the same number of characters you’ve deleted.
New in version 1.0.
- delete_selection()¶
-
Deletes the currently selected text
This function is only useful in subclasses of
Clutter.Text
New in version 1.0.
- delete_text(start_pos, end_pos)¶
-
Deletes the text inside a
Clutter.Text
actor between start_pos and end_pos.The starting and ending positions are expressed in characters, not in bytes.
New in version 1.0.
- get_activatable()¶
-
Retrieves whether a
Clutter.Text
is activatable or not.New in version 1.0.
- get_attributes()¶
- Returns:
the attribute list, or
None
if none was set. The returned value is owned by theClutter.Text
and should not be unreferenced.- Return type:
Gets the attribute list that was set on the
Clutter.Text
actorClutter.Text.set_attributes
(), if any.New in version 1.0.
- get_buffer()¶
- Returns:
A #GtkEntryBuffer object.
- Return type:
Get the
Clutter.TextBuffer
object which holds the text for this widget.New in version 1.10.
- get_chars(start_pos, end_pos)¶
- Parameters:
- Returns:
a newly allocated string with the contents of the text actor between the specified positions. Use
GLib.free
() to free the resources when done- Return type:
Retrieves the contents of the
Clutter.Text
actor between start_pos and end_pos, but not including end_pos.The positions are specified in characters, not in bytes.
New in version 1.0.
- get_color()¶
- Returns:
return location for a
Clutter.Color
- Return type:
color:
Clutter.Color
Retrieves the text color as set by
Clutter.Text.set_color
().New in version 1.0.
- get_cursor_color()¶
- Returns:
return location for a
Clutter.Color
- Return type:
color:
Clutter.Color
Retrieves the color of the cursor of a
Clutter.Text
actor.New in version 1.0.
- get_cursor_position()¶
- Returns:
the cursor position, in characters
- Return type:
Retrieves the cursor position.
New in version 1.0.
- get_cursor_rect()¶
- Returns:
return location of a
Clutter.Rect
- Return type:
rect:
Clutter.Rect
Retrieves the rectangle that contains the cursor.
The coordinates of the rectangle’s origin are in actor-relative coordinates.
New in version 1.16.
- get_cursor_size()¶
- Returns:
the size of the cursor, in pixels
- Return type:
Retrieves the size of the cursor of a
Clutter.Text
actor.New in version 1.0.
- get_cursor_visible()¶
-
Retrieves whether the cursor of a
Clutter.Text
actor is visible.New in version 1.0.
- get_editable()¶
-
Retrieves whether a
Clutter.Text
is editable or not.New in version 1.0.
- get_ellipsize()¶
- Returns:
- Return type:
Returns the ellipsizing position of a
Clutter.Text
actor, as set byClutter.Text.set_ellipsize
().New in version 1.0.
- get_font_description()¶
- Returns:
a
Pango.FontDescription
. The returned value is owned by theClutter.Text
actor and it should not be modified or freed- Return type:
Retrieves the
Pango.FontDescription
used by selfNew in version 1.2.
- get_font_name()¶
- Returns:
a string containing the font name. The returned string is owned by the
Clutter.Text
actor and should not be modified or freed- Return type:
Retrieves the font name as set by
Clutter.Text.set_font_name
().New in version 1.0.
- get_justify()¶
-
Retrieves whether the
Clutter.Text
actor should justify its contents on both margins.New in version 0.6.
- get_layout()¶
- Returns:
a
Pango.Layout
. The returned object is owned by theClutter.Text
actor and should not be modified or freed- Return type:
Retrieves the current
Pango.Layout
used by aClutter.Text
actor.New in version 1.0.
- get_layout_offsets()¶
- Returns:
- Return type:
Obtains the coordinates where the
Clutter.Text
will draw thePango.Layout
representing the text.New in version 1.8.
- get_line_alignment()¶
- Returns:
- Return type:
Retrieves the alignment of a
Clutter.Text
, as set byClutter.Text.set_line_alignment
().New in version 1.0.
- get_line_wrap()¶
- Returns:
True
if theClutter.Text
actor should wrap its contents- Return type:
Retrieves the value set using
Clutter.Text.set_line_wrap
().New in version 1.0.
- get_line_wrap_mode()¶
- Returns:
the wrap mode used by the
Clutter.Text
- Return type:
Retrieves the line wrap mode used by the
Clutter.Text
actor.See
Clutter.Text.set_line_wrap_mode
().New in version 1.0.
- get_max_length()¶
- Returns:
the maximum number of characters.
- Return type:
Gets the maximum length of text that can be set into a text actor.
See
Clutter.Text.set_max_length
().New in version 1.0.
- get_password_char()¶
- Returns:
a Unicode character or 0 if the password character is not set
- Return type:
Retrieves the character to use in place of the actual text as set by
Clutter.Text.set_password_char
().New in version 1.0.
- get_selectable()¶
-
Retrieves whether a
Clutter.Text
is selectable or not.New in version 1.0.
- get_selected_text_color()¶
- Returns:
return location for a
Clutter.Color
- Return type:
color:
Clutter.Color
Retrieves the color of selected text of a
Clutter.Text
actor.New in version 1.8.
- get_selection()¶
- Returns:
a newly allocated string containing the currently selected text, or
None
. UseGLib.free
() to free the returned string.- Return type:
Retrieves the currently selected text.
New in version 1.0.
- get_selection_bound()¶
- Returns:
the position of the other end of the selection
- Return type:
Retrieves the other end of the selection of a
Clutter.Text
actor, in characters from the current cursor position.New in version 1.0.
- get_selection_color()¶
- Returns:
return location for a
Clutter.Color
- Return type:
color:
Clutter.Color
Retrieves the color of the selection of a
Clutter.Text
actor.New in version 1.0.
- get_single_line_mode()¶
- Returns:
True
if theClutter.Text
actor is in single line mode- Return type:
Retrieves whether the
Clutter.Text
actor is in single line mode.New in version 1.0.
- get_text()¶
- Returns:
the contents of the actor. The returned string is owned by the
Clutter.Text
actor and should never be modified or freed- Return type:
Retrieves a pointer to the current contents of a
Clutter.Text
actor.If you need a copy of the contents for manipulating, either use
GLib.strdup
() on the returned string, or use:copy = clutter_text_get_chars (text, 0, -1);
Which will return a newly allocated string.
If the
Clutter.Text
actor is empty, this function will return an empty string, and notNone
.New in version 1.0.
- get_use_markup()¶
-
Retrieves whether the contents of the
Clutter.Text
actor should be parsed for the Pango text markup.New in version 1.0.
- insert_text(text, position)¶
- Parameters:
Inserts text into a
Clutter.Actor
at the given position.If position is a negative number, the text will be appended at the end of the current contents of the
Clutter.Text
.The position is expressed in characters, not in bytes.
New in version 1.0.
- insert_unichar(wc)¶
- Parameters:
wc (
str
) – a Unicode character
Inserts wc at the current cursor position of a
Clutter.Text
actor.New in version 1.0.
- position_to_coords(position)¶
- Parameters:
position (
int
) – position in characters- Returns:
True
if the conversion was successful- Return type:
Retrieves the coordinates of the given position.
New in version 1.0.
- set_activatable(activatable)¶
- Parameters:
activatable (
bool
) – whether theClutter.Text
actor should be activatable
Sets whether a
Clutter.Text
actor should be activatable.An activatable
Clutter.Text
actor will emit theClutter.Text
::activate
signal whenever the ‘Enter’ (or ‘Return’) key is pressed; if it is not activatable, a new line will be appended to the current content.An activatable
Clutter.Text
must also be set as editable usingClutter.Text.set_editable
().New in version 1.0.
- set_attributes(attrs)¶
- Parameters:
attrs (
Pango.AttrList
orNone
) – aPango.AttrList
orNone
to unset the attributes
Sets the attributes list that are going to be applied to the
Clutter.Text
contents.The
Clutter.Text
actor will take a reference on thePango.AttrList
passed to this function.New in version 1.0.
- set_buffer(buffer)¶
- Parameters:
buffer (
Clutter.TextBuffer
) – aClutter.TextBuffer
Set the
Clutter.TextBuffer
object which holds the text for this widget.New in version 1.10.
- set_color(color)¶
- Parameters:
color (
Clutter.Color
) – aClutter.Color
Sets the color of the contents of a
Clutter.Text
actor.The overall opacity of the
Clutter.Text
actor will be the result of the alpha value of color and the composited opacity of the actor itself on the scenegraph, as returned byClutter.Actor.get_paint_opacity
().New in version 1.0.
- set_cursor_color(color)¶
- Parameters:
color (
Clutter.Color
orNone
) – the color of the cursor, orNone
to unset it
Sets the color of the cursor of a
Clutter.Text
actor.If color is
None
, the cursor color will be the same as the text color.New in version 1.0.
- set_cursor_position(position)¶
- Parameters:
position (
int
) – the new cursor position, in characters
Sets the cursor of a
Clutter.Text
actor at position.The position is expressed in characters, not in bytes.
New in version 1.0.
- set_cursor_size(size)¶
- Parameters:
size (
int
) – the size of the cursor, in pixels, or -1 to use the default value
Sets the size of the cursor of a
Clutter.Text
. The cursor will only be visible if theClutter.Text
:cursor-visible
property is set toTrue
.New in version 1.0.
- set_cursor_visible(cursor_visible)¶
- Parameters:
cursor_visible (
bool
) – whether the cursor should be visible
Sets whether the cursor of a
Clutter.Text
actor should be visible or not.The color of the cursor will be the same as the text color unless
Clutter.Text.set_cursor_color
() has been called.The size of the cursor can be set using
Clutter.Text.set_cursor_size
().The position of the cursor can be changed programmatically using
Clutter.Text.set_cursor_position
().New in version 1.0.
- set_editable(editable)¶
- Parameters:
editable (
bool
) – whether theClutter.Text
should be editable
Sets whether the
Clutter.Text
actor should be editable.An editable
Clutter.Text
with key focus set usingClutter.Actor.grab_key_focus
() orClutter.Stage.set_key_focus
() will receive key events and will update its contents accordingly.New in version 1.0.
- set_ellipsize(mode)¶
- Parameters:
mode (
Pango.EllipsizeMode
) – aPango.EllipsizeMode
Sets the mode used to ellipsize (add an ellipsis: “…”) to the text if there is not enough space to render the entire contents of a
Clutter.Text
actorNew in version 1.0.
- set_font_description(font_desc)¶
- Parameters:
font_desc (
Pango.FontDescription
) – aPango.FontDescription
Sets font_desc as the font description for a
Clutter.Text
The
Pango.FontDescription
is copied by theClutter.Text
actor so you can safely callPango.FontDescription.free
() on it after calling this function.New in version 1.2.
- set_font_name(font_name)¶
-
Sets the font used by a
Clutter.Text
. The font_name string must either beNone
, which means that the font name from the defaultClutter.Backend
will be used; or be something that can be parsed by thePango.FontDescription.from_string
() function, like:// Set the font to the system's Sans, 10 points clutter_text_set_font_name (text, "Sans 10"); // Set the font to the system's Serif, 16 pixels clutter_text_set_font_name (text, "Serif 16px"); // Set the font to Helvetica, 10 points clutter_text_set_font_name (text, "Helvetica 10");
New in version 1.0.
- set_justify(justify)¶
- Parameters:
justify (
bool
) – whether the text should be justified
Sets whether the text of the
Clutter.Text
actor should be justified on both margins. This setting is ignored if Clutter is compiled against Pango < 1.18.New in version 1.0.
- set_line_alignment(alignment)¶
- Parameters:
alignment (
Pango.Alignment
) – APango.Alignment
Sets the way that the lines of a wrapped label are aligned with respect to each other. This does not affect the overall alignment of the label within its allocated or specified width.
To align a
Clutter.Text
actor you should add it to a container that supports alignment, or use the anchor point.New in version 1.0.
- set_line_wrap(line_wrap)¶
- Parameters:
line_wrap (
bool
) – whether the contents should wrap
Sets whether the contents of a
Clutter.Text
actor should wrap, if they don’t fit the size assigned to the actor.New in version 1.0.
- set_line_wrap_mode(wrap_mode)¶
- Parameters:
wrap_mode (
Pango.WrapMode
) – the line wrapping mode
If line wrapping is enabled (see
Clutter.Text.set_line_wrap
()) this function controls how the line wrapping is performed. The default isPango.WrapMode.WORD
which means wrap on word boundaries.New in version 1.0.
- set_markup(markup)¶
- Parameters:
markup (
str
orNone
) – a string containing Pango markup. PassingNone
is the same as passing “” (the empty string)
Sets markup as the contents of a
Clutter.Text
.This is a convenience function for setting a string containing Pango markup, and it is logically equivalent to:
/* the order is important */ clutter_text_set_text (CLUTTER_TEXT (actor), markup); clutter_text_set_use_markup (CLUTTER_TEXT (actor), TRUE);
New in version 1.0.
- set_max_length(max)¶
- Parameters:
max (
int
) – the maximum number of characters allowed in the text actor; 0 to disable or -1 to set the length of the current string
Sets the maximum allowed length of the contents of the actor. If the current contents are longer than the given length, then they will be truncated to fit.
New in version 1.0.
- set_password_char(wc)¶
- Parameters:
wc (
str
) – a Unicode character, or 0 to unset the password character
Sets the character to use in place of the actual text in a password text actor.
If wc is 0 the text will be displayed as it is entered in the
Clutter.Text
actor.New in version 1.0.
- set_preedit_string(preedit_str, preedit_attrs, cursor_pos)¶
- Parameters:
Sets, or unsets, the pre-edit string. This function is useful for input methods to display a string (with eventual specific Pango attributes) before it is entered inside the
Clutter.Text
buffer.The preedit string and attributes are ignored if the
Clutter.Text
actor is not editable.This function should not be used by applications
New in version 1.2.
- set_selectable(selectable)¶
- Parameters:
selectable (
bool
) – whether theClutter.Text
actor should be selectable
Sets whether a
Clutter.Text
actor should be selectable.A selectable
Clutter.Text
will allow selecting its contents using the pointer or the keyboard.New in version 1.0.
- set_selected_text_color(color)¶
- Parameters:
color (
Clutter.Color
orNone
) – the selected text color, orNone
to unset it
Sets the selected text color of a
Clutter.Text
actor.If color is
None
, the selected text color will be the same as the selection color, which then falls back to cursor, and then text color.New in version 1.8.
- set_selection(start_pos, end_pos)¶
- Parameters:
Selects the region of text between start_pos and end_pos.
This function changes the position of the cursor to match start_pos and the selection bound to match end_pos.
New in version 1.0.
- set_selection_bound(selection_bound)¶
- Parameters:
selection_bound (
int
) – the position of the end of the selection, in characters
Sets the other end of the selection, starting from the current cursor position.
If selection_bound is -1, the selection unset.
New in version 1.0.
- set_selection_color(color)¶
- Parameters:
color (
Clutter.Color
orNone
) – the color of the selection, orNone
to unset it
Sets the color of the selection of a
Clutter.Text
actor.If color is
None
, the selection color will be the same as the cursor color, or if no cursor color is set either then it will be the same as the text color.New in version 1.0.
- set_single_line_mode(single_line)¶
- Parameters:
single_line (
bool
) – whether to enable single line mode
Sets whether a
Clutter.Text
actor should be in single line mode or not. Only editableClutter.Text
s can be in single line mode.A text actor in single line mode will not wrap text and will clip the visible area to the predefined size. The contents of the text actor will scroll to display the end of the text if its length is bigger than the allocated width.
When setting the single line mode the
Clutter.Text
:activatable
property is also set as a side effect. Instead of entering a new line character, the text actor will emit theClutter.Text
::activate
signal.New in version 1.0.
- set_text(text)¶
- Parameters:
text (
str
orNone
) – the text to set. PassingNone
is the same as passing “” (the empty string)
Sets the contents of a
Clutter.Text
actor.If the
Clutter.Text
:use-markup
property was set toTrue
it will be reset toFalse
as a side effect. If you want to maintain theClutter.Text
:use-markup
you should use theClutter.Text.set_markup
() function insteadNew in version 1.0.
- set_use_markup(setting)¶
-
Sets whether the contents of the
Clutter.Text
actor contains markup in Pango’s text markup language.Setting
Clutter.Text
:use-markup
on an editableClutter.Text
will not have any effect except hiding the markup.See also
Clutter.Text
:use-markup
.New in version 1.0.
- do_activate() virtual¶
- do_cursor_changed() virtual¶
- do_cursor_event(geometry) virtual¶
- Parameters:
geometry (
Clutter.Geometry
) –
- do_text_changed() virtual¶
Signal Details¶
- Clutter.Text.signals.activate(text)¶
- Signal Name:
activate
- Flags:
- Parameters:
text (
Clutter.Text
) – The object which received the signal
The
::activate
signal is emitted each time the actor is ‘activated’ by the user, normally by pressing the ‘Enter’ key. The signal is emitted only ifClutter.Text
:activatable
is set toTrue
.New in version 1.0.
- Clutter.Text.signals.cursor_changed(text)¶
- Signal Name:
cursor-changed
- Flags:
- Parameters:
text (
Clutter.Text
) – The object which received the signal
The
::cursor-changed
signal is emitted whenever the cursor position or size changes.New in version 1.16.
- Clutter.Text.signals.cursor_event(text, geometry)¶
- Signal Name:
cursor-event
- Flags:
- Parameters:
text (
Clutter.Text
) – The object which received the signalgeometry (
Clutter.Geometry
) – the coordinates of the cursor
The
::cursor-event
signal is emitted whenever the cursor position changes inside aClutter.Text
actor. Inside geometry it is stored the current position and size of the cursor, relative to the actor itself.New in version 1.0.
Deprecated since version 1.16: Use the
Clutter.Text
::cursor-changed
signal instead
- Clutter.Text.signals.delete_text(text, start_pos, end_pos)¶
- Signal Name:
delete-text
- Flags:
- Parameters:
text (
Clutter.Text
) – The object which received the signalstart_pos (
int
) – the starting positionend_pos (
int
) – the end position
This signal is emitted when text is deleted from the actor by the user. It is emitted before self text changes.
New in version 1.2.
- Clutter.Text.signals.insert_text(text, new_text, new_text_length, position)¶
- Signal Name:
insert-text
- Flags:
- Parameters:
text (
Clutter.Text
) – The object which received the signalnew_text (
str
) – the new text to insertnew_text_length (
int
) – the length of the new text, in bytes, or -1 if new_text is nul-terminatedposition (
object
orNone
) – the position, in characters, at which to insert the new text. this is an in-out parameter. After the signal emission is finished, it should point after the newly inserted text.
This signal is emitted when text is inserted into the actor by the user. It is emitted before self text changes.
New in version 1.2.
- Clutter.Text.signals.text_changed(text)¶
- Signal Name:
text-changed
- Flags:
- Parameters:
text (
Clutter.Text
) – The object which received the signal
The
::text-changed
signal is emitted after actor's text changesNew in version 1.0.
Property Details¶
- Clutter.Text.props.activatable¶
-
Toggles whether return invokes the activate signal or not.
New in version 1.0.
- Clutter.Text.props.attributes¶
- Name:
attributes
- Type:
- Default Value:
- Flags:
A list of #PangoStyleAttribute s to be applied to the contents of the
Clutter.Text
actor.New in version 1.0.
- Clutter.Text.props.buffer¶
- Name:
buffer
- Type:
- Default Value:
- Flags:
The buffer which stores the text for this
Clutter.Text
.If set to
None
, a default buffer will be created.New in version 1.8.
- Clutter.Text.props.color¶
- Name:
color
- Type:
- Default Value:
<Color structure at 0x000000000000 (ClutterColor at 0x0000000)>
- Flags:
The color used to render the text.
New in version 1.0.
- Clutter.Text.props.cursor_color¶
- Name:
cursor-color
- Type:
- Default Value:
<Color structure at 0x000000000000 (ClutterColor at 0x0000000)>
- Flags:
The color of the cursor.
New in version 1.0.
- Clutter.Text.props.cursor_color_set¶
-
Will be set to
True
ifClutter.Text
:cursor-color
has been set.New in version 1.0.
- Clutter.Text.props.cursor_position¶
-
The current input cursor position. -1 is taken to be the end of the text
New in version 1.12.
- Clutter.Text.props.cursor_size¶
-
The size of the cursor, in pixels. If set to -1 the size used will be the default cursor size of 2 pixels.
New in version 1.0.
- Clutter.Text.props.cursor_visible¶
-
Whether the input cursor is visible or not.
The cursor will only be visible if this property and either the
Clutter.Text
:editable
or theClutter.Text
:selectable
properties are set toTrue
.New in version 1.0.
- Clutter.Text.props.editable¶
-
Whether key events delivered to the actor causes editing.
New in version 1.0.
- Clutter.Text.props.ellipsize¶
- Name:
ellipsize
- Type:
- Default Value:
- Flags:
The preferred place to ellipsize the contents of the
Clutter.Text
actorNew in version 1.0.
- Clutter.Text.props.font_description¶
- Name:
font-description
- Type:
- Default Value:
- Flags:
The
Pango.FontDescription
that should be used by theClutter.Text
If you have a string describing the font then you should look at
Clutter.Text
:font-name
insteadNew in version 1.2.
- Clutter.Text.props.font_name¶
-
The font to be used by the
Clutter.Text
, as a string that can be parsed byPango.FontDescription.from_string
().If set to
None
, the default system font will be used instead.New in version 1.0.
- Clutter.Text.props.justify¶
-
Whether the contents of the
Clutter.Text
should be justified on both margins.New in version 1.0.
- Clutter.Text.props.line_alignment¶
- Name:
line-alignment
- Type:
- Default Value:
- Flags:
The preferred alignment for the text. This property controls the alignment of multi-line paragraphs.
New in version 1.0.
- Clutter.Text.props.line_wrap¶
-
Whether to wrap the lines of
Clutter.Text
:text
if the contents exceed the available allocation. The wrapping strategy is controlled by theClutter.Text
:line-wrap-mode
property.New in version 1.0.
- Clutter.Text.props.line_wrap_mode¶
- Name:
line-wrap-mode
- Type:
- Default Value:
- Flags:
If
Clutter.Text
:line-wrap
is set toTrue
, this property will control how the text is wrapped.New in version 1.0.
- Clutter.Text.props.max_length¶
-
The maximum length of the contents of the
Clutter.Text
actor.New in version 1.0.
- Clutter.Text.props.password_char¶
-
If non-zero, the character that should be used in place of the actual text in a password text actor.
New in version 1.0.
- Clutter.Text.props.selectable¶
-
Whether it is possible to select text, either using the pointer or the keyboard.
This property depends on the
Clutter.Actor
:reactive
property being set toTrue
.New in version 1.0.
- Clutter.Text.props.selected_text_color¶
- Name:
selected-text-color
- Type:
- Default Value:
<Color structure at 0x000000000000 (ClutterColor at 0x0000000)>
- Flags:
The color of selected text.
New in version 1.8.
- Clutter.Text.props.selected_text_color_set¶
-
Will be set to
True
ifClutter.Text
:selected-text-color
has been set.New in version 1.8.
- Clutter.Text.props.selection_bound¶
-
The current input cursor position. -1 is taken to be the end of the text
New in version 1.0.
- Clutter.Text.props.selection_color¶
- Name:
selection-color
- Type:
- Default Value:
<Color structure at 0x000000000000 (ClutterColor at 0x0000000)>
- Flags:
The color of the selection.
New in version 1.0.
- Clutter.Text.props.selection_color_set¶
-
Will be set to
True
ifClutter.Text
:selection-color
has been set.New in version 1.0.
- Clutter.Text.props.single_line_mode¶
-
Whether the
Clutter.Text
actor should be in single line mode or not. A single lineClutter.Text
actor will only contain a single line of text, scrolling it in case its length is bigger than the allocated size.Setting this property will also set the
Clutter.Text
:activatable
property as a side-effect.The
Clutter.Text
:single-line-mode
property is used only if theClutter.Text
:editable
property is set toTrue
.New in version 1.0.
- Clutter.Text.props.text¶
-
The text to render inside the actor.
New in version 1.0.
- Clutter.Text.props.use_markup¶
-
Whether the text includes Pango markup.
For more informations about the Pango markup format, see
Pango.Layout.set_markup
() in the Pango documentation.It is not possible to round-trip this property between
True
andFalse
. Once a string with markup has been set on aClutter.Text
actor with:use-markup
set toTrue
, the markup is stripped from the string.New in version 1.0.