Class

ClutterText

Description [src]

class Clutter.Text : Clutter.Actor
  implements Atk.ImplementorIface, Clutter.Animatable {
  /* No available fields */
}

An actor for displaying and editing text

ClutterText is an actor that displays custom text using Pango as the text rendering engine.

ClutterText also allows inline editing of the text if the actor is set editable using clutter_text_set_editable().

Selection using keyboard or pointers can be enabled using clutter_text_set_selectable().

Hierarchy

hierarchy this ClutterText implements_0 AtkImplementorIface this--implements_0 implements_1 ClutterAnimatable this--implements_1 ancestor_0 ClutterActor ancestor_0--this ancestor_1 GInitiallyUnowned ancestor_1--ancestor_0 ancestor_2 GObject ancestor_2--ancestor_1

Constructors

clutter_text_new

Creates a new ClutterText actor. This actor can be used to display and edit text.

clutter_text_new_full

Creates a new ClutterText 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.

clutter_text_new_with_buffer

Creates a new entry with the specified text buffer.

clutter_text_new_with_text

Creates a new ClutterText actor, using font_name as the font description; text will be used to set the contents of the actor.

Instance methods

clutter_text_activate

Emits the ClutterText::activate signal, if self has been set as activatable using clutter_text_set_activatable().

clutter_text_coords_to_position

Retrieves the position of the character at the given coordinates.

clutter_text_delete_chars

Deletes n_chars inside a ClutterText actor, starting from the current cursor position.

clutter_text_delete_selection

Deletes the currently selected text.

clutter_text_delete_text

Deletes the text inside a ClutterText actor between start_pos and end_pos.

clutter_text_get_activatable

Retrieves whether a ClutterText is activatable or not.

clutter_text_get_attributes

Gets the attribute list that was set on the ClutterText actor clutter_text_set_attributes(), if any.

clutter_text_get_buffer

Get the ClutterTextBuffer object which holds the text for this widget.

clutter_text_get_chars

Retrieves the contents of the ClutterText actor between start_pos and end_pos, but not including end_pos.

clutter_text_get_color

Retrieves the text color as set by clutter_text_set_color().

clutter_text_get_cursor_color

Retrieves the color of the cursor of a ClutterText actor.

clutter_text_get_cursor_position

Retrieves the cursor position.

clutter_text_get_cursor_rect

Retrieves the rectangle that contains the cursor.

clutter_text_get_cursor_size

Retrieves the size of the cursor of a ClutterText actor.

clutter_text_get_cursor_visible

Retrieves whether the cursor of a ClutterText actor is visible.

clutter_text_get_editable

Retrieves whether a ClutterText is editable or not.

clutter_text_get_ellipsize

Returns the ellipsizing position of a ClutterText actor, as set by clutter_text_set_ellipsize().

clutter_text_get_font_description

Retrieves the PangoFontDescription used by self.

clutter_text_get_font_name

Retrieves the font name as set by clutter_text_set_font_name().

clutter_text_get_input_hints
No description available.

clutter_text_get_input_purpose
No description available.

clutter_text_get_justify

Retrieves whether the ClutterText actor should justify its contents on both margins.

clutter_text_get_layout

Retrieves the current PangoLayout used by a ClutterText actor.

clutter_text_get_layout_offsets

Obtains the coordinates where the ClutterText will draw the PangoLayout representing the text.

clutter_text_get_line_alignment

Retrieves the alignment of a ClutterText, as set by clutter_text_set_line_alignment().

clutter_text_get_line_wrap

Retrieves the value set using clutter_text_set_line_wrap().

clutter_text_get_line_wrap_mode

Retrieves the line wrap mode used by the ClutterText actor.

clutter_text_get_max_length

Gets the maximum length of text that can be set into a text actor.

clutter_text_get_password_char

Retrieves the character to use in place of the actual text as set by clutter_text_set_password_char().

clutter_text_get_selectable

Retrieves whether a ClutterText is selectable or not.

clutter_text_get_selected_text_color

Retrieves the color of selected text of a ClutterText actor.

clutter_text_get_selection

Retrieves the currently selected text.

clutter_text_get_selection_bound

Retrieves the other end of the selection of a ClutterText actor, in characters from the current cursor position.

clutter_text_get_selection_color

Retrieves the color of the selection of a ClutterText actor.

clutter_text_get_single_line_mode

Retrieves whether the ClutterText actor is in single line mode.

clutter_text_get_text

Retrieves a pointer to the current contents of a ClutterText actor.

clutter_text_get_use_markup

