---
name: "Clutter::Text"
section: "3pm"
platform: "linux"
package: "libclutter-perl"
version: "1.002-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Clutter::Text"
---

# Clutter::Text(3pm)

An actor for displaying and editing text

## 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)

- •

  `$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'

## 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:

- •

  the GNU Lesser General Public Library version 2.1; or

- •

  the Artistic License, version 2.0.

See Clutter for the full copyright notice.
