summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_label_eo.legacy.h
blob: 126207a228011e30934787492d32182436d63b3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
#ifndef _ELM_LABEL_EO_LEGACY_H_
#define _ELM_LABEL_EO_LEGACY_H_

#ifndef _ELM_LABEL_EO_CLASS_TYPE
#define _ELM_LABEL_EO_CLASS_TYPE

typedef Eo Elm_Label;

#endif

#ifndef _ELM_LABEL_EO_TYPES
#define _ELM_LABEL_EO_TYPES

/** Slide mode of a label widget
 *
 * @ingroup Elm_Label
 */
typedef enum
{
  ELM_LABEL_SLIDE_MODE_NONE = 0, /**< 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. */
} Elm_Label_Slide_Mode;


#endif

/**
 * @brief 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.
 *
 * @param[in] obj The object.
 * @param[in] w The wrap width in pixels at a minimum where words need to wrap
 *
 * @ingroup Elm_Label_Group
 */
EAPI void elm_label_wrap_width_set(Elm_Label *obj, int w);

/**
 * @brief 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.
 *
 * @param[in] obj The object.
 *
 * @return The wrap width in pixels at a minimum where words need to wrap
 *
 * @ingroup Elm_Label_Group
 */
EAPI int elm_label_wrap_width_get(const Elm_Label *obj);

/**
 * @brief Control the slide speed of the label
 *
 * @note If you set the duration of the slide using
 * @ref elm_label_slide_duration_set you cannot get the correct speed using
 * this function until the label is actually rendered and resized.
 *
 * See @ref elm_label_slide_duration_set
 *
 * @param[in] obj The object.
 * @param[in] speed The speed of the slide animation in px per seconds
 *
 * @ingroup Elm_Label_Group
 */
EAPI void elm_label_slide_speed_set(Elm_Label *obj, double speed);

/**
 * @brief Control the slide speed of the label
 *
 * @note If you set the duration of the slide using
 * @ref elm_label_slide_duration_set you cannot get the correct speed using
 * this function until the label is actually rendered and resized.
 *
 * See @ref elm_label_slide_duration_set
 *
 * @param[in] obj The object.
 *
 * @return The speed of the slide animation in px per seconds
 *
 * @ingroup Elm_Label_Group
 */
EAPI double elm_label_slide_speed_get(const Elm_Label *obj);

/**
 * @brief Control the slide mode of the label widget.
 *
 * By default, slide mode is none. Possible values for @c mode are:
 * @ref ELM_LABEL_SLIDE_MODE_NONE - no slide effect
 * @ref ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
 * the text width length @ref ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
 *
 * @warning @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
 * only work with the themes "slide_short", "slide_long" and "slide_bounce".
 * Warning: @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref 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.
 *
 * @param[in] obj The object.
 * @param[in] mode The slide mode
 *
 * @since 1.8
 *
 * @ingroup Elm_Label_Group
 */
EAPI void elm_label_slide_mode_set(Elm_Label *obj, Elm_Label_Slide_Mode mode);

/**
 * @brief Control the slide mode of the label widget.
 *
 * By default, slide mode is none. Possible values for @c mode are:
 * @ref ELM_LABEL_SLIDE_MODE_NONE - no slide effect
 * @ref ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
 * the text width length @ref ELM_LABEL_SLIDE_MODE_ALWAYS - slide always
 *
 * @warning @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref ELM_LABEL_SLIDE_MODE_ALWAYS
 * only work with the themes "slide_short", "slide_long" and "slide_bounce".
 * Warning: @ref ELM_LABEL_SLIDE_MODE_AUTO, @ref 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.
 *
 * @param[in] obj The object.
 *
 * @return The slide mode
 *
 * @since 1.8
 *
 * @ingroup Elm_Label_Group
 */
EAPI Elm_Label_Slide_Mode elm_label_slide_mode_get(const Elm_Label *obj);

/**
 * @brief Control the slide duration of the label
 *
 * @note If you set the speed of the slide using @ref elm_label_slide_speed_set
 * you cannot get the correct duration using this function until the label is
 * actually rendered and resized.
 *
 * @param[in] obj The object.
 * @param[in] duration The duration in seconds in moving text from slide begin
 * position to slide end position
 *
 * @ingroup Elm_Label_Group
 */
EAPI void elm_label_slide_duration_set(Elm_Label *obj, double duration);

/**
 * @brief Control the slide duration of the label
 *
 * @note If you set the speed of the slide using @ref elm_label_slide_speed_set
 * you cannot get the correct duration using this function until the label is
 * actually rendered and resized.
 *
 * @param[in] obj The object.
 *
 * @return The duration in seconds in moving text from slide begin position to
 * slide end position
 *
 * @ingroup Elm_Label_Group
 */
EAPI double elm_label_slide_duration_get(const Elm_Label *obj);

/**
 * @brief Control the wrapping behavior of the label
 *
 * By default no wrapping is done. Possible values for @c wrap are:
 * @c ELM_WRAP_NONE - No wrapping @c ELM_WRAP_CHAR - wrap between characters
 * @c ELM_WRAP_WORD - wrap between words @c ELM_WRAP_MIXED - Word wrap, and if
 * that fails, char wrap
 *
 * @param[in] obj The object.
 * @param[in] wrap To wrap text or not
 *
 * @ingroup Elm_Label_Group
 */
EAPI void elm_label_line_wrap_set(Elm_Label *obj, Elm_Wrap_Type wrap);

/**
 * @brief Control the wrapping behavior of the label
 *
 * By default no wrapping is done. Possible values for @c wrap are:
 * @c ELM_WRAP_NONE - No wrapping @c ELM_WRAP_CHAR - wrap between characters
 * @c ELM_WRAP_WORD - wrap between words @c ELM_WRAP_MIXED - Word wrap, and if
 * that fails, char wrap
 *
 * @param[in] obj The object.
 *
 * @return To wrap text or not
 *
 * @ingroup Elm_Label_Group
 */
EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Elm_Label *obj);

/**
 * @brief 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 @c ELM_WRAP_WORD.
 *
 * @param[in] obj The object.
 * @param[in] ellipsis To ellipsis text or not
 *
 * @ingroup Elm_Label_Group
 */
EAPI void elm_label_ellipsis_set(Elm_Label *obj, Eina_Bool ellipsis);

/**
 * @brief 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 @c ELM_WRAP_WORD.
 *
 * @param[in] obj The object.
 *
 * @return To ellipsis text or not
 *
 * @ingroup Elm_Label_Group
 */
EAPI Eina_Bool elm_label_ellipsis_get(const Elm_Label *obj);

/**
 * @brief Start slide effect.
 *
 * See @ref elm_label_slide_mode_set.
 * @param[in] obj The object.
 *
 * @ingroup Elm_Label_Group
 */
EAPI void elm_label_slide_go(Elm_Label *obj);

#endif