![]() |
![]() |
![]() |
Mx Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct MxLabel; struct MxLabelClass; 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
); gboolean mx_label_get_use_markup (MxLabel *label
); void mx_label_set_use_markup (MxLabel *label
,gboolean use_markup
); ClutterActor * mx_label_get_clutter_text (MxLabel *label
); MxAlign mx_label_get_x_align (MxLabel *label
); void mx_label_set_x_align (MxLabel *label
,MxAlign align
); MxAlign mx_label_get_y_align (MxLabel *label
); void mx_label_set_y_align (MxLabel *label
,MxAlign align
); gboolean mx_label_get_line_wrap (MxLabel *label
); void mx_label_set_line_wrap (MxLabel *label
,gboolean line_wrap
); void mx_label_set_fade_out (MxLabel *label
,gboolean fade
); gboolean mx_label_get_fade_out (MxLabel *label
);
MxLabel implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and MxStylable.
"clutter-text" ClutterText* : Read "fade-out" gboolean : Read / Write "line-wrap" gboolean : Read / Write "show-tooltip" gboolean : Read / Write "text" gchar* : Read / Write "use-markup" gboolean : Read / Write "x-align" MxAlign : Read / Write "y-align" MxAlign : Read / Write
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.
struct MxLabel;
The contents of this structure is private and should only be accessed using the provided API.
struct MxLabelClass { MxWidgetClass parent_class; /* padding for future expansion */ void (*_padding_0) (void); void (*_padding_1) (void); void (*_padding_2) (void); void (*_padding_3) (void); void (*_padding_4) (void); };
ClutterActor * mx_label_new_with_text (const gchar *text
);
Create a new MxLabel with the specified label
|
text to set the label to |
Returns : |
a new MxLabel |
const gchar * mx_label_get_text (MxLabel *label
);
Get the text displayed on the label
|
a MxLabel |
Returns : |
the text for the label. This must not be freed by the application |
void mx_label_set_text (MxLabel *label
,const gchar *text
);
Sets the text displayed on the label
|
a MxLabel |
|
text to set the label to |
gboolean mx_label_get_use_markup (MxLabel *label
);
Determines whether the text of the label is being treated as Pango markup.
|
a MxLabel |
Returns : |
TRUE if the text of the label is treated as Pango markup,
FALSE otherwise. |
Since 1.2
void mx_label_set_use_markup (MxLabel *label
,gboolean use_markup
);
Sets whether the text of the label should be treated as Pango markup.
|
a MxLabel |
|
TRUE to use Pango markup, FALSE otherwise |
ClutterActor * mx_label_get_clutter_text (MxLabel *label
);
Retrieve the internal ClutterText so that extra parameters can be set
gboolean mx_label_get_line_wrap (MxLabel *label
);
Get the value of the "line-wrap" property.
|
An MxLabel |
Returns : |
TRUE if the "line-wrap" property is set. |
Since 1.2
void mx_label_set_line_wrap (MxLabel *label
,gboolean line_wrap
);
Set the value of the "line-wrap" property.
|
An MxLabel |
|
new value of the line-wrap property. |
Since 1.2
void mx_label_set_fade_out (MxLabel *label
,gboolean fade
);
Set whether to fade out the end of the label, instead of ellipsizing. Enabling this mode will also set the "single-line-mode" and "ellipsize" properties.
|
A MxLabel |
|
TRUE to fade out, FALSE otherwise |
Since 1.2
"fade-out"
property "fade-out" gboolean : Read / Write
Fade out the end of the label, instead of ellipsizing.
Default value: FALSE
"line-wrap"
property "line-wrap" gboolean : Read / Write
Whether to wrap the lines of "text" if the contents exceed the available allocation.
Default value: FALSE
Since 1.2
"show-tooltip"
property "show-tooltip" gboolean : Read / Write
Show a tooltip when there is not enough space to display the text. If set
to TRUE
, this will also cause the "reactive" property to be
enabled.
Default value: FALSE
Since 1.4
"use-markup"
property "use-markup" gboolean : Read / Write
Whether the text of the label should be treated as Pango markup.
Default value: FALSE
"x-align"
property"x-align" MxAlign : Read / Write
Horizontal position of the text layout.
Default value: MX_ALIGN_START
"y-align"
property"y-align" MxAlign : Read / Write
Vertical position of the text layout.
Default value: MX_ALIGN_START