## HippoCanvasText

HippoCanvasText

## Synopsis

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

    enum                HippoCanvasSizeMode;
                        HippoCanvasText;
    HippoCanvasItem*    hippo_canvas_text_new               (void);

## Object Hierarchy

      GObject
       +----HippoCanvasBox
             +----HippoCanvasText
                   +----HippoCanvasLink

## Implemented Interfaces

HippoCanvasText implements HippoCanvasItem, HippoCanvasContext and HippoCanvasContainer.

## Properties

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

## Description

## Details

### enum HippoCanvasSizeMode

    typedef enum {
        HIPPO_CANVAS_SIZE_FULL_WIDTH,
        HIPPO_CANVAS_SIZE_WRAP_WORD,
        HIPPO_CANVAS_SIZE_ELLIPSIZE_END
    } HippoCanvasSizeMode;

### HippoCanvasText

    typedef struct _HippoCanvasText HippoCanvasText;

### hippo_canvas_text_new ()

    HippoCanvasItem*    hippo_canvas_text_new               (void);

Returns : |

## Property Details

### The `"attributes"` property

      "attributes"               PangoAttrList*        : Read / Write

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

### The `"font-scale"` property

      "font-scale"               gdouble               : Read / Write

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.

Allowed values: [0,100]

Default value: 1

### The `"markup"` property

      "markup"                   gchar*                : Write

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.

Default value: NULL

### The `"size-mode"` property

      "size-mode"                HippoCanvasSizeMode   : Read / Write

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.

Default value: HIPPO_CANVAS_SIZE_FULL_WIDTH

### The `"text"` property

      "text"                     gchar*                : Read / Write

The text to display.

Default value: NULL