Retrieves whether the contents of the ClutterText actor should be parsed for the Pango text markup.

clutter_text_has_preedit
No description available.

clutter_text_insert_text

Inserts text into a ClutterActor at the given position.

clutter_text_insert_unichar

Inserts wc at the current cursor position of a ClutterText actor.

clutter_text_position_to_coords

Retrieves the coordinates of the given position.

clutter_text_set_activatable

Sets whether a ClutterText actor should be activatable.

clutter_text_set_attributes

Sets the attributes list that are going to be applied to the ClutterText contents.

clutter_text_set_buffer

Set the ClutterTextBuffer object which holds the text for this widget.

clutter_text_set_color

Sets the color of the contents of a ClutterText actor.

clutter_text_set_cursor_color

Sets the color of the cursor of a ClutterText actor.

clutter_text_set_cursor_position

Sets the cursor of a ClutterText actor at position.

clutter_text_set_cursor_size

Sets the size of the cursor of a ClutterText. The cursor will only be visible if the ClutterText:cursor-visible property is set to TRUE.

clutter_text_set_cursor_visible

Sets whether the cursor of a ClutterText actor should be visible or not.

clutter_text_set_editable

Sets whether the ClutterText actor should be editable.

clutter_text_set_ellipsize

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 ClutterText actor.

clutter_text_set_font_description

Sets font_desc as the font description for a ClutterText.

clutter_text_set_font_name

Sets the font used by a ClutterText. The font_name string must either be NULL, which means that the font name from the default ClutterBackend will be used; or be something that can be parsed by the pango_font_description_from_string() function, like:.

clutter_text_set_input_hints
No description available.

clutter_text_set_input_purpose
No description available.

clutter_text_set_justify

Sets whether the text of the ClutterText actor should be justified on both margins. This setting is ignored if Clutter is compiled against Pango < 1.18.

clutter_text_set_line_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.

clutter_text_set_line_wrap

Sets whether the contents of a ClutterText actor should wrap, if they don’t fit the size assigned to the actor.

clutter_text_set_line_wrap_mode

If line wrapping is enabled (see clutter_text_set_line_wrap()) this function controls how the line wrapping is performed. The default is PANGO_WRAP_WORD which means wrap on word boundaries.

clutter_text_set_markup

Sets markup as the contents of a ClutterText.

clutter_text_set_max_length

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.

clutter_text_set_password_char

Sets the character to use in place of the actual text in a password text actor.

clutter_text_set_preedit_string

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 ClutterText buffer.

clutter_text_set_selectable

Sets whether a ClutterText actor should be selectable.

clutter_text_set_selected_text_color

Sets the selected text color of a ClutterText actor.

clutter_text_set_selection

Selects the region of text between start_pos and end_pos.

clutter_text_set_selection_bound

Sets the other end of the selection, starting from the current cursor position.

clutter_text_set_selection_color

Sets the color of the selection of a ClutterText actor.

clutter_text_set_single_line_mode

Sets whether a ClutterText actor should be in single line mode or not. Only editable ClutterTexts can be in single line mode.

clutter_text_set_text

Sets the contents of a ClutterText actor.

clutter_text_set_use_markup

Sets whether the contents of the ClutterText actor contains markup in Pango’s text markup language.

Methods inherited from ClutterActor (218)

Please see ClutterActor for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from ClutterAnimatable (5)
clutter_animatable_find_property

Finds the GParamSpec for property_name.

clutter_animatable_get_actor

Get animated actor.

clutter_animatable_get_initial_state

Retrieves the current state of property_name and sets value with it.

clutter_animatable_interpolate_value

Asks a ClutterAnimatable implementation to interpolate a a named property between the initial and final values of a ClutterInterval, using progress as the interpolation value, and store the result inside value.

clutter_animatable_set_final_state

Sets the current state of property_name to value.

Properties

Clutter.Text:activatable

Toggles whether return invokes the activate signal or not.

Clutter.Text:attributes

A list of PangoStyleAttributes to be applied to the contents of the ClutterText actor.

Clutter.Text:buffer

The buffer which stores the text for this ClutterText.

Clutter.Text:color

The color used to render the text.

Clutter.Text:cursor-color

The color of the cursor.

Clutter.Text:cursor-color-set

Will be set to TRUE if ClutterText:cursor-color has been set.

Clutter.Text:cursor-position

The current input cursor position. -1 is taken to be the end of the text.

Clutter.Text: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.

Clutter.Text:cursor-visible

Whether the input cursor is visible or not.

Clutter.Text:editable

Whether key events delivered to the actor causes editing.

