MxLabel

MxLabel — Widget for displaying text

Synopsis

struct              MxLabel;
ClutterActor *      mx_label_new                        (void);
ClutterActor *      mx_label_new_with_text              (const gchar *text);
const gchar *       mx_label_get_text                   (MxLabel *label);
void                mx_label_set_text                   (MxLabel *label,
                                                         const gchar *text);
ClutterActor *         mx_label_get_clutter_text        (MxLabel *label);
void                mx_label_set_x_align                (MxLabel *label,
                                                         MxAlign align);
MxAlign             mx_label_get_x_align                (MxLabel *label);
void                mx_label_set_y_align                (MxLabel *label,
                                                         MxAlign align);
MxAlign             mx_label_get_y_align                (MxLabel *label);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----MxWidget
                     +----MxLabel

Implemented Interfaces

MxLabel implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface and MxStylable.

Properties

  "clutter-text"             ClutterText*          : Read
  "text"                     gchar*                : Read / Write
  "x-align"                  MxAlign               : Read / Write
  "y-align"                  MxAlign               : Read / Write

Description

MxLabel is a simple widget for displaying one or more lines of text. It derives from MxWidget to add extra style and placement functionality over ClutterText. The internal ClutterText is publicly accessibly to allow applications to set further properties.

Details

struct MxLabel

struct MxLabel;

The contents of this structure is private and should only be accessed using the provided API.


mx_label_new ()

ClutterActor *      mx_label_new                        (void);

Create a new MxLabel

Returns :

a new MxLabel

mx_label_new_with_text ()

ClutterActor *      mx_label_new_with_text              (const gchar *text);

Create a new MxLabel with the specified label

text :

text to set the label to

Returns :

a new MxLabel

mx_label_get_text ()

const gchar *       mx_label_get_text                   (MxLabel *label);

Get the text displayed on the label

label :

a MxLabel

Returns :

the text for the label. This must not be freed by the application

mx_label_set_text ()

void                mx_label_set_text                   (MxLabel *label,
                                                         const gchar *text);

Sets the text displayed on the label

label :

a MxLabel

text :

text to set the label to

mx_label_get_clutter_text ()

ClutterActor *         mx_label_get_clutter_text        (MxLabel *label);

Retrieve the internal ClutterText so that extra parameters can be set

label :

a MxLabel

Returns :

the ClutterText used by MxLabel. The label is owned by the MxLabel and should not be unref'ed by the application. [transfer none]

mx_label_set_x_align ()

void                mx_label_set_x_align                (MxLabel *label,
                                                         MxAlign align);


mx_label_get_x_align ()

MxAlign             mx_label_get_x_align                (MxLabel *label);


mx_label_set_y_align ()

void                mx_label_set_y_align                (MxLabel *label,
                                                         MxAlign align);


mx_label_get_y_align ()

MxAlign             mx_label_get_y_align                (MxLabel *label);

Property Details

The "clutter-text" property

  "clutter-text"             ClutterText*          : Read

Internal ClutterText actor.


The "text" property

  "text"                     gchar*                : Read / Write

Text of the label.

Default value: NULL


The "x-align" property

  "x-align"                  MxAlign               : Read / Write

Horizontal position of the text layout.

Default value: MX_ALIGN_START


The "y-align" property

  "y-align"                  MxAlign               : Read / Write

Vertical position of the text layout.

Default value: MX_ALIGN_START