Enumerations | Functions
Label

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

Enumerations

enum  Elm_Label_Slide_Mode { ,
  ELM_LABEL_SLIDE_MODE_AUTO,
  ELM_LABEL_SLIDE_MODE_ALWAYS ,
  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_AUTO,
  ELM_LABEL_SLIDE_MODE_ALWAYS ,
  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 (Evas_Coord w)
 Control wrap width of the label. More...
 
EOAPI Evas_Coord elm_obj_label_wrap_width_get (void)
 Control wrap width of the label. More...
 
EOAPI void elm_obj_label_slide_speed_set (double speed)
 Control the slide speed of the label. More...
 
EOAPI double elm_obj_label_slide_speed_get (void)
 Control the slide speed of the label. More...
 
EOAPI void elm_obj_label_slide_mode_set (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 (void)
 Control the slide mode of the label widget. More...
 
EOAPI void elm_obj_label_slide_duration_set (double duration)
 Control the slide duration of the label. More...
 
EOAPI double elm_obj_label_slide_duration_get (void)
 Control the slide duration of the label. More...
 
EOAPI void elm_obj_label_line_wrap_set (Elm_Wrap_Type wrap)
 Control the wrapping behavior of the label. More...
 
EOAPI Elm_Wrap_Type elm_obj_label_line_wrap_get (void)
 Control the wrapping behavior of the label. More...
 
EOAPI void elm_obj_label_ellipsis_set (Eina_Bool ellipsis)
 Control the ellipsis behavior of the label. More...
 
EOAPI Eina_Bool elm_obj_label_ellipsis_get (void)
 Control the ellipsis behavior of the label. More...
 
EOAPI void elm_obj_label_slide_go (void)
 Start slide effect. More...
 
void elm_label_wrap_width_set (Elm_Label *obj, Evas_Coord w)
 Control wrap width of the label. More...
 
Evas_Coord elm_label_wrap_width_get (const Elm_Label *obj)
 Control wrap width of the label. More...
 
void elm_label_slide_speed_set (Elm_Label *obj, double speed)
 Control the slide speed of the label. More...
 
double elm_label_slide_speed_get (const Elm_Label *obj)
 Control the slide speed of the label. More...
 
void elm_label_slide_mode_set (Elm_Label *obj, Elm_Label_Slide_Mode mode)
 Control the slide mode of the label widget. More...
 
Elm_Label_Slide_Mode elm_label_slide_mode_get (const Elm_Label *obj)
 Control the slide mode of the label widget. More...
 
void elm_label_slide_duration_set (Elm_Label *obj, double duration)
 Control the slide duration of the label. More...
 
double elm_label_slide_duration_get (const Elm_Label *obj)
 Control the slide duration of the label. More...
 
void elm_label_line_wrap_set (Elm_Label *obj, Elm_Wrap_Type wrap)
 Control the wrapping behavior of the label. More...
 
Elm_Wrap_Type elm_label_line_wrap_get (const Elm_Label *obj)
 Control the wrapping behavior of the label. More...
 
void elm_label_ellipsis_set (Elm_Label *obj, Eina_Bool ellipsis)
 Control the ellipsis behavior of the label. More...
 
Eina_Bool elm_label_ellipsis_get (const Elm_Label *obj)
 Control the ellipsis behavior of the label. More...
 
void elm_label_slide_go (Elm_Label *obj)
 Start slide effect. More...
 
Evas_Object * elm_label_add (Evas_Object *parent)
 Add a new label to the parent. More...
 

Detailed Description

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

label_inheritance_tree.png
preview-00.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:

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:

See Label example for a demonstration of how to use a label widget.

Enumeration Type Documentation

Slide mode of a label widget.

Enumerator
ELM_LABEL_SLIDE_MODE_AUTO 

No slide effect.

ELM_LABEL_SLIDE_MODE_ALWAYS 

Slide only if the label area is bigger than the text width length.

Slide always.

ELM_LABEL_SLIDE_MODE_AUTO 

No slide effect.

ELM_LABEL_SLIDE_MODE_ALWAYS 

Slide only if the label area is bigger than the text width length.

Slide always.

Slide mode of a label widget.

Enumerator
ELM_LABEL_SLIDE_MODE_AUTO 

No slide effect.

ELM_LABEL_SLIDE_MODE_ALWAYS 

Slide only if the label area is bigger than the text width length.

Slide always.

ELM_LABEL_SLIDE_MODE_AUTO 

No slide effect.

ELM_LABEL_SLIDE_MODE_ALWAYS 

Slide only if the label area is bigger than the text width length.

Slide always.

Function Documentation

Evas_Object* elm_label_add ( Evas_Object *  parent)

Add a new label to the parent.

Parameters
parentThe parent object
Returns
The new object or NULL if it cannot be created
Eina_Bool elm_label_ellipsis_get ( const Elm_Label *  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.

Returns
To ellipsis text or not

References elm_obj_label_ellipsis_get().

void elm_label_ellipsis_set ( Elm_Label *  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.

Parameters
[in]ellipsisTo ellipsis text or not

References elm_obj_label_ellipsis_set().

Elm_Wrap_Type elm_label_line_wrap_get ( const Elm_Label *  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

Returns
To wrap text or not

References elm_obj_label_line_wrap_get().

void elm_label_line_wrap_set ( Elm_Label *  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

Parameters
[in]wrapTo wrap text or not

References elm_obj_label_line_wrap_set().

double elm_label_slide_duration_get ( const Elm_Label *  obj)

Control the slide duration of the label.

Note
If you set the speed of the slide using elm_label_slide_speed_set you cannot get the correct duration using this function until the label is actually rendered and resized.
Returns
The duration in seconds in moving text from slide begin position to slide end position

References elm_obj_label_slide_duration_get().

void elm_label_slide_duration_set ( Elm_Label *  obj,
double  duration 
)

Control the slide duration of the label.

Note
If you set the speed of the slide using elm_label_slide_speed_set you cannot get the correct duration using this function until the label is actually rendered and resized.
Parameters
[in]durationThe duration in seconds in moving text from slide begin position to slide end position

References elm_obj_label_slide_duration_set().

EINA_DEPRECATED Eina_Bool elm_label_slide_get ( const Evas_Object *  obj)

Get whether slide effect is shown or not.

Parameters
objThe label object
Returns
If true, slide effect is shown.
See also
elm_label_slide_set()
Deprecated:
see elm_label_slide_mode_get() instead.

References ELM_LABEL_SLIDE_MODE_ALWAYS, and elm_label_slide_mode_get().

void elm_label_slide_go ( Elm_Label *  obj)

Start slide effect.

See elm_label_slide_mode_set.

References elm_obj_label_slide_go().

Elm_Label_Slide_Mode elm_label_slide_mode_get ( const Elm_Label *  obj)

Control the slide mode of the label widget.

By default, slide mode is none. Possible values for mode are: Elm_Label_Slide_Mode.ELM_LABEL_SLIDE_MODE_NONE - no slide effect Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than the text width length Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS - slide always

Warning
Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS only work with the themes "slide_short", "slide_long" and "slide_bounce". Warning: Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::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.
Returns
The slide mode
Since
1.8

References elm_obj_label_slide_mode_get().

Referenced by elm_label_slide_get().

void elm_label_slide_mode_set ( Elm_Label *  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.ELM_LABEL_SLIDE_MODE_NONE - no slide effect Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than the text width length Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS - slide always

Warning
Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS only work with the themes "slide_short", "slide_long" and "slide_bounce". Warning: Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::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.
Parameters
[in]modeThe slide mode
Since
1.8

References elm_obj_label_slide_mode_set().

Referenced by elm_label_slide_set().

EINA_DEPRECATED void elm_label_slide_set ( Evas_Object *  obj,
Eina_Bool  slide 
)

Set slide effect of label widget.

Parameters
objThe label object
slideIf true, slide effect will be shown

If set to true, the text of the label will slide/scroll through the length of label.

Warning
This only works with the themes "slide_short", "slide_long" and "slide_bounce".
This doesn't work if the line wrap(elm_label_line_wrap_set()) or ellipsis(elm_label_ellipsis_set()) is set.
Deprecated:
see elm_label_slide_mode_set() instead.

References ELM_LABEL_SLIDE_MODE_ALWAYS, and elm_label_slide_mode_set().

double elm_label_slide_speed_get ( const Elm_Label *  obj)

Control the slide speed of the label.

Note
If you set the duration of the slide using elm_label_slide_duration_set you cannot get the correct speed using this function until the label is actually rendered and resized.

See elm_label_slide_duration_set

Returns
The speed of the slide animation in px per seconds

References elm_obj_label_slide_speed_get().

void elm_label_slide_speed_set ( Elm_Label *  obj,
double  speed 
)

Control the slide speed of the label.

Note
If you set the duration of the slide using elm_label_slide_duration_set you cannot get the correct speed using this function until the label is actually rendered and resized.

See elm_label_slide_duration_set

Parameters
[in]speedThe speed of the slide animation in px per seconds

References elm_obj_label_slide_speed_set().

Evas_Coord elm_label_wrap_width_get ( const Elm_Label *  obj)

Control wrap width of the label.

This function sets the maximum width size hint of the label.

Warning
This is only relevant if the label is inside a container.
Returns
The wrap width in pixels at a minimum where words need to wrap

References elm_obj_label_wrap_width_get().

void elm_label_wrap_width_set ( Elm_Label *  obj,
Evas_Coord  w 
)

Control wrap width of the label.

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]wThe wrap width in pixels at a minimum where words need to wrap

References elm_obj_label_wrap_width_set().

EOAPI Eina_Bool elm_obj_label_ellipsis_get ( void  )

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.

Returns
To ellipsis text or not

Referenced by elm_label_ellipsis_get().

EOAPI void elm_obj_label_ellipsis_set ( 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.

Parameters
[in]ellipsisTo ellipsis text or not

Referenced by elm_label_ellipsis_set().

EOAPI Elm_Wrap_Type elm_obj_label_line_wrap_get ( void  )

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

Returns
To wrap text or not

Referenced by elm_label_line_wrap_get().

EOAPI void elm_obj_label_line_wrap_set ( 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

Parameters
[in]wrapTo wrap text or not

Referenced by elm_label_line_wrap_set().

EOAPI double elm_obj_label_slide_duration_get ( void  )

Control the slide duration of the label.

Note
If you set the speed of the slide using elm_obj_label_slide_speed_set you cannot get the correct duration using this function until the label is actually rendered and resized.
Returns
The duration in seconds in moving text from slide begin position to slide end position

Referenced by elm_label_slide_duration_get().

EOAPI void elm_obj_label_slide_duration_set ( double  duration)

Control the slide duration of the label.

Note
If you set the speed of the slide using elm_obj_label_slide_speed_set you cannot get the correct duration using this function until the label is actually rendered and resized.
Parameters
[in]durationThe duration in seconds in moving text from slide begin position to slide end position

Referenced by elm_label_slide_duration_set().

EOAPI void elm_obj_label_slide_go ( void  )

Start slide effect.

See elm_obj_label_slide_mode_set.

Referenced by elm_label_slide_go().

EOAPI Elm_Label_Slide_Mode elm_obj_label_slide_mode_get ( void  )

Control the slide mode of the label widget.

By default, slide mode is none. Possible values for mode are: Elm_Label_Slide_Mode.ELM_LABEL_SLIDE_MODE_NONE - no slide effect Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than the text width length Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS - slide always

Warning
Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS only work with the themes "slide_short", "slide_long" and "slide_bounce". Warning: Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::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.
Returns
The slide mode
Since
1.8

Referenced by elm_label_slide_mode_get().

EOAPI void elm_obj_label_slide_mode_set ( 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.ELM_LABEL_SLIDE_MODE_NONE - no slide effect Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than the text width length Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS - slide always

Warning
Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_ALWAYS only work with the themes "slide_short", "slide_long" and "slide_bounce". Warning: Elm_Label_Slide_Mode::ELM_LABEL_SLIDE_MODE_AUTO, Elm_Label_Slide_Mode::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.
Parameters
[in]modeThe slide mode
Since
1.8

Referenced by elm_label_slide_mode_set().

EOAPI double elm_obj_label_slide_speed_get ( void  )

Control the slide speed of the label.

Note
If you set the duration of the slide using elm_obj_label_slide_duration_set you cannot get the correct speed using this function until the label is actually rendered and resized.

See elm_obj_label_slide_duration_set

Returns
The speed of the slide animation in px per seconds

Referenced by elm_label_slide_speed_get().

EOAPI void elm_obj_label_slide_speed_set ( double  speed)

Control the slide speed of the label.

Note
If you set the duration of the slide using elm_obj_label_slide_duration_set you cannot get the correct speed using this function until the label is actually rendered and resized.

See elm_obj_label_slide_duration_set

Parameters
[in]speedThe speed of the slide animation in px per seconds

Referenced by elm_label_slide_speed_set().

EOAPI Evas_Coord elm_obj_label_wrap_width_get ( void  )

Control wrap width of the label.

This function sets the maximum width size hint of the label.

Warning
This is only relevant if the label is inside a container.
Returns
The wrap width in pixels at a minimum where words need to wrap

Referenced by elm_label_wrap_width_get().

EOAPI void elm_obj_label_wrap_width_set ( Evas_Coord  w)

Control wrap width of the label.

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]wThe wrap width in pixels at a minimum where words need to wrap

Referenced by elm_label_wrap_width_set().