GooCanvas.CanvasTextModel

g GObject.GInterface GObject.GInterface GooCanvas.CanvasItemModel GooCanvas.CanvasItemModel GObject.GInterface->GooCanvas.CanvasItemModel GObject.Object GObject.Object GooCanvas.CanvasItemModelSimple GooCanvas.CanvasItemModelSimple GObject.Object->GooCanvas.CanvasItemModelSimple GooCanvas.CanvasItemModel->GooCanvas.CanvasItemModelSimple GooCanvas.CanvasTextModel GooCanvas.CanvasTextModel GooCanvas.CanvasItemModelSimple->GooCanvas.CanvasTextModel

Subclasses:

None

Methods

Inherited:

GObject.Object (37), GooCanvas.CanvasItemModel (30)

Structs:

GObject.ObjectClass (5)

Virtual Methods

Inherited:

GObject.Object (7), GooCanvas.CanvasItemModel (19)

Properties

Inherited:

GooCanvas.CanvasItemModelSimple (23), GooCanvas.CanvasItemModel (9)

Name

Type

Flags

Short Description

alignment

Pango.Alignment

r/w

How to align the text

anchor

GooCanvas.CanvasAnchorType

r/w

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

ellipsize

Pango.EllipsizeMode

r/w

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

height

float

r/w

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

text

str

r/w

The text to display

use-markup

bool

r/w

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

width

float

r/w

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

wrap

Pango.WrapMode

r/w

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

x

float

r/w

The x coordinate of the text

y

float

r/w

The y coordinate of the text

Signals

Inherited:

GObject.Object (1), GooCanvas.CanvasItemModel (6)

Fields

Inherited:

GObject.Object (1), GooCanvas.CanvasItemModel (6)

Name

Type

Access

Description

parent_object

GooCanvas.CanvasItemModelSimple

r

text_data

GooCanvas.CanvasTextData

r

Class Details

class GooCanvas.CanvasTextModel(**kwargs)
Bases:

GooCanvas.CanvasItemModelSimple

Abstract:

No

Structure:

GooCanvas.CanvasTextModelClass

GooCanvas.CanvasTextModel represents a model for text items.

It is a subclass of GooCanvas.CanvasItemModelSimple and so inherits all of the style properties such as “fill-color”.

It also implements the GooCanvas.CanvasItemModel interface, so you can use the GooCanvas.CanvasItemModel functions such as GooCanvas.CanvasItemModel.raise_() and GooCanvas.CanvasItemModel.rotate().

To create a GooCanvas.CanvasTextModel use goo_canvas_text_model_new().

To get or set the properties of an existing GooCanvas.CanvasTextModel, use g_object_get() and g_object_set().

To respond to events such as mouse clicks on the text item you must connect to the signal handlers of the corresponding GooCanvas.CanvasText objects. (See GooCanvas.Canvas.get_item() and GooCanvas.Canvas ::item-created.)

Property Details

GooCanvas.CanvasTextModel.props.alignment
Name:

alignment

Type:

Pango.Alignment

Default Value:

Pango.Alignment.LEFT

Flags:

READABLE, WRITABLE

How to align the text

GooCanvas.CanvasTextModel.props.anchor
Name:

anchor

Type:

GooCanvas.CanvasAnchorType

Default Value:

GooCanvas.CanvasAnchorType.NORTH_WEST

Flags:

READABLE, WRITABLE

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

GooCanvas.CanvasTextModel.props.ellipsize
Name:

ellipsize

Type:

Pango.EllipsizeMode

Default Value:

Pango.EllipsizeMode.NONE

Flags:

READABLE, WRITABLE

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

GooCanvas.CanvasTextModel.props.height
Name:

height

Type:

float

Default Value:

-1.0

Flags:

READABLE, WRITABLE

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

GooCanvas.CanvasTextModel.props.text
Name:

text

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The text to display

GooCanvas.CanvasTextModel.props.use_markup
Name:

use-markup

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

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

GooCanvas.CanvasTextModel.props.width
Name:

width

Type:

float

Default Value:

-1.0

Flags:

READABLE, WRITABLE

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

GooCanvas.CanvasTextModel.props.wrap
Name:

wrap

Type:

Pango.WrapMode

Default Value:

Pango.WrapMode.WORD

Flags:

READABLE, WRITABLE

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

GooCanvas.CanvasTextModel.props.x
Name:

x

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The x coordinate of the text

GooCanvas.CanvasTextModel.props.y
Name:

y

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The y coordinate of the text