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
14 * @li marker - Centers the text in the label and make it bold by default
15 * @li slide_long - The entire text appears from the right of the screen and
16 * slides until it disappears in the left of the screen(reappering on the
18 * @li marker - Centers the text in the label and makes it bold by default
19 * @li slide_long - The entire text appears from the right of the screen and
20 * slides until it disappears in the left of the screen(reappearing on the
21 >>>>>>> remotes/origin/upstream
23 * @li slide_short - The text appears in the left of the label and slides to
24 * the right to show the overflow. When all of the text has been shown the
26 * @li slide_bounce - The text appears in the left of the label and slides to
27 * the right to show the overflow. When all of the text has been shown the
28 * animation reverses, moving the text to the left.
30 * Custom themes can of course invent new markup tags and style them any way
33 * The following signals may be emitted by the label widget:
34 * @li "language,changed": The program's language changed.
36 * See @ref tutorial_label for a demonstration of how to use a label widget.
41 * @brief Add a new label to the parent
43 * @param parent The parent object
44 * @return The new object or NULL if it cannot be created
46 EAPI Evas_Object *elm_label_add(Evas_Object *parent);
49 * @brief Set the wrapping behavior of the label
51 * @param obj The label object
52 * @param wrap To wrap text or not
54 * By default no wrapping is done. Possible values for @p wrap are:
55 * @li ELM_WRAP_NONE - No wrapping
56 * @li ELM_WRAP_CHAR - wrap between characters
57 * @li ELM_WRAP_WORD - wrap between words
58 * @li ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap
60 EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap);
63 * @brief Get the wrapping behavior of the label
65 * @param obj The label object
68 * @see elm_label_line_wrap_set()
70 EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj);
73 * @brief Set wrap width of the label
75 * @param obj The label object
76 * @param w The wrap width in pixels at a minimum where words need to wrap
78 * This function sets the maximum width size hint of the label.
80 * @warning This is only relevant if the label is inside a container.
82 EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w);
85 * @brief Get wrap width of the label
87 * @param obj The label object
88 * @return The wrap width in pixels at a minimum where words need to wrap
90 * @see elm_label_wrap_width_set()
92 EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj);
96 * @brief Set wrap height of the label
98 * @param obj The label object
99 * @param h The wrap height in pixels at a minimum where words need to wrap
101 * This function sets the maximum height size hint of the label.
103 * @warning This is only relevant if the label is inside a container.
105 EAPI void elm_label_wrap_height_set(Evas_Object *obj, Evas_Coord h);
108 * @brief get wrap width of the label
110 * @param obj The label object
111 * @return The wrap height in pixels at a minimum where words need to wrap
113 EAPI Evas_Coord elm_label_wrap_height_get(const Evas_Object *obj);
116 * @brief Set the font size on the label object.
118 * @param obj The label object
119 * @param size font size
121 * @warning NEVER use this. It is for hyper-special cases only. use styles
122 * instead. e.g. "default", "marker", "slide_long" etc.
124 EAPI void elm_label_fontsize_set(Evas_Object *obj, int fontsize);
127 * @brief Set the text color on the label object
129 * @param obj The label object
130 * @param r Red property background color of The label object
131 * @param g Green property background color of The label object
132 * @param b Blue property background color of The label object
133 * @param a Alpha property background color of The label object
135 * @warning NEVER use this. It is for hyper-special cases only. use styles
136 * instead. e.g. "default", "marker", "slide_long" etc.
138 EAPI void elm_label_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a);
141 * @brief Set the text align on the label object
143 * @param obj The label object
144 * @param align align mode ("left", "center", "right")
146 * @warning NEVER use this. It is for hyper-special cases only. use styles
147 * instead. e.g. "default", "marker", "slide_long" etc.
149 EAPI void elm_label_text_align_set(Evas_Object *obj, const char *alignmode);
152 * @brief Set background color of the label
154 * @param obj The label object
155 * @param r Red property background color of The label object
156 * @param g Green property background color of The label object
157 * @param b Blue property background color of The label object
158 * @param a Alpha property background alpha of The label object
160 * @warning NEVER use this. It is for hyper-special cases only. use styles
161 * instead. e.g. "default", "marker", "slide_long" etc.
163 EAPI void elm_label_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a);
167 >>>>>>> remotes/origin/upstream
168 * @brief Set the ellipsis behavior of the label
170 * @param obj The label object
171 * @param ellipsis To ellipsis text or not
173 * If set to true and the text doesn't fit in the label an ellipsis("...")
174 * will be shown at the end of the widget.
176 * @warning This doesn't work with slide(elm_label_slide_set()) or if the
178 * choosen wrap method was ELM_WRAP_WORD.
180 * chosen wrap method was ELM_WRAP_WORD.
181 >>>>>>> remotes/origin/upstream
183 EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis);
187 * @brief Set the text slide of the label
189 * @param obj The label object
190 * @param slide To start slide or stop
192 * @brief Get the ellipsis behavior of the label
194 * @param obj The label object
195 * @return If true, an ellipsis will be shown at the end of the label area.
197 * @see elm_label_ellipsis_set()
199 EAPI Eina_Bool elm_label_ellipsis_get(const Evas_Object *obj);
202 * @brief Set sliding effect of label widget.
204 * @param obj The label object
205 * @param slide If true, sliding effect will be shown
206 >>>>>>> remotes/origin/upstream
208 * If set to true, the text of the label will slide/scroll through the length of
211 * @warning This only works with the themes "slide_short", "slide_long" and
214 EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide);
218 * @brief Get the text slide mode of the label
220 * @param obj The label object
221 * @return slide slide mode value
223 * @see elm_label_slide_set()
225 EAPI Eina_Bool elm_label_slide_get(Evas_Object *obj);
227 * @brief Get whether sliding effect is shown or not.
229 * @param obj The label object
230 * @return If true, sliding effect is shown.
232 * @see elm_label_slide_set()
234 EAPI Eina_Bool elm_label_slide_get(const Evas_Object *obj);
235 >>>>>>> remotes/origin/upstream
238 * @brief Set the slide duration(speed) of the label
240 * @param obj The label object
242 * @return The duration in seconds in moving text from slide begin position
244 * @param duration The duration in seconds in moving text from slide begin position
245 >>>>>>> remotes/origin/upstream
246 * to slide end position
248 EAPI void elm_label_slide_duration_set(Evas_Object *obj, double duration);
251 * @brief Get the slide duration(speed) of the label
253 * @param obj The label object
254 * @return The duration time in moving text from slide begin position to slide end position
256 * @see elm_label_slide_duration_set()
259 EAPI double elm_label_slide_duration_get(Evas_Object *obj);
261 EAPI double elm_label_slide_duration_get(const Evas_Object *obj);
262 >>>>>>> remotes/origin/upstream