Text
Object Hierarchy:
Description:
[ CCode ( type_id = "clutter_text_get_type ()" ) ]
[ Version ( since = "1.0" ) ]
public class Text : Actor, Implementor, Animatable, Container, Scriptable
[ Version ( since = "1.0" ) ]
public class Text : Actor, Implementor, Animatable, Container, Scriptable
The Text struct contains only private data.
Namespace: Clutter
Package: clutter-1.0
Content:
Properties:
- public bool activatable { get; set; }
Toggles whether return invokes the activate signal or not.
- public AttrList attributes { get; set; }
A list of
PangoStyleAttribute
s to be applied to the contents of the Text actor. - public TextBuffer buffer { get; set; }
The buffer which stores the text for this Text.
- public Color color { get; set; }
The color used to render the text.
- public Color cursor_color { get; set; }
The color of the cursor.
- public bool cursor_color_set { get; }
Will be set to
true
if cursor_color has been set. - public int cursor_position { get; set; }
The current input cursor position.
- public int cursor_size { get; set; }
The size of the cursor, in pixels.
- public bool cursor_visible { get; set; }
Whether the input cursor is visible or not.
- public bool editable { get; set; }
Whether key events delivered to the actor causes editing.
- public EllipsizeMode ellipsize { get; set; }
The preferred place to ellipsize the contents of the Text actor
- public FontDescription font_description { owned get; set; }
The FontDescription that should be used by the Text
- public string font_name { get; set; }
The font to be used by the Text, as a string that can be parsed by font_description_from_string.
- public bool justify { get; set; }
Whether the contents of the Text should be justified on both margins.
- public Alignment line_alignment { get; set; }
The preferred alignment for the text.
- public bool line_wrap { get; set; }
Whether to wrap the lines of text if the contents exceed the available allocation.
- public WrapMode line_wrap_mode { get; set; }
If line_wrap is set to
true
, this property will control how the text is wrapped. - public int max_length { get; set; }
The maximum length of the contents of the Text actor.
- public uint password_char { get; set; }
If non-zero, the character that should be used in place of the actual text in a password text actor.
- public int position { get; set; }
The current input cursor position.
- public bool selectable { get; set; }
Whether it is possible to select text, either using the pointer or the keyboard.
- public Color selected_text_color { get; set; }
The color of selected text.
- public bool selected_text_color_set { get; }
Will be set to
true
if selected_text_color has been set. - public int selection_bound { get; set; }
The current input cursor position.
- public Color selection_color { get; set; }
The color of the selection.
- public bool selection_color_set { get; }
Will be set to
true
if selection_color has been set. - public bool single_line_mode { get; set; }
Whether the Text actor should be in single line mode or not.
- public string text { get; set; }
The text to render inside the actor.
- public bool use_markup { get; set; }
Whether the text includes Pango markup.
Creation methods:
- public Text ()
Creates a new Text actor.
- public Text.full (string font_name, string text, Color color)
Creates a new Text actor, using
font_name
as the font description;text
will be used to set the contents of the actor; andcolor
will be used as the color to rendertext
. - public Text.with_buffer (TextBuffer buffer)
Creates a new entry with the specified text buffer.
- public Text.with_text (string? font_name, string text)
Creates a new Text actor, using
font_name
as the font description;text
will be used to set the contents of the actor.
Methods:
- public int coords_to_position (float x, float y)
Retrieves the position of the character at the given coordinates.
- public void delete_chars (uint n_chars)
Deletes
n_chars
inside a Text actor, starting from the current cursor position. - public bool delete_selection ()
Deletes the currently selected text
- public bool get_activatable ()
Retrieves whether a Text is activatable or not.
- public unowned AttrList get_attributes ()
Gets the attribute list that was set on the Text actor set_attributes, if any.
- public unowned TextBuffer get_buffer ()
Get the TextBuffer object which holds the text for this widget.
- public string get_chars (ssize_t start_pos, ssize_t end_pos)
Retrieves the contents of the Text actor between
start_pos
andend_pos
, but not includingend_pos
. - public Color get_color ()
Retrieves the text color as set by set_color.
- public Color get_cursor_color ()
Retrieves the color of the cursor of a Text actor.
- public int get_cursor_position ()
Retrieves the cursor position.
- public Rect get_cursor_rect ()
Retrieves the rectangle that contains the cursor.
- public uint get_cursor_size ()
Retrieves the size of the cursor of a Text actor.
- public bool get_cursor_visible ()
Retrieves whether the cursor of a Text actor is visible.
- public bool get_editable ()
Retrieves whether a Text is editable or not.
- public EllipsizeMode get_ellipsize ()
Returns the ellipsizing position of a Text actor, as set by set_ellipsize.
- public FontDescription get_font_description ()
Retrieves the FontDescription used by this
- public unowned string get_font_name ()
Retrieves the font name as set by set_font_name.
- public bool get_justify ()
Retrieves whether the Text actor should justify its contents on both margins.
- public unowned Layout get_layout ()
Retrieves the current Layout used by a Text actor.
- public void get_layout_offsets (out int x, out int y)
Obtains the coordinates where the Text will draw the Layout representing the text.
- public Alignment get_line_alignment ()
Retrieves the alignment of a Text, as set by set_line_alignment.
- public bool get_line_wrap ()
Retrieves the value set using set_line_wrap.
- public WrapMode get_line_wrap_mode ()
Retrieves the line wrap mode used by the Text actor.
- public int get_max_length ()
Gets the maximum length of text that can be set into a text actor.
- public unichar get_password_char ()
Retrieves the character to use in place of the actual text as set by set_password_char.
- public bool get_selectable ()
Retrieves whether a Text is selectable or not.
- public Color get_selected_text_color ()
Retrieves the color of selected text of a Text actor.
- public string get_selection ()
Retrieves the currently selected text.
- public int get_selection_bound ()
Retrieves the other end of the selection of a Text actor, in characters from the current cursor position.
- public Color get_selection_color ()
Retrieves the color of the selection of a Text actor.
- public bool get_single_line_mode ()
Retrieves whether the Text actor is in single line mode.
- public unowned string get_text ()
Retrieves a pointer to the current contents of a Text actor.
- public bool get_use_markup ()
Retrieves whether the contents of the Text actor should be parsed for the Pango text markup.
- public void insert_text (string text, ssize_t position)
Inserts
text
into a Actor at the given position. - public void insert_unichar (unichar wc)
Inserts
wc
at the current cursor position of a Text actor. - public bool position_to_coords (int position, out float x, out float y, out float line_height = null)
Retrieves the coordinates of the given
position
. - public void set_activatable (bool activatable)
Sets whether a Text actor should be activatable.
- public void set_attributes (AttrList? attrs)
Sets the attributes list that are going to be applied to the Text contents.
- public void set_buffer (TextBuffer buffer)
Set the TextBuffer object which holds the text for this widget.
- public void set_color (Color color)
Sets the color of the contents of a Text actor.
- public void set_cursor_color (Color? color)
Sets the color of the cursor of a Text actor.
- public void set_cursor_position (int position)
Sets the cursor of a Text actor at
position
. - public void set_cursor_size (int size)
Sets the size of the cursor of a Text.
- public void set_cursor_visible (bool cursor_visible)
Sets whether the cursor of a Text actor should be visible or not.
- public void set_editable (bool editable)
Sets whether the Text actor should be editable.
- public void set_ellipsize (EllipsizeMode mode)
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 Text actor
- public void set_font_description (FontDescription font_desc)
Sets
font_desc
as the font description for a Text - public void set_font_name (string? font_name)
Sets the font used by a Text.
- public void set_justify (bool justify)
Sets whether the text of the Text actor should be justified on both margins.
- public void set_line_alignment (Alignment alignment)
Sets the way that the lines of a wrapped label are aligned with respect to each other.
- public void set_line_wrap (bool line_wrap)
Sets whether the contents of a Text actor should wrap, if they don't fit the size assigned to the actor.
- public void set_line_wrap_mode (WrapMode wrap_mode)
If line wrapping is enabled (see set_line_wrap) this function controls how the line wrapping is performed.
- public void set_markup (string? markup)
Sets
markup
as the contents of a Text . - public void set_max_length (int max)
Sets the maximum allowed length of the contents of the actor.
- public void set_password_char (unichar wc)
Sets the character to use in place of the actual text in a password text actor.
- public void set_preedit_string (string? preedit_str, AttrList? preedit_attrs, uint cursor_pos)
Sets, or unsets, the pre-edit string.
- public void set_selectable (bool selectable)
Sets whether a Text actor should be selectable.
- public void set_selected_text_color (Color? color)
Sets the selected text color of a Text actor.
- public void set_selection (ssize_t start_pos, ssize_t end_pos)
Selects the region of text between
start_pos
andend_pos
. - public void set_selection_bound (int selection_bound)
Sets the other end of the selection, starting from the current cursor position.
- public void set_selection_color (Color? color)
Sets the color of the selection of a Text actor.
- public void set_single_line_mode (bool single_line)
Sets whether a Text actor should be in single line mode or not.
- public void set_text (string? text)
Sets the contents of a Text actor.
- public void set_use_markup (bool setting)
Sets whether the contents of the Text actor contains markup in Pango's text markup language.
- public bool try_activate ()
Signals:
- public virtual signal void activate ()
The activate signal is emitted each time the actor is 'activated' by the user, normally by pressing the 'Enter' key.
- public virtual signal void cursor_changed ()
The cursor_changed signal is emitted whenever the cursor position or size changes.
- public virtual signal Geometry cursor_event ()
The cursor_event signal is emitted whenever the cursor position changes inside a Text actor.
- public signal void delete_text (int start_pos, int end_pos)
This signal is emitted when text is deleted from the actor by the user.
- public virtual signal void text_changed ()
The text_changed signal is emitted after
actor
's text changes
Inherited Members:
All known members inherited from class Clutter.Actor
- actions
- add_action
- add_action_with_name
- add_child
- add_constraint
- add_constraint_with_name
- add_effect
- add_effect_with_name
- add_transition
- allocate
- allocate_align_fill
- allocate_available_size
- allocate_preferred_size
- allocation
- allocation_changed
- anchor_gravity
- anchor_x
- anchor_y
- animate
- animate_with_alpha
- animate_with_alphav
- animate_with_timeline
- animate_with_timelinev
- animatev
- apply_relative_transform_to_point
- apply_transform
- apply_transform_to_point
- background_color
- background_color_set
- bind_model
- button_press_event
- button_release_event
- captured_event
- child_transform
- child_transform_set
- clear_actions
- clear_constraints
- clear_effects
- clip
- clip_rect
- clip_to_allocation
- constraints
- contains
- content
- content_box
- content_gravity
- content_repeat
- continue_paint
- create_pango_context
- create_pango_layout
- depth
- destroy
- destroy_all_children
- detach_animation
- effect
- emit_event
- enter_event
- event
- first_child
- fixed_position_set
- fixed_x
- fixed_y
- flags
- get_abs_allocation_vertices
- get_accessible
- get_action
- get_actions
- get_allocation_box
- get_allocation_geometry
- get_allocation_vertices
- get_anchor_point
- get_anchor_point_gravity
- get_animation
- get_background_color
- get_by_gid
- get_child_at_index
- get_child_transform
- get_children
- get_clip
- get_clip_to_allocation
- get_constraint
- get_constraints
- get_content
- get_content_box
- get_content_gravity
- get_content_repeat
- get_content_scaling_filters
- get_default_paint_volume
- get_depth
- get_easing_delay
- get_easing_duration
- get_easing_mode
- get_effect
- get_effects
- get_first_child
- get_fixed_position_set
- get_flags
- get_geometry
- get_gid
- get_has_pointer
- get_height
- get_last_child
- get_layout_manager
- get_margin
- get_margin_bottom
- get_margin_left
- get_margin_right
- get_margin_top
- get_n_children
- get_name
- get_next_sibling
- get_offscreen_redirect
- get_opacity
- get_paint_box
- get_paint_opacity
- get_paint_visibility
- get_paint_volume
- get_paint_volume_vfunc
- get_pango_context
- get_parent
- get_pivot_point
- get_pivot_point_z
- get_position
- get_preferred_height
- get_preferred_size
- get_preferred_width
- get_previous_sibling
- get_reactive
- get_request_mode
- get_rotation
- get_rotation_angle
- get_scale
- get_scale_center
- get_scale_gravity
- get_scale_z
- get_shader
- get_size
- get_stage
- get_text_direction
- get_transform
- get_transformation_matrix
- get_transformed_paint_volume
- get_transformed_position
- get_transformed_size
- get_transition
- get_translation
- get_width
- get_x
- get_x_align
- get_x_expand
- get_y
- get_y_align
- get_y_expand
- get_z_position
- get_z_rotation_gravity
- grab_key_focus
- has_actions
- has_allocation
- has_clip
- has_constraints
- has_effects
- has_key_focus
- has_overlaps
- has_pointer
- height
- hide
- hide_all
- insert_child_above
- insert_child_at_index
- insert_child_below
- is_in_clone_paint
- is_mapped
- is_realized
- is_rotated
- is_scaled
- is_visible
- key_focus_in
- key_focus_out
- key_press_event
- key_release_event
- last_child
- layout_manager
- leave_event
- lower
- lower_bottom
- magnification_filter
- map
- mapped
- margin_bottom
- margin_left
- margin_right
- margin_top
- min_height
- min_height_set
- min_width
- min_width_set
- minification_filter
- motion_event
- move_anchor_point
- move_anchor_point_from_gravity
- move_by
- name
- natural_height
- natural_height_set
- natural_width
- natural_width_set
- needs_expand
- offscreen_redirect
- opacity
- paint
- paint_node
- parent_set
- pick
- pivot_point
- pivot_point_z
- pop_internal
- position
- push_internal
- queue_redraw
- queue_redraw_with_clip
- queue_relayout
- raise
- raise_top
- reactive
- realize
- realized
- remove_action
- remove_action_by_name
- remove_all_children
- remove_all_transitions
- remove_child
- remove_clip
- remove_constraint
- remove_constraint_by_name
- remove_effect
- remove_effect_by_name
- remove_transition
- reparent
- replace_child
- request_mode
- restore_easing_state
- rotation_angle_x
- rotation_angle_y
- rotation_angle_z
- rotation_center_x
- rotation_center_y
- rotation_center_z
- rotation_center_z_gravity
- save_easing_state
- scale_center_x
- scale_center_y
- scale_gravity
- scale_x
- scale_y
- scale_z
- scroll_event
- set_allocation
- set_anchor_point
- set_anchor_point_from_gravity
- set_background_color
- set_child_above_sibling
- set_child_at_index
- set_child_below_sibling
- set_child_transform
- set_clip
- set_clip_to_allocation
- set_content
- set_content_gravity
- set_content_repeat
- set_content_scaling_filters
- set_depth
- set_easing_delay
- set_easing_duration
- set_easing_mode
- set_fixed_position_set
- set_flags
- set_geometry
- set_height
- set_layout_manager
- set_margin
- set_margin_bottom
- set_margin_left
- set_margin_right
- set_margin_top
- set_name
- set_offscreen_redirect
- set_opacity
- set_parent
- set_pivot_point
- set_pivot_point_z
- set_position
- set_reactive
- set_request_mode
- set_rotation
- set_rotation_angle
- set_scale
- set_scale_full
- set_scale_with_gravity
- set_scale_z
- set_shader
- set_shader_param
- set_shader_param_float
- set_shader_param_int
- set_size
- set_text_direction
- set_transform
- set_translation
- set_width
- set_x
- set_x_align
- set_x_expand
- set_y
- set_y_align
- set_y_expand
- set_z_position
- set_z_rotation_from_gravity
- should_pick_paint
- show
- show_all
- show_on_set_parent
- size
- text_direction
- touch_event
- transform
- transform_set
- transform_stage_point
- transition_stopped
- transitions_completed
- translation_x
- translation_y
- translation_z
- unmap
- unparent
- unrealize
- unset_flags
- visible
- width
- x
- x_align
- x_expand
- y
- y_align
- y_expand
- z_position
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor
All known members inherited from interface Clutter.Animatable
All known members inherited from interface Clutter.Container
All known members inherited from interface Clutter.Scriptable