ClutterLabel

ClutterLabel — Actor for displaying text

Synopsis




            ClutterLabelPrivate;
            ClutterLabel;
ClutterActor* clutter_label_new             (void);
ClutterActor* clutter_label_new_with_text   (const gchar *font_name,
                                             const gchar *text);
void        clutter_label_set_text          (ClutterLabel *label,
                                             const gchar *text);
const gchar* clutter_label_get_text         (ClutterLabel *label);
void        clutter_label_set_font_name     (ClutterLabel *label,
                                             const gchar *font_name);
const gchar* clutter_label_get_font_name    (ClutterLabel *label);
void        clutter_label_set_color         (ClutterLabel *label,
                                             const ClutterColor *color);
void        clutter_label_get_color         (ClutterLabel *label,
                                             ClutterColor *color);
void        clutter_label_set_text_extents  (ClutterLabel *label,
                                             gint width,
                                             gint height);
void        clutter_label_get_text_extents  (ClutterLabel *label,
                                             gint *width,
                                             gint *height);

Object Hierarchy


  GObject
   +----ClutterActor
         +----ClutterTexture
               +----ClutterLabel

Properties


  "color"                ClutterColor          : Read / Write
  "font-name"            gchararray            : Read / Write / Construct
  "text"                 gchararray            : Read / Write / Construct

Description

ClutterLabel is a ClutterTexture that displays text.

Details

ClutterLabelPrivate

typedef struct _ClutterLabelPrivate ClutterLabelPrivate;


ClutterLabel

typedef struct _ClutterLabel ClutterLabel;


clutter_label_new ()

ClutterActor* clutter_label_new             (void);

Creates a new, empty ClutterLabel.

Return: the newly created ClutterLabel

Returns :

clutter_label_new_with_text ()

ClutterActor* clutter_label_new_with_text   (const gchar *font_name,
                                             const gchar *text);

Creates a new ClutterLabel displaying text using font_name.

font_name : the name (and size) of the font to be used
text : the text to be displayed
Returns : a ClutterLabel

clutter_label_set_text ()

void        clutter_label_set_text          (ClutterLabel *label,
                                             const gchar *text);

Sets text as the text to be displayed by label.

label : a ClutterLabel
text : the text to be displayed

clutter_label_get_text ()

const gchar* clutter_label_get_text         (ClutterLabel *label);

Retrieves the text displayed by label

label : a ClutterLabel
Returns : the text of the label. The returned string is owned by ClutterLabel and should not be modified or freed.

clutter_label_set_font_name ()

void        clutter_label_set_font_name     (ClutterLabel *label,
                                             const gchar *font_name);

Sets font_name as the font used by label.

font_name must be a string containing the font name and its size, similarly to what you would feed to the pango_font_description_from_string() function.

label : a ClutterLabel
font_name : a font name and size, or NULL for the default font

clutter_label_get_font_name ()

const gchar* clutter_label_get_font_name    (ClutterLabel *label);

Retrieves the font used by label.

label : a ClutterLabel
Returns : a string containing the font name, in a format understandable by pango_font_description_from_string(). The string is owned by ClutterLabel and should not be modified or freed.

clutter_label_set_color ()

void        clutter_label_set_color         (ClutterLabel *label,
                                             const ClutterColor *color);

Sets the color of label.

label : a ClutterLabel
color : a ClutterColor

clutter_label_get_color ()

void        clutter_label_get_color         (ClutterLabel *label,
                                             ClutterColor *color);

Retrieves the color of label.

label : a ClutterLabel
color : return location for a ClutterColor

clutter_label_set_text_extents ()

void        clutter_label_set_text_extents  (ClutterLabel *label,
                                             gint width,
                                             gint height);

Sets the maximum extents of the label's text.

label : a ClutterLabel
width : the width of the text
height : the height of the text

clutter_label_get_text_extents ()

void        clutter_label_get_text_extents  (ClutterLabel *label,
                                             gint *width,
                                             gint *height);

label : a ClutterLabel
width : return location for the width of the extents or NULL
height : return location for the height of the extents or NULL

Property Details

The "color" property

  "color"                ClutterColor          : Read / Write

Font Colour.


The "font-name" property

  "font-name"            gchararray            : Read / Write / Construct

Pango font description.

Default value: NULL


The "text" property

  "text"                 gchararray            : Read / Write / Construct

Text to render.

Default value: NULL