HippoCanvasText

HippoCanvasText

Functions

Properties

PangoAttrList * attributes Read / Write
gdouble font-scale Read / Write
gchar * markup Write
HippoCanvasSizeMode size-mode Read / Write
gchar * text Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── HippoCanvasBox
        ╰── HippoCanvasText
            ╰── HippoCanvasLink

Implemented Interfaces

HippoCanvasText implements HippoCanvasItem, HippoCanvasContext and HippoCanvasContainer.

Includes

#include <hippo/hippo-canvas-text.h>

Description

Functions

hippo_canvas_text_new ()

HippoCanvasItem *
hippo_canvas_text_new (void);

Types and Values

enum HippoCanvasSizeMode

Members

HIPPO_CANVAS_SIZE_FULL_WIDTH

   

HIPPO_CANVAS_SIZE_WRAP_WORD

   

HIPPO_CANVAS_SIZE_ELLIPSIZE_END

   

struct HippoCanvasText

struct HippoCanvasText;

Property Details

The “attributes” property

  “attributes”               PangoAttrList *

The Pango attributes of the text; usually it is more convenient to use the 'markup' property than to do the attributes by hand.

Flags: Read / Write


The “font-scale” property

  “font-scale”               gdouble

A scale factor for the font; Pango exports constants for common factors, such as PANGO_SCALE_LARGE, PANGO_SCALE_X_SMALL and so forth. If you want to set an absolute font size, use the 'font' or 'font-desc' properties which are introduced in the HippoCanvasBox base class.

Flags: Read / Write

Allowed values: [0,100]

Default value: 1


The “markup” property

  “markup”                   gchar *

The text to display in Pango markup format, allowing you to do bold and other text styles. This is a shortcut way to set the 'text' and 'attributes' properties.

Flags: Write

Default value: NULL


The “size-mode” property

  “size-mode”                HippoCanvasSizeMode

Three "size modes" are available. In HIPPO_CANVAS_SIZE_FULL_WIDTH mode, the text item will give the width of its text as its minimum size. In HIPPO_CANVAS_SIZE_WRAP_WORD, the text item will wrap to fit available space - its minimum width will be pretty small, but as the width decreases its height will increase. In HIPPO_CANVAS_SIZE_ELLIPSIZE_END mode, the width of the text will be the natural width of the item, but the minimum width will be small. If the item gets less than its natural width, it will ellipsize the text in order to fit in available space.

If none of that made sense, just decide whether you want to always display all the text without wrapping, want to be able to wrap as the available space shrinks, or want to ellipsize the text as the available space shrinks.

Flags: Read / Write

Default value: HIPPO_CANVAS_SIZE_FULL_WIDTH


The “text” property

  “text”                     gchar *

The text to display.

Flags: Read / Write

Default value: NULL