Clutter.Text:ellipsize

The preferred place to ellipsize the contents of the ClutterText actor.

Clutter.Text:font-description

The PangoFontDescription that should be used by the ClutterText.

Clutter.Text:font-name

The font to be used by the ClutterText, as a string that can be parsed by pango_font_description_from_string().

Clutter.Text:input-hints
No description available.

Clutter.Text:input-purpose
No description available.

Clutter.Text:justify

Whether the contents of the ClutterText should be justified on both margins.

Clutter.Text:line-alignment

The preferred alignment for the text. This property controls the alignment of multi-line paragraphs.

Clutter.Text:line-wrap

Whether to wrap the lines of ClutterText:text if the contents exceed the available allocation. The wrapping strategy is controlled by the ClutterText:line-wrap-mode property.

Clutter.Text:line-wrap-mode

If ClutterText:line-wrap is set to TRUE, this property will control how the text is wrapped.

Clutter.Text:max-length

The maximum length of the contents of the ClutterText actor.

Clutter.Text:password-char

If non-zero, the character that should be used in place of the actual text in a password text actor.

Clutter.Text:selectable

Whether it is possible to select text, either using the pointer or the keyboard.

Clutter.Text:selected-text-color

The color of selected text.

Clutter.Text:selected-text-color-set

Will be set to TRUE if ClutterText:selected-text-color has been set.

Clutter.Text:selection-bound

The current input cursor position. -1 is taken to be the end of the text.

Clutter.Text:selection-color

The color of the selection.

Clutter.Text:selection-color-set

Will be set to TRUE if ClutterText:selection-color has been set.

Clutter.Text:single-line-mode

Whether the ClutterText actor should be in single line mode or not. A single line ClutterText actor will only contain a single line of text, scrolling it in case its length is bigger than the allocated size.

Clutter.Text:text

The text to render inside the actor.

Clutter.Text:use-markup

Whether the text includes Pango markup.

Properties inherited from ClutterActor (74)
Clutter.Actor:accessible-name

Object instance’s name for assistive technology access.

Clutter.Actor:accessible-role

The accessible role of this object.

Clutter.Actor:actions

Adds a ClutterAction to the actor.

Clutter.Actor:allocation

The allocation for the actor, in pixels.

Clutter.Actor:background-color

Paints a solid fill of the actor’s allocation using the specified color.

Clutter.Actor:background-color-set

Whether the ClutterActor:background-color property has been set.

Clutter.Actor:child-transform

Applies a transformation matrix on each child of an actor.

Clutter.Actor:child-transform-set

Whether the ClutterActor:child-transform property is set.

Clutter.Actor:clip-rect

The visible region of the actor, in actor-relative coordinates, expressed as a #graphene_rect_t.

Clutter.Actor:clip-to-allocation

Whether the clip region should track the allocated area of the actor.

Clutter.Actor:color-state

The ClutterColorState contains the properties like colorspace for each actors.

Clutter.Actor:constraints

Adds a ClutterConstraint to the actor.

Clutter.Actor:content

The ClutterContent implementation that controls the content of the actor.

Clutter.Actor:content-box

The bounding box for the ClutterContent used by the actor.

Clutter.Actor:content-gravity

The alignment that should be honoured by the ClutterContent set with the ClutterActor:content property.

Clutter.Actor:content-repeat

The repeat policy for the actor’s ClutterActor:content.

Clutter.Actor:context

The %ClutterContext of the actor.

Clutter.Actor:effect

Adds ClutterEffect to the list of effects be applied on a ClutterActor.

Clutter.Actor:first-child

The actor’s first child.

Clutter.Actor:fixed-position-set

This flag controls whether the ClutterActor:fixed-x and ClutterActor:fixed-y properties are used.

Clutter.Actor:fixed-x

The fixed X position of the actor in pixels.

Clutter.Actor:fixed-y

The fixed Y position of the actor in pixels.

Clutter.Actor:has-clip

Whether the actor has the ClutterActor:clip-rect property set or not.

Clutter.Actor:has-pointer

Whether the actor contains the pointer of a ClutterInputDevice or not.

Clutter.Actor:height

Height of the actor (in pixels). If written, forces the minimum and natural size request of the actor to the given height. If read, returns the allocated height if available, otherwise the height request.

Clutter.Actor:last-child

The actor’s last child.

Clutter.Actor:layout-manager

A delegate object for controlling the layout of the children of an actor.

Clutter.Actor:magnification-filter
No description available.

Clutter.Actor:mapped

Whether the actor is mapped (will be painted when the stage to which it belongs is mapped).

