GooCanvas.CanvasText¶
- Subclasses:
None
Methods¶
- Inherited:
GooCanvas.CanvasItemSimple (9), GObject.Object (37), GooCanvas.CanvasItem (48)
- Structs:
Virtual Methods¶
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
How to align the text |
||
r/w |
How to position the text relative to the given x and y coordinates |
||
r/w |
The preferred place to ellipsize the string, if the label does not have enough room to display the entire string |
||
r/w |
The height to use to layout the text, or -1 to let the text use as much vertical space as needed |
||
r/w |
The text to display |
||
r/w |
Whether to parse PangoMarkup in the text, to support different styles |
||
r/w |
The width to use to layout the text, or -1 to let the text use as much horizontal space as needed |
||
r/w |
The preferred method of wrapping the string if a width has been set |
||
r/w |
The x coordinate of the text |
||
r/w |
The y coordinate of the text |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
layout_width |
r |
||
parent |
r |
||
text_data |
r |
Class Details¶
- class GooCanvas.CanvasText(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GooCanvas.CanvasTextrepresents a text item.It is a subclass of
GooCanvas.CanvasItemSimpleand so inherits all of the style properties such as “fill-color”.It also implements the
GooCanvas.CanvasIteminterface, so you can use theGooCanvas.CanvasItemfunctions such asGooCanvas.CanvasItem.raise_() andGooCanvas.CanvasItem.rotate().The
GooCanvas.CanvasText:widthandGooCanvas.CanvasText:heightproperties specify the area of the item. If it exceeds that area because there is too much text, it is clipped. The properties can be set to -1 to disable clipping.To create a
GooCanvas.CanvasTextuse goo_canvas_text_new().To get or set the properties of an existing
GooCanvas.CanvasText, use g_object_get() and g_object_set().- get_natural_extents()¶
- Returns:
- Return type:
(ink_rect:
Pango.Rectangle, logical_rect:Pango.Rectangle)
Gets the natural extents of the text, in the text item’s coordinate space.
The final extents of the text may be different, if the text item is placed in a layout container such as
GooCanvas.CanvasTable.
Property Details¶
- GooCanvas.CanvasText.props.alignment¶
- Name:
alignment- Type:
- Default Value:
- Flags:
How to align the text
- GooCanvas.CanvasText.props.anchor¶
- Name:
anchor- Type:
- Default Value:
- Flags:
How to position the text relative to the given x and y coordinates
- GooCanvas.CanvasText.props.ellipsize¶
- Name:
ellipsize- Type:
- Default Value:
- Flags:
The preferred place to ellipsize the string, if the label does not have enough room to display the entire string
- GooCanvas.CanvasText.props.height¶
-
The height to use to layout the text, or -1 to let the text use as much vertical space as needed
- GooCanvas.CanvasText.props.text¶
-
The text to display
- GooCanvas.CanvasText.props.use_markup¶
-
Whether to parse PangoMarkup in the text, to support different styles
- GooCanvas.CanvasText.props.width¶
-
The width to use to layout the text, or -1 to let the text use as much horizontal space as needed
- GooCanvas.CanvasText.props.wrap¶
- Name:
wrap- Type:
- Default Value:
- Flags:
The preferred method of wrapping the string if a width has been set
- GooCanvas.CanvasText.props.x¶
-
The x coordinate of the text