---
name: "Goo::Canvas::TextModel"
section: "3pm"
platform: "linux"
package: "libgoo-canvas-perl"
version: "0.06-2+b3"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Goo::Canvas::TextModel"
---

# Goo::Canvas::TextModel(3pm)

wrapper for GooCanvasTextModel

## NAME

Goo::Canvas::TextModel - wrapper for GooCanvasTextModel

## HIERARCHY

```
  Glib::Object
  +----Goo::Canvas::ItemModelSimple
       +----Goo::Canvas::TextModel
```

## INTERFACES

```
  Goo::Canvas::ItemModel
```

## METHODS

### itemmodel = Goo::Canvas::TextModel-\>new ($parent, $string, $x, $y, $width, $anchor, ...)

- •

  `$parent` (Goo::Canvas::ItemModel)

- •

  `$string` (string)

- •

  `$x` (double)

- •

  `$y` (double)

- •

  `$width` (double)

- •

  `$anchor` (Gtk2::AnchorType)

- •

  ... (list)

## PROPERTIES

- 'alignment' (Pango::Alignment : default "left" : readable / writable)

  How to align the text

- 'anchor' (Gtk2::AnchorType : default "north-west" : readable / writable)

  How to position the text relative to the given x and y coordinates

- 'ellipsize' (Pango::EllipsizeMode : default "none" : readable / writable)

  The preferred place to ellipsize the string, if the label does not have enough room to display the entire string

- 'height' (double : default -1 : readable / writable)

  The height to use to layout the text, or -1 to let the text use as much vertical space as needed

- 'text' (string : default undef : readable / writable)

  The text to display

- 'use-markup' (boolean : default false : readable / writable)

  Whether to parse PangoMarkup in the text, to support different styles

- 'width' (double : default -1 : readable / writable)

  The width to use to layout the text, or -1 to let the text use as much horizontal space as needed

- 'wrap' (Pango::WrapMode : default "word" : readable / writable)

  The preferred method of wrapping the string if a width has been set

- 'x' (double : default 0 : readable / writable)

  The x coordinate of the text

- 'y' (double : default 0 : readable / writable)

  The y coordinate of the text

## ENUMS AND FLAGS

### enum Gtk2::AnchorType

- •

  'center' / 'GTK\_ANCHOR\_CENTER'

- •

  'north' / 'GTK\_ANCHOR\_NORTH'

- •

  'north-west' / 'GTK\_ANCHOR\_NORTH\_WEST'

- •

  'north-east' / 'GTK\_ANCHOR\_NORTH\_EAST'

- •

  'south' / 'GTK\_ANCHOR\_SOUTH'

- •

  'south-west' / 'GTK\_ANCHOR\_SOUTH\_WEST'

- •

  'south-east' / 'GTK\_ANCHOR\_SOUTH\_EAST'

- •

  'west' / 'GTK\_ANCHOR\_WEST'

- •

  'east' / 'GTK\_ANCHOR\_EAST'

- •

  'n' / 'GTK\_ANCHOR\_N'

- •

  'nw' / 'GTK\_ANCHOR\_NW'

- •

  'ne' / 'GTK\_ANCHOR\_NE'

- •

  's' / 'GTK\_ANCHOR\_S'

- •

  'sw' / 'GTK\_ANCHOR\_SW'

- •

  'se' / 'GTK\_ANCHOR\_SE'

- •

  'w' / 'GTK\_ANCHOR\_W'

- •

  'e' / 'GTK\_ANCHOR\_E'

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

Glib::Object, Goo::Canvas::ItemModelSimple

## COPYRIGHT

Copyright (C) 2014 Gtk2-Perl Team
