Clutter::Text(3pm)

NAME

Clutter::Text - An actor for displaying and editing text

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)
o $font_name (string)
o $text (string)
o $color (Clutter::Color)
boolean = $text->get_activatable $text->set_activatable ($activatable)
o $activatable (boolean)
boolean = $text->activate
attrlist or undef = $text->get_attributes $text->set_attributes ($attrs)
o $attrs (Pango::AttrList or undef)
string = $text->get_chars ($start_pos=0, $end_pos=-1)
o $start_pos (integer)
o $end_pos (integer)
color = $text->get_color
$text->set_color ($color)
o $color (Clutter::Color)
color = $text->get_cursor_color $text->set_cursor_color ($color)
o $color (Clutter::Color)
integer = $text->get_cursor_position $text->set_cursor_position ($position)
o $position (integer)
integer = $text->get_cursor_size $text->set_cursor_size ($width)
o $width (integer)
boolean = $text->get_cursor_visible $text->set_cursor_visible ($cursor_visible)
o $cursor_visible (boolean)
$text->delete_chars ($n_chars)
o $n_chars (integer)
boolean = $text->delete_selection $text->delete_text ($start_pos=0, $end_pos=-1)
o $start_pos (integer)
o $end_pos (integer)
boolean = $text->get_editable $text->set_editable ($editable)
o $editable (boolean)
ellipsizemode = $text->get_ellipsize $text->set_ellipsize ($mode)
o $mode (Pango::EllipsizeMode)
string = $text->get_font_name $text->set_font_name ($font_name)
o $font_name (string)
$text->insert_text ($string, $position=-1)
o $string (string)
o $position (integer)
$text->insert_unichar ($wc)
o $wc (character)
boolean = $text->get_justify $text->set_justify ($justify)
o $justify (boolean)
layout = $text->get_layout alignment = $text->get_line_alignment $text->set_line_alignment ($alignment)
o $alignment (Pango::Alignment)
boolean = $text->get_line_wrap wrapmode = $text->get_line_wrap_mode $text->set_line_wrap_mode ($wrap_mode)
o $wrap_mode (Pango::WrapMode)
$text->set_line_wrap ($line_wrap)
o $line_wrap (boolean)
$text->set_markup ($pango_markup)
o $pango_markup (string or undef)
integer = $text->get_max_length $text->set_max_length ($max=0)
o $max (integer)
character = $text->get_password_char $text->set_password_char ($wc=0)
o $wc (character)
(x, y, line_height) = $text->position_to_coords ($position)
o $position (integer)
boolean = $text->get_selectable $text->set_selectable ($selectable)
o $selectable (boolean)
integer = $text->get_selection_bound $text->set_selection_bound ($selection_bound)
o $selection_bound (integer)
color = $text->get_selection_color $text->set_selection_color ($color)
o $color (Clutter::Color)
string = $text->get_selection $text->set_selection ($start_pos=0, $end_pos=-1)
o $start_pos (integer)
o $end_pos (integer)
boolean = $text->get_single_line_mode $text->set_single_line_mode ($single_line)
o $single_line (boolean)
string or undef = $text->get_text $text->set_text ($string)
o $string (string or undef)
boolean = $text->get_use_markup $text->set_use_markup ($setting)
o $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
o 'left' / 'PANGO_ALIGN_LEFT'
o 'center' / 'PANGO_ALIGN_CENTER'
o 'right' / 'PANGO_ALIGN_RIGHT'
enum Pango::EllipsizeMode
o 'none' / 'PANGO_ELLIPSIZE_NONE'
o 'start' / 'PANGO_ELLIPSIZE_START'
o 'middle' / 'PANGO_ELLIPSIZE_MIDDLE'
o 'end' / 'PANGO_ELLIPSIZE_END'
enum Pango::WrapMode
o 'word' / 'PANGO_WRAP_WORD'
o 'char' / 'PANGO_WRAP_CHAR'
o 'word-char' / 'PANGO_WRAP_WORD_CHAR'

SEE ALSO

Clutter, Glib::Object, Glib::InitiallyUnowned, Clutter::Actor

COPYRIGHT

Copyright (C) 2006, 2007, 2008 OpenedHand Ltd

Copyright (C) 2009 Intel Corporation

This module is free software; you can redistribute it and/or modify it under the terms of either:

o the GNU Lesser General Public Library version 2.1; or

o the Artistic License, version 2.0.

See Clutter for the full copyright notice.
Copyright © 2010-2025 Platon Technologies, s.r.o.           Index | Man stránky | tLDP | Dokumenty | Utilitky | O projekte
Design by styleshout