Widget to display text, with simple html-like markup. More...
Macros | |
#define | ELM_LABEL_CLASS elm_label_class_get() |
Elementary label class. | |
#define | ELM_LABEL_EVENT_SLIDE_END (&(_ELM_LABEL_EVENT_SLIDE_END)) |
Called when slide stopped. | |
Enumerations | |
enum | Elm_Label_Slide_Mode { ELM_LABEL_SLIDE_MODE_NONE = 0, ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS, ELM_LABEL_SLIDE_MODE_NONE = 0, ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS } |
Slide mode of a label widget. More... | |
enum | Elm_Label_Slide_Mode { ELM_LABEL_SLIDE_MODE_NONE = 0, ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS, ELM_LABEL_SLIDE_MODE_NONE = 0, ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS } |
Slide mode of a label widget. More... | |
Functions | |
EINA_DEPRECATED void | elm_label_slide_set (Evas_Object *obj, Eina_Bool slide) |
Set slide effect of label widget. More... | |
EINA_DEPRECATED Eina_Bool | elm_label_slide_get (const Evas_Object *obj) |
Get whether slide effect is shown or not. More... | |
EOAPI void | elm_obj_label_wrap_width_set (Eo *obj, int w) |
Control wrap width of the label. More... | |
EOAPI int | elm_obj_label_wrap_width_get (const Eo *obj) |
Control wrap width of the label. More... | |
EOAPI void | elm_obj_label_slide_speed_set (Eo *obj, double speed) |
Control the slide speed of the label. More... | |
EOAPI double | elm_obj_label_slide_speed_get (const Eo *obj) |
Control the slide speed of the label. More... | |
EOAPI void | elm_obj_label_slide_mode_set (Eo *obj, Elm_Label_Slide_Mode mode) |
Control the slide mode of the label widget. More... | |
EOAPI Elm_Label_Slide_Mode | elm_obj_label_slide_mode_get (const Eo *obj) |
Control the slide mode of the label widget. More... | |
EOAPI void | elm_obj_label_slide_duration_set (Eo *obj, double duration) |
Control the slide duration of the label. More... | |
EOAPI double | elm_obj_label_slide_duration_get (const Eo *obj) |
Control the slide duration of the label. More... | |
EOAPI void | elm_obj_label_line_wrap_set (Eo *obj, Elm_Wrap_Type wrap) |
Control the wrapping behavior of the label. More... | |
EOAPI Elm_Wrap_Type | elm_obj_label_line_wrap_get (const Eo *obj) |
Control the wrapping behavior of the label. More... | |
EOAPI void | elm_obj_label_ellipsis_set (Eo *obj, Eina_Bool ellipsis) |
Control the ellipsis behavior of the label. More... | |
EOAPI Eina_Bool | elm_obj_label_ellipsis_get (const Eo *obj) |
Control the ellipsis behavior of the label. More... | |
EOAPI void | elm_obj_label_slide_go (Eo *obj) |
Start slide effect. More... | |
Evas_Object * | elm_label_add (Evas_Object *parent) |
Add a new label to the parent. More... | |
Widget to display text, with simple html-like markup.
The Label widget doesn't allow text to overflow its boundaries, if the text doesn't fit the geometry of the label it will be ellipsized or be cut. Elementary provides several styles for this widget:
Custom themes can of course invent new markup tags and style them any way they like.
This widget inherits from the Layout one, so that all the functions acting on it also work for label objects.
This widget emits the following signals, besides the ones sent from Layout :
"language,changed"
: The program's language changed. "slide,end"
: The slide is end.See Label example for a demonstration of how to use a label widget.
enum Elm_Label_Slide_Mode |
Slide mode of a label widget.
enum Elm_Label_Slide_Mode |
Slide mode of a label widget.
EINA_DEPRECATED void elm_label_slide_set | ( | Evas_Object * | obj, |
Eina_Bool | slide | ||
) |
Set slide effect of label widget.
obj | The label object |
slide | If true, slide effect will be shown |
If set to true, the text of the label will slide/scroll through the length of label.
References ELM_LABEL_SLIDE_MODE_ALWAYS, and ELM_LABEL_SLIDE_MODE_NONE.
EINA_DEPRECATED Eina_Bool elm_label_slide_get | ( | const Evas_Object * | obj | ) |
Get whether slide effect is shown or not.
obj | The label object |
References EINA_FALSE, EINA_TRUE, and ELM_LABEL_SLIDE_MODE_ALWAYS.
EOAPI void elm_obj_label_wrap_width_set | ( | Eo * | obj, |
int | w | ||
) |
Control wrap width of the label.
This function sets the maximum width size hint of the label.
[in] | obj | The object. |
[in] | w | The wrap width in pixels at a minimum where words need to wrap |
EOAPI int elm_obj_label_wrap_width_get | ( | const Eo * | obj | ) |
Control wrap width of the label.
This function sets the maximum width size hint of the label.
[in] | obj | The object. |
EOAPI void elm_obj_label_slide_speed_set | ( | Eo * | obj, |
double | speed | ||
) |
Control the slide speed of the label.
See elm_obj_label_slide_duration_set
[in] | obj | The object. |
[in] | speed | The speed of the slide animation in px per seconds |
EOAPI double elm_obj_label_slide_speed_get | ( | const Eo * | obj | ) |
Control the slide speed of the label.
See elm_obj_label_slide_duration_set
[in] | obj | The object. |
EOAPI void elm_obj_label_slide_mode_set | ( | Eo * | obj, |
Elm_Label_Slide_Mode | mode | ||
) |
Control the slide mode of the label widget.
By default, slide mode is none. Possible values for mode
are: ELM_LABEL_SLIDE_MODE_NONE - no slide effect ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than the text width length ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
[in] | obj | The object. |
[in] | mode | The slide mode |
EOAPI Elm_Label_Slide_Mode elm_obj_label_slide_mode_get | ( | const Eo * | obj | ) |
Control the slide mode of the label widget.
By default, slide mode is none. Possible values for mode
are: ELM_LABEL_SLIDE_MODE_NONE - no slide effect ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than the text width length ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
[in] | obj | The object. |
EOAPI void elm_obj_label_slide_duration_set | ( | Eo * | obj, |
double | duration | ||
) |
Control the slide duration of the label.
[in] | obj | The object. |
[in] | duration | The duration in seconds in moving text from slide begin position to slide end position |
EOAPI double elm_obj_label_slide_duration_get | ( | const Eo * | obj | ) |
Control the slide duration of the label.
[in] | obj | The object. |
EOAPI void elm_obj_label_line_wrap_set | ( | Eo * | obj, |
Elm_Wrap_Type | wrap | ||
) |
Control the wrapping behavior of the label.
By default no wrapping is done. Possible values for wrap
are: ELM_WRAP_NONE
- No wrapping ELM_WRAP_CHAR
- wrap between characters ELM_WRAP_WORD
- wrap between words ELM_WRAP_MIXED
- Word wrap, and if that fails, char wrap
[in] | obj | The object. |
[in] | wrap | To wrap text or not |
EOAPI Elm_Wrap_Type elm_obj_label_line_wrap_get | ( | const Eo * | obj | ) |
Control the wrapping behavior of the label.
By default no wrapping is done. Possible values for wrap
are: ELM_WRAP_NONE
- No wrapping ELM_WRAP_CHAR
- wrap between characters ELM_WRAP_WORD
- wrap between words ELM_WRAP_MIXED
- Word wrap, and if that fails, char wrap
[in] | obj | The object. |
EOAPI void elm_obj_label_ellipsis_set | ( | Eo * | obj, |
Eina_Bool | ellipsis | ||
) |
Control the ellipsis behavior of the label.
If set to true and the text doesn't fit in the label an ellipsis("...") will be shown at the end of the widget.
Warning This doesn't work with slide(elm_label_slide_set()) or if the chosen wrap method was ELM_WRAP_WORD
.
[in] | obj | The object. |
[in] | ellipsis | To ellipsis text or not |
EOAPI Eina_Bool elm_obj_label_ellipsis_get | ( | const Eo * | obj | ) |
Control the ellipsis behavior of the label.
If set to true and the text doesn't fit in the label an ellipsis("...") will be shown at the end of the widget.
Warning This doesn't work with slide(elm_label_slide_set()) or if the chosen wrap method was ELM_WRAP_WORD
.
[in] | obj | The object. |
EOAPI void elm_obj_label_slide_go | ( | Eo * | obj | ) |
Evas_Object* elm_label_add | ( | Evas_Object * | parent | ) |
Add a new label to the parent.
parent | The parent object |
References EINA_SAFETY_ON_NULL_RETURN_VAL.