2 * @defgroup Label Label
4 * @image html img/widget/label/preview-00.png
5 * @image latex img/widget/label/preview-00.eps
7 * @brief Widget to display text, with simple html-like markup.
9 * The Label widget @b doesn't allow text to overflow its boundaries, if the
10 * text doesn't fit the geometry of the label it will be ellipsized or be
11 * cut. Elementary provides several styles for this widget:
12 * @li default - No animation
13 * @li marker - Centers the text in the label and makes it bold by default
14 * @li slide_long - The entire text appears from the right of the screen and
15 * slides until it disappears in the left of the screen(reappearing on the
17 * @li slide_short - The text appears in the left of the label and slides to
18 * the right to show the overflow. When all of the text has been shown the
20 * @li slide_bounce - The text appears in the left of the label and slides to
21 * the right to show the overflow. When all of the text has been shown the
22 * animation reverses, moving the text to the left.
24 * Custom themes can of course invent new markup tags and style them any way
27 * The following signals may be emitted by the label widget:
28 * @li "language,changed": The program's language changed.
30 * See @ref tutorial_label for a demonstration of how to use a label widget.
35 * @brief Add a new label to the parent
37 * @param parent The parent object
38 * @return The new object or NULL if it cannot be created
40 EAPI Evas_Object *elm_label_add(Evas_Object *parent);
43 * @brief Set the wrapping behavior of the label
45 * @param obj The label object
46 * @param wrap To wrap text or not
48 * By default no wrapping is done. Possible values for @p wrap are:
49 * @li ELM_WRAP_NONE - No wrapping
50 * @li ELM_WRAP_CHAR - wrap between characters
51 * @li ELM_WRAP_WORD - wrap between words
52 * @li ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap
54 EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap);
57 * @brief Get the wrapping behavior of the label
59 * @param obj The label object
62 * @see elm_label_line_wrap_set()
64 EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj);
67 * @brief Set wrap width of the label
69 * @param obj The label object
70 * @param w The wrap width in pixels at a minimum where words need to wrap
72 * This function sets the maximum width size hint of the label.
74 * @warning This is only relevant if the label is inside a container.
76 EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w);
79 * @brief Get wrap width of the label
81 * @param obj The label object
82 * @return The wrap width in pixels at a minimum where words need to wrap
84 * @see elm_label_wrap_width_set()
86 EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj);
89 * @brief Set the ellipsis behavior of the label
91 * @param obj The label object
92 * @param ellipsis To ellipsis text or not
94 * If set to true and the text doesn't fit in the label an ellipsis("...")
95 * will be shown at the end of the widget.
97 * @warning This doesn't work with slide(elm_label_slide_set()) or if the
98 * chosen wrap method was ELM_WRAP_WORD.
100 EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis);
103 * @brief Get the ellipsis behavior of the label
105 * @param obj The label object
106 * @return If true, an ellipsis will be shown at the end of the label area.
108 * @see elm_label_ellipsis_set()
110 EAPI Eina_Bool elm_label_ellipsis_get(const Evas_Object *obj);
113 * @brief Set sliding effect of label widget.
115 * @param obj The label object
116 * @param slide If true, sliding effect will be shown
118 * If set to true, the text of the label will slide/scroll through the length of
121 * @warning This only works with the themes "slide_short", "slide_long" and
124 EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide);
127 * @brief Get whether sliding effect is shown or not.
129 * @param obj The label object
130 * @return If true, sliding effect is shown.
132 * @see elm_label_slide_set()
134 EAPI Eina_Bool elm_label_slide_get(const Evas_Object *obj);
137 * @brief Set the slide duration(speed) of the label
139 * @param obj The label object
140 * @param duration The duration in seconds in moving text from slide begin position
141 * to slide end position
143 EAPI void elm_label_slide_duration_set(Evas_Object *obj, double duration);
146 * @brief Get the slide duration(speed) of the label
148 * @param obj The label object
149 * @return The duration time in moving text from slide begin position to slide end position
151 * @see elm_label_slide_duration_set()
153 EAPI double elm_label_slide_duration_get(const Evas_Object *obj);