DESCRIPTION
Clutter::Text is an actor that displays custom text using Pango as the text rendering engine.Clutter::Text 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
Glib::Object +----Glib::InitiallyUnowned +----Clutter::Actor +----Clutter::Text
INTERFACES
Glib::Object::_Unregistered::ClutterScriptable
METHODS
actor = Clutter::Text->new ($font_name=undef, $text=undef, $color=undef)
- $font_name (string)
- $text (string)
- $color (Clutter::Color)
boolean = $text->get_activatable
$text->set_activatable ($activatable)
- $activatable (boolean)
boolean = $text->activate
attrlist or undef = $text->get_attributes
$text->set_attributes ($attrs)
- $attrs (Pango::AttrList or undef)
string = $text->get_chars ($start_pos=0, $end_pos=-1)
- $start_pos (integer)
- $end_pos (integer)
color = $text->get_color
$text->set_color ($color)
- $color (Clutter::Color)
color = $text->get_cursor_color
$text->set_cursor_color ($color)
- $color (Clutter::Color)
integer = $text->get_cursor_position
$text->set_cursor_position ($position)
- $position (integer)
integer = $text->get_cursor_size
$text->set_cursor_size ($width)
- $width (integer)
boolean = $text->get_cursor_visible
$text->set_cursor_visible ($cursor_visible)
- $cursor_visible (boolean)
$text->delete_chars ($n_chars)
- $n_chars (integer)
boolean = $text->delete_selection
$text->delete_text ($start_pos=0, $end_pos=-1)
- $start_pos (integer)
- $end_pos (integer)
boolean = $text->get_editable
$text->set_editable ($editable)
- $editable (boolean)
ellipsizemode = $text->get_ellipsize
$text->set_ellipsize ($mode)
- $mode (Pango::EllipsizeMode)
string = $text->get_font_name
$text->set_font_name ($font_name)
- $font_name (string)
$text->insert_text ($string, $position=-1)
- $string (string)
- $position (integer)
$text->insert_unichar ($wc)
- $wc (character)
boolean = $text->get_justify
$text->set_justify ($justify)
- $justify (boolean)
layout = $text->get_layout
alignment = $text->get_line_alignment
$text->set_line_alignment ($alignment)
- $alignment (Pango::Alignment)
boolean = $text->get_line_wrap
wrapmode = $text->get_line_wrap_mode
$text->set_line_wrap_mode ($wrap_mode)
- $wrap_mode (Pango::WrapMode)
$text->set_line_wrap ($line_wrap)
- $line_wrap (boolean)
$text->set_markup ($pango_markup)
- $pango_markup (string or undef)
integer = $text->get_max_length
$text->set_max_length ($max=0)
- $max (integer)
character = $text->get_password_char
$text->set_password_char ($wc=0)
- $wc (character)
(x, y, line_height) = $text->position_to_coords ($position)
- $position (integer)
boolean = $text->get_selectable
$text->set_selectable ($selectable)
- $selectable (boolean)
integer = $text->get_selection_bound
$text->set_selection_bound ($selection_bound)
- $selection_bound (integer)
color = $text->get_selection_color
$text->set_selection_color ($color)
- $color (Clutter::Color)
string = $text->get_selection
$text->set_selection ($start_pos=0, $end_pos=-1)
- $start_pos (integer)
- $end_pos (integer)
boolean = $text->get_single_line_mode
$text->set_single_line_mode ($single_line)
- $single_line (boolean)
string or undef = $text->get_text
$text->set_text ($string)
- $string (string or undef)
boolean = $text->get_use_markup
$text->set_use_markup ($setting)
- $setting (boolean)
PROPERTIES
- 'activatable' (boolean : readable / writable)
- Whether pressing return causes the activate signal to be emitted
- 'attributes' (Pango::AttrList : readable / writable / private)
- A list of style attributes to apply to the contents of the actor
- 'color' (Clutter::Color : readable / writable / private)
- Color of the font used by the text
- 'cursor-color' (Clutter::Color : readable / writable / private)
- Cursor Color
- 'cursor-color-set' (boolean : readable / private)
- Whether the cursor color has been set
- 'cursor-size' (integer : readable / writable / private)
- The width of the cursor, in pixels
- 'cursor-visible' (boolean : readable / writable / private)
- Whether the input cursor is visible
- 'editable' (boolean : readable / writable)
- Whether the text is editable
- 'ellipsize' (Pango::EllipsizeMode : readable / writable / private)
- The preferred place to ellipsize the string
- 'font-name' (string : readable / writable / private)
- The font to be used by the text
- 'justify' (boolean : readable / writable / private)
- Whether the text should be justified
- 'line-alignment' (Pango::Alignment : readable / writable / private)
- The preferred alignment for the string, for multi-line text
- 'line-wrap' (boolean : readable / writable / private)
- If set, wrap the lines if the text becomes too wide
- 'line-wrap-mode' (Pango::WrapMode : readable / writable / private)
- Control how line-wrapping is done
- 'max-length' (integer : readable / writable / private)
- Maximum length of the text inside the actor
- 'password-char' (Glib::UInt : readable / writable / private)
- If non-zero, use this character to display the actor's contents
- 'position' (integer : readable / writable / private)
- The cursor position
- 'selectable' (boolean : readable / writable)
- Whether the text is selectable
- 'selection-bound' (integer : readable / writable / private)
- The cursor position of the other end of the selection
- 'selection-color' (Clutter::Color : readable / writable / private)
- Selection Color
- 'selection-color-set' (boolean : readable / private)
- Whether the selection color has been set
- 'single-line-mode' (boolean : readable / writable / private)
- Whether the text should be a single line
- 'text' (string : readable / writable / private)
- The text to render
- 'use-markup' (boolean : readable / writable / private)
- Whether or not the text includes Pango markup
SIGNALS
- text-changed (Clutter::Text)
- cursor-event (Clutter::Text, Clutter::Geometry)
- activate (Clutter::Text)
ENUMS AND FLAGS
enum Pango::Alignment
- 'left' / 'PANGO_ALIGN_LEFT'
- 'center' / 'PANGO_ALIGN_CENTER'
- 'right' / 'PANGO_ALIGN_RIGHT'
enum Pango::EllipsizeMode
- 'none' / 'PANGO_ELLIPSIZE_NONE'
- 'start' / 'PANGO_ELLIPSIZE_START'
- 'middle' / 'PANGO_ELLIPSIZE_MIDDLE'
- 'end' / 'PANGO_ELLIPSIZE_END'
enum Pango::WrapMode
- 'word' / 'PANGO_WRAP_WORD'
- 'char' / 'PANGO_WRAP_CHAR'
- 'word-char' / 'PANGO_WRAP_WORD_CHAR'
COPYRIGHT
Copyright (C) 2006, 2007, 2008 OpenedHand LtdCopyright (C) 2009 Intel Corporation
This module is free software; you can redistribute it and/or modify it under the terms of either:
- the GNU Lesser General Public Library version 2.1; or
- the Artistic License, version 2.0.
See Clutter for the full copyright notice.