- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Functions
Label

Widget to display text, with simple html-like markup. 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...
Evas_Object * | elm_label_add (Evas_Object *parent)
| Add a new label to the parent. More...
void | elm_label_slide_area_limit_set (Evas_Object *obj, Eina_Bool limit)
| Slide only if the. More...
void | elm_label_line_wrap_set (Evas_Object *obj, Elm_Wrap_Type wrap)
| Set the wrapping behavior of the label. More...
Elm_Wrap_Type | elm_label_line_wrap_get (const Evas_Object *obj)
| Get the wrapping behavior of the label. More...
void | elm_label_wrap_width_set (Evas_Object *obj, Evas_Coord w)
| Set wrap width of the label. More...
Evas_Coord | elm_label_wrap_width_get (const Evas_Object *obj)
| Get wrap width of the label. More...
void | elm_label_ellipsis_set (Evas_Object *obj, Eina_Bool ellipsis)
| Set the ellipsis behavior of the label. More...
Eina_Bool | elm_label_ellipsis_get (const Evas_Object *obj)
| Get the ellipsis behavior of the label. More...
void | elm_label_slide_mode_set (Evas_Object *obj, Elm_Label_Slide_Mode mode)
| Set the slide mode of the label widget. More...
Elm_Label_Slide_Mode | elm_label_slide_mode_get (const Evas_Object *obj)
| Get the slide mode of the label widget. More...
void | elm_label_slide_duration_set (Evas_Object *obj, double duration)
| Set the slide duration (speed) of the label. More...
double | elm_label_slide_duration_get (const Evas_Object *obj)
| Get the slide duration(speed) of the label. More...
void | elm_label_slide_go (Evas_Object *obj)
| Start slide effect. More...
#define | elm_obj_label_line_wrap_set(wrap) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_SET), EO_TYPECHECK(Elm_Wrap_Type, wrap)
| Set the wrapping behavior of the label. More...
#define | elm_obj_label_line_wrap_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_GET), EO_TYPECHECK(Elm_Wrap_Type *, ret)
| Get the wrapping behavior of the label. More...
#define | elm_obj_label_wrap_width_set(w) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_SET), EO_TYPECHECK(Evas_Coord, w)
| Set wrap width of the label. More...
#define | elm_obj_label_wrap_width_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET), EO_TYPECHECK(Evas_Coord *, ret)
| Get wrap width of the label. More...
#define | elm_obj_label_ellipsis_set(ellipsis) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET), EO_TYPECHECK(Eina_Bool, ellipsis)
| Set the ellipsis behavior of the label. More...
#define | elm_obj_label_ellipsis_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Get the ellipsis behavior of the label. More...
#define | elm_obj_label_slide_mode_set(mode) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET), EO_TYPECHECK(Elm_Label_Slide_Mode, mode)
| Set slide effect mode of label widget. More...
#define | elm_obj_label_slide_mode_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET), EO_TYPECHECK(Elm_Label_Slide_Mode *, ret)
| Get current slide effect mode. More...
#define | elm_obj_label_slide_duration_set(duration) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET), EO_TYPECHECK(double, duration)
| Set the slide duration (speed) of the label. More...
#define | elm_obj_label_slide_duration_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), EO_TYPECHECK(double *, ret)
| Get the slide duration(speed) of the label. More...
#define | elm_obj_label_slide_go() ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_GO)
| Start slide effect. More...

## Detailed Description

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:

- 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.

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

## Macro Definition Documentation

#define elm_obj_label_ellipsis_get | ( |  | ret | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), EO_TYPECHECK(Eina_Bool *, ret)

Get the ellipsis behavior of the label.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_label_ellipsis_get

Referenced by elm_label_ellipsis_get().

#define elm_obj_label_ellipsis_set | ( |  | ellipsis | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET), EO_TYPECHECK(Eina_Bool, ellipsis)

Set the ellipsis behavior of the label.

Since
  1.8

Parameters

  [in] | ellipsis |

See Also
  elm_label_ellipsis_set

Referenced by elm_label_ellipsis_set().

#define elm_obj_label_line_wrap_get | ( |  | ret | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_GET), EO_TYPECHECK(Elm_Wrap_Type *, ret)

Get the wrapping behavior of the label.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_label_line_wrap_get

Referenced by elm_label_line_wrap_get().

#define elm_obj_label_line_wrap_set | ( |  | wrap | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_SET), EO_TYPECHECK(Elm_Wrap_Type, wrap)

Set the wrapping behavior of the label.

Since
  1.8

Parameters

  [in] | wrap |

See Also
  elm_label_line_wrap_set

Referenced by elm_label_line_wrap_set().

#define elm_obj_label_slide_duration_get | ( |  | ret | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), EO_TYPECHECK(double *, ret)

Get the slide duration(speed) of the label.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_label_slide_duration_get

Referenced by elm_label_slide_duration_get().

#define elm_obj_label_slide_duration_set | ( |  | duration | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET), EO_TYPECHECK(double, duration)

Set the slide duration (speed) of the label.

Since
  1.8

Parameters

  [in] | duration |

See Also
  elm_label_slide_duration_set

Referenced by elm_label_slide_duration_set().

#define elm_obj_label_slide_go | ( |  | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_GO)

Start slide effect.

Since
  1.8

See Also
  elm_label_slide_mode_set

Referenced by elm_label_slide_go().

#define elm_obj_label_slide_mode_get | ( |  | ret | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET), EO_TYPECHECK(Elm_Label_Slide_Mode *, ret)

Get current slide effect mode.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_label_slide_mode_get

Referenced by elm_label_slide_mode_get().

#define elm_obj_label_slide_mode_set | ( |  | mode | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET), EO_TYPECHECK(Elm_Label_Slide_Mode, mode)

Set slide effect mode of label widget.

Since
  1.8

Parameters

  [in] | mode |

See Also
  elm_label_slide_mode_set

Referenced by elm_label_slide_mode_set().

#define elm_obj_label_wrap_width_get | ( |  | ret | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET), EO_TYPECHECK(Evas_Coord *, ret)

Get wrap width of the label.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_label_wrap_width_get

Referenced by elm_label_wrap_width_get().

#define elm_obj_label_wrap_width_set | ( |  | w | ) | ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_SET), EO_TYPECHECK(Evas_Coord, w)

Set wrap width of the label.

Since
  1.8

Parameters

  [in] | w |

See Also
  elm_label_wrap_width_set

Referenced by elm_label_wrap_width_set().

## Function Documentation

Evas_Object* elm_label_add | ( | Evas_Object * | parent | ) |

Add a new label to the parent.

Parameters

  parent | The parent object

Returns
  The new object or NULL if it cannot be created

Eina_Bool elm_label_ellipsis_get | ( | const Evas_Object * | obj | ) |

Get the ellipsis behavior of the label.

Parameters

  obj | The label object

Returns
  If true, an ellipsis will be shown at the end of the label area.

See Also
  elm_label_ellipsis_set()

References elm_obj_label_ellipsis_get.

void elm_label_ellipsis_set | ( | Evas_Object * | obj,
|  | Eina_Bool | ellipsis
| ) |  |

Set the ellipsis behavior of the label.

Parameters

  obj | The label object
  ellipsis | To ellipsis text or not

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.

References elm_obj_label_ellipsis_set.

Elm_Wrap_Type elm_label_line_wrap_get | ( | const Evas_Object * | obj | ) |

Get the wrapping behavior of the label.

Parameters

  obj | The label object

Returns
  Wrap type

See Also
  elm_label_line_wrap_set()

References elm_obj_label_line_wrap_get.

void elm_label_line_wrap_set | ( | Evas_Object * | obj,
|  | Elm_Wrap_Type | wrap
| ) |  |

Set the wrapping behavior of the label.

Parameters

  obj | The label object
  wrap | To wrap text or not

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

References elm_obj_label_line_wrap_set.

void elm_label_slide_area_limit_set | ( | Evas_Object * | obj,
|  | Eina_Bool | limit
| ) |  |

Slide only if the.

Parameters

  obj | The label object
  duration | The duration in seconds in moving text from slide begin position to slide end position

double elm_label_slide_duration_get | ( | const Evas_Object * | obj | ) |

Get the slide duration(speed) of the label.

Parameters

  obj | The label object

Returns
  The duration time in moving text from slide begin position to slide end position

See Also
  elm_label_slide_duration_set()

References elm_obj_label_slide_duration_get.

void elm_label_slide_duration_set | ( | Evas_Object * | obj,
|  | double | duration
| ) |  |

Set the slide duration (speed) of the label.

Parameters

  obj | The label object
  duration | The 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

  obj | The 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_get().

void elm_label_slide_go | ( | Evas_Object * | obj | ) |

Start slide effect.

Parameters

  obj | The label object

See Also
  elm_label_slide_mode_set()

Since
  1.8

References elm_obj_label_slide_go.

Elm_Label_Slide_Mode elm_label_slide_mode_get | ( | const Evas_Object * | obj | ) |

Get the slide mode of the label widget.

Parameters

  obj | The label object

Returns
  The slide mode

See Also
  elm_label_slide_mode_set()

Since
  1.8

References elm_obj_label_slide_mode_get.

Referenced by elm_label_slide_get().

void elm_label_slide_mode_set | ( | Evas_Object * | obj,
|  | Elm_Label_Slide_Mode | mode
| ) |  |

Set the slide mode of the label widget.

Parameters

  obj | The label object
  mode | The slide mode

elm_label_slide_mode_set() changes label slide mode. 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

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

  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.

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_set().

Evas_Coord elm_label_wrap_width_get | ( | const Evas_Object * | obj | ) |

Get wrap width of the label.

Parameters

  obj | The label object

Returns
  The wrap width in pixels at a minimum where words need to wrap

See Also
  elm_label_wrap_width_set()

References elm_obj_label_wrap_width_get.

void elm_label_wrap_width_set | ( | Evas_Object * | obj,
|  | Evas_Coord | w
| ) |  |

Set wrap width of the label.

Parameters

  obj | The label object
  w | The wrap width in pixels at a minimum where words need to wrap

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

Warning
  This is only relevant if the label is inside a container.

References elm_obj_label_wrap_width_set.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:13