Clutter.Actor:margin-bottom

The margin (in pixels) from the bottom of the actor.

Clutter.Actor:margin-left

The margin (in pixels) from the left of the actor.

Clutter.Actor:margin-right

The margin (in pixels) from the right of the actor.

Clutter.Actor:margin-top

The margin (in pixels) from the top of the actor.

Clutter.Actor:min-height

A forced minimum height request for the actor, in pixels.

Clutter.Actor:min-height-set

This flag controls whether the ClutterActor:min-height property is used.

Clutter.Actor:min-width

A forced minimum width request for the actor, in pixels.

Clutter.Actor:min-width-set

This flag controls whether the ClutterActor:min-width property is used.

Clutter.Actor:minification-filter
No description available.

Clutter.Actor:name

The name of the actor.

Clutter.Actor:natural-height

A forced natural height request for the actor, in pixels.

Clutter.Actor:natural-height-set

This flag controls whether the ClutterActor:natural-height property is used.

Clutter.Actor:natural-width

A forced natural width request for the actor, in pixels.

Clutter.Actor:natural-width-set

This flag controls whether the ClutterActor:natural-width property is used.

Clutter.Actor:offscreen-redirect

Determines the conditions in which the actor will be redirected to an offscreen framebuffer while being painted. For example this can be used to cache an actor in a framebuffer or for improved handling of transparent actors. See clutter_actor_set_offscreen_redirect() for details.

Clutter.Actor:opacity

Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque).

Clutter.Actor:pivot-point

The point around which the scaling and rotation transformations occur.

Clutter.Actor:pivot-point-z

The Z component of the ClutterActor:pivot-point, expressed as a value along the Z axis.

Clutter.Actor:position

The position of the origin of the actor.

Clutter.Actor:reactive

Whether the actor is reactive to events or not.

Clutter.Actor:realized

Whether the actor has been realized.

Clutter.Actor:request-mode

Request mode for the ClutterActor. The request mode determines the type of geometry management used by the actor, either height for width (the default) or width for height.

Clutter.Actor:rotation-angle-x

The rotation angle on the X axis.

Clutter.Actor:rotation-angle-y

The rotation angle on the Y axis.

Clutter.Actor:rotation-angle-z

The rotation angle on the Z axis.

Clutter.Actor:scale-x

The horizontal scale of the actor.

Clutter.Actor:scale-y

The vertical scale of the actor.

Clutter.Actor:scale-z

The scale factor of the actor along the Z axis.

Clutter.Actor:show-on-set-parent

If TRUE, the actor is automatically shown when parented.

Clutter.Actor:size

The size of the actor.

Clutter.Actor:text-direction

The direction of the text inside a ClutterActor.

Clutter.Actor:transform

Overrides the transformations of a ClutterActor with a custom matrix.

Clutter.Actor:transform-set

Whether the ClutterActor:transform property is set.

Clutter.Actor:translation-x

An additional translation applied along the X axis, relative to the actor’s ClutterActor:pivot-point.

Clutter.Actor:translation-y

An additional translation applied along the Y axis, relative to the actor’s ClutterActor:pivot-point.

Clutter.Actor:translation-z

An additional translation applied along the Z axis, relative to the actor’s ClutterActor:pivot-point.

Clutter.Actor:visible

Whether the actor is set to be visible or not.

Clutter.Actor:width

Width of the actor (in pixels). If written, forces the minimum and natural size request of the actor to the given width. If read, returns the allocated width if available, otherwise the width request.

Clutter.Actor:x

X coordinate of the actor in pixels. If written, forces a fixed position for the actor. If read, returns the fixed position if any, otherwise the allocation if available, otherwise 0.

Clutter.Actor:x-align

The alignment of an actor on the X axis, if the actor has been given extra space for its allocation. See also the ClutterActor:x-expand property.

Clutter.Actor:x-expand

Whether a layout manager should assign more space to the actor on the X axis.

Clutter.Actor:y

Y coordinate of the actor in pixels. If written, forces a fixed position for the actor. If read, returns the fixed position if any, otherwise the allocation if available, otherwise 0.

Clutter.Actor:y-align

The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.

Clutter.Actor:y-expand

Whether a layout manager should assign more space to the actor on the Y axis.

Clutter.Actor:z-position

The actor’s position on the Z axis, relative to the parent’s transformations.

Signals

Clutter.Text::activate

The signal is emitted each time the actor is ‘activated’ by the user, normally by pressing the ‘Enter’ key. The signal is emitted only if ClutterText:activatable is set to TRUE.

Clutter.Text::cursor-changed

The signal is emitted whenever the cursor position or size changes.

Clutter.Text::delete-text

This signal is emitted when text is deleted from the actor by the user. It is emitted before self text changes.

Clutter.Text::insert-text

This signal is emitted when text is inserted into the actor by the user. It is emitted before self text changes.

Clutter.Text::text-changed

The signal is emitted after actors text changes.

Signals inherited from ClutterActor (29)
ClutterActor::button-press-event

The signal is emitted each time a mouse button is pressed on actor.

ClutterActor::button-release-event

The signal is emitted each time a mouse button is released on actor.

ClutterActor::captured-event

The signal is emitted when an event is captured by Clutter. This signal will be emitted starting from the top-level container (the ClutterStage) to the actor which received the event going down the hierarchy. This signal can be used to intercept every event before the specialized events (like ClutterActor::button-press-event or ClutterActor::button-release-event) are emitted.

ClutterActor::child-added

The signal is emitted each time an actor has been added to actor.

ClutterActor::child-removed

The signal is emitted each time an actor is removed from actor.

ClutterActor::cloned
No description available.

ClutterActor::decloned
No description available.

ClutterActor::destroy

The signal notifies that all references held on the actor which emitted it should be released.

ClutterActor::enter-event

The signal is emitted when the pointer enters the actor.

ClutterActor::event

The signal is emitted each time an event is received by the actor. This signal will be emitted on every actor, following the hierarchy chain, until it reaches the top-level container (the ClutterStage).

ClutterActor::hide

The signal is emitted when an actor is no longer rendered on the stage.

ClutterActor::key-focus-in

The signal is emitted when actor receives key focus.

ClutterActor::key-focus-out

The signal is emitted when actor loses key focus.

ClutterActor::key-press-event

The signal is emitted each time a keyboard button is pressed while actor has key focus (see clutter_stage_set_key_focus()).

ClutterActor::key-release-event

The signal is emitted each time a keyboard button is released while actor has key focus (see clutter_stage_set_key_focus()).

ClutterActor::leave-event

The signal is emitted when the pointer leaves the actor.

ClutterActor::motion-event

The signal is emitted each time the mouse pointer is moved over actor.

ClutterActor::parent-set

This signal is emitted when the parent of the actor changes.

ClutterActor::pick

The signal is emitted each time an actor is being painted in “pick mode”. The pick mode is used to identify the actor during the event handling phase, or by clutter_stage_get_actor_at_pos().

deprecated: 1.12 

ClutterActor::queue-relayout

The signal is emitted when clutter_actor_queue_relayout() is called on an actor.

ClutterActor::realize

The signal is emitted each time an actor is being realized.

deprecated: 1.16 

ClutterActor::resource-scale-changed

The signal is emitted when the resource scale value returned by clutter_actor_get_resource_scale() changes.

ClutterActor::scroll-event

The signal is emitted each time the mouse is scrolled on actor.

ClutterActor::show

The signal is emitted when an actor is visible and rendered on the stage.

ClutterActor::stage-views-changed

The signal is emitted when the position or size an actor is being painted at have changed so that it’s visible on different stage views.

ClutterActor::touch-event

The signal is emitted each time a touch begin/end/update/cancel event.

ClutterActor::transition-stopped

The signal is emitted once a transition is stopped; a transition is stopped once it reached its total duration (including eventual repeats), it has been stopped using clutter_timeline_stop(), or it has been removed from the transitions applied on actor, using clutter_actor_remove_transition().

ClutterActor::transitions-completed

The signal is emitted once all transitions involving actor are complete.

ClutterActor::unrealize

The signal is emitted each time an actor is being unrealized.

deprecated: 1.16 

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 ClutterTextClass {
  void (* text_changed) (
    ClutterText* self
  );
  void (* activate) (
    ClutterText* self
  );
  void (* cursor_changed) (
    ClutterText* self
  );
  
}

The ClutterTextClass struct contains only private data.

Class members
text_changed: void (* text_changed) ( ClutterText* self )

Class handler for the ClutterText::text-changed signal.

activate: void (* activate) ( ClutterText* self )

Class handler for the ClutterText::activate signal.

cursor_changed: void (* cursor_changed) ( ClutterText* self )

Class handler for the ClutterText::cursor-changed signal.

Virtual methods

Clutter.TextClass.activate

Class handler for the ClutterText::activate signal.

Clutter.TextClass.cursor_changed

Class handler for the ClutterText::cursor-changed signal.

Clutter.TextClass.text_changed

Class handler for the ClutterText::text-changed signal.