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 is ellipsized or 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 in 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 is changed.
"slide,end"
: The slide has ended.
Typedef Documentation
Called to provide items.
- Since :
- 2.3
- Parameters:
-
[in] | data | The data specified as the last parameter when adding the provider |
[in] | label | The label object |
[in] | text | A pointer to the item href string in the text |
- Returns:
- The object to be placed in the label like an icon, or another element
- See also:
- elm_label_item_provider_append
-
elm_label_item_provider_prepend
-
elm_label_item_provider_remove
Enumeration Type Documentation
Enumeration of Elm Label Slide Mode type
- 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
Adds a new label to the parent.
- Since :
- 2.3
- Parameters:
-
[in] | parent | The parent object |
- Returns:
- The new object, otherwise
NULL
if it cannot be created
Gets the ellipsis behavior of the label.
- Since :
- 2.3
- Parameters:
-
- Returns:
true
if ellipsis are shown at the end of the label area, otherwise false
- See also:
- elm_label_ellipsis_set()
Sets the ellipsis behavior of the label.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The label object |
[in] | ellipsis | The boolean value that indicates whether to add ellipsis to text |
Sets the wrapping behavior of the label.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The label object |
[in] | wrap | The boolean that indicates whether to wrap the text |
Gets the slide duration(speed) of the label.
- Since :
- 2.3
- Parameters:
-
- Returns:
- The duration time in moving text from slide begin position to slide end position
- See also:
- elm_label_slide_duration_set()
Sets the slide duration (speed) of the label.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The label object |
[in] | duration | The duration in seconds in moving text from slide begin position to slide end position |
Sets the slide mode of the label widget.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The label object |
[in] | mode | The slide mode |
- See also:
- elm_label_slide_mode_get()
Gets the wrap width of the label.
- Since :
- 2.3
- Parameters:
-
- Returns:
- The wrap width in pixels at a minimum where words need to wrap
- See also:
- elm_label_wrap_width_set()
Sets the wrap width of the label.
This function sets the maximum width size hint of the label.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The label object |
[in] | w | The wrap width in pixels at a minimum where words need to wrap |