Tizen Native API

Functions

void elm_label_wrap_width_set (Elm_Label *obj, Evas_Coord w)
 Set wrap width of the label.
Evas_Coord elm_label_wrap_width_get (const Elm_Label *obj)
 Get wrap width of the label.
void elm_label_slide_mode_set (Elm_Label *obj, Elm_Label_Slide_Mode mode)
 Set the slide mode of the label widget.
Elm_Label_Slide_Mode elm_label_slide_mode_get (const Elm_Label *obj)
 Get the slide mode of the label widget.
void elm_label_slide_duration_set (Elm_Label *obj, double duration)
 Set the slide duration of the label.
double elm_label_slide_duration_get (const Elm_Label *obj)
 Get the slide duration of the label.
void elm_label_line_wrap_set (Elm_Label *obj, Elm_Wrap_Type wrap)
 Set the wrapping behavior of the label.
Elm_Wrap_Type elm_label_line_wrap_get (const Elm_Label *obj)
 Get the wrapping behavior of the label.
void elm_label_ellipsis_set (Elm_Label *obj, Eina_Bool ellipsis)
 Set the ellipsis behavior of the label.
Eina_Bool elm_label_ellipsis_get (const Elm_Label *obj)
 Get the ellipsis behavior of the label.
void elm_label_slide_go (Elm_Label *obj)
 Start slide effect.
Evas_Objectelm_label_add (Evas_Object *parent)
 Add a new label to the parent.

Widget to display text, with simple html-like markup.

label_inheritance_tree.png

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:

  • default - No animation
  • marker - Centers the text in the label and makes it bold by default
  • slide_long - The entire text appears from the right of the screen and slides until it disappears in the left of the screen(reappearing on the right again).
  • slide_short - The text appears in the left of the label and slides to the right to show the overflow. When all of the text has been shown the position is reset.
  • slide_bounce - The text appears in the left of the label and slides to the right to show the overflow. When all of the text has been shown the animation reverses, moving the text to the left.

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.

Enumeration Type Documentation

Slide mode of a label widget

Enumerator:
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


Function Documentation

Add a new label to the parent.

Since :
2.3
Parameters:
[in]parentThe parent object
Returns:
The new object or NULL if it cannot be created
Eina_Bool elm_label_ellipsis_get ( const Elm_Label *  obj)

Get the ellipsis behavior of the label.

Since :
2.3
Returns:
If true, an ellipsis will be shown at the end of the label area.
See also:
elm_label_ellipsis_set()
Parameters:
[in]objThe elm label object
void elm_label_ellipsis_set ( Elm_Label *  obj,
Eina_Bool  ellipsis 
)

Set the ellipsis behavior of the label.

Since :
2.3
Remarks:
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 or if the chosen wrap method was ELM_WRAP_WORD.
Parameters:
[in]objThe elm label object
[in]ellipsisTo ellipsis text or not
Elm_Wrap_Type elm_label_line_wrap_get ( const Elm_Label *  obj)

Get the wrapping behavior of the label.

Since :
2.3
Returns:
Wrap type
See also:
elm_label_line_wrap_set()
Parameters:
[in]objThe elm label object
void elm_label_line_wrap_set ( Elm_Label *  obj,
Elm_Wrap_Type  wrap 
)

Set the wrapping behavior of the label.

Since :
2.3
Remarks:
By default no wrapping is done. Possible values for wrap are:
Parameters:
[in]objThe elm label object
[in]wrapTo wrap text or not
double elm_label_slide_duration_get ( const Elm_Label *  obj)

Get the slide duration of the label.

Since :
2.3
Returns:
The duration time in moving text from slide begin position to slide end position
Remarks:
If you set the speed of the slide you cannot get the correct duration using this function until the label is actually rendered and resized.
See also:
elm_label_slide_duration_set()
Parameters:
[in]objThe elm label object
void elm_label_slide_duration_set ( Elm_Label *  obj,
double  duration 
)

Set the slide duration of the label.

Since :
2.3
Parameters:
[in]objThe elm label object
[in]durationThe duration in seconds in moving text from slide begin position to slide end position
void elm_label_slide_go ( Elm_Label *  obj)

Start slide effect.

Since :
2.3
See also:
elm_label_slide_mode_set()
Since (EFL) :
1.8
Parameters:
[in]objThe elm label object
Elm_Label_Slide_Mode elm_label_slide_mode_get ( const Elm_Label *  obj)

Get the slide mode of the label widget.

Since :
2.3
Returns:
The slide mode
See also:
elm_label_slide_mode_set()
Since (EFL) :
1.8
Parameters:
[in]objThe elm label object
void elm_label_slide_mode_set ( Elm_Label *  obj,
Elm_Label_Slide_Mode  mode 
)

Set the slide mode of the label widget.

Since :
2.3
Remarks:
elm_label_slide_mode_set() changes label slide mode. By default, slide mode is none. Possible values for mode are:
Warning:
ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS only work with the themes "slide_short", "slide_long" and "slide_bounce".
ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS don't work if the line wrap(elm_label_line_wrap_set()) or ellipsis(elm_label_ellipsis_set()) is set.
See also:
elm_label_slide_mode_get().
Since (EFL) :
1.8
Parameters:
[in]objThe elm label object
[in]modeThe slide mode
Evas_Coord elm_label_wrap_width_get ( const Elm_Label *  obj)

Get wrap width of the label.

Since :
2.3
Returns:
The wrap width in pixels at a minimum where words need to wrap
See also:
elm_label_wrap_width_set()
Parameters:
[in]objThe elm label object
void elm_label_wrap_width_set ( Elm_Label *  obj,
Evas_Coord  w 
)

Set wrap width of the label.

Since :
2.3
Remarks:
This function sets the maximum width size hint of the label.
Warning:
This is only relevant if the label is inside a container.
Parameters:
[in]objThe elm label object
[in]wThe wrap width in pixels at a minimum where words need to wrap