1 class Elm_Box (Elm_Widget)
3 eo_prefix: elm_obj_box;
8 @brief Set the box to arrange its children homogeneously
10 @if MOBILE @since_tizen 2.3
11 @elseif WEARABLE @since_tizen 2.3.1
14 @remark If enabled, homogeneous layout makes all items the same size, according
15 to the size of the largest of its children.
17 @remark This flag is ignored if a custom layout function is set.
23 @brief Get whether the box is using homogeneous mode or not
25 @if MOBILE @since_tizen 2.3
26 @elseif WEARABLE @since_tizen 2.3.1
29 @return @c EINA_TRUE if it's homogeneous, @c EINA_FALSE otherwise
34 bool homogeneous; /*@ The homogeneous flag */
40 @brief Set the alignment of the whole bounding box of contents.
42 @if MOBILE @since_tizen 2.3
43 @elseif WEARABLE @since_tizen 2.3.1
46 @remark Sets how the bounding box containing all the elements of the box, after
47 their sizes and position has been calculated, will be aligned within
48 the space given for the whole box widget.
54 @brief Get the alignment of the whole bounding box of contents.
56 @if MOBILE @since_tizen 2.3
57 @elseif WEARABLE @since_tizen 2.3.1
60 @see elm_box_align_set()
65 double horizontal; /*@ The horizontal alignment of elements */
66 double vertical; /*@ The vertical alignment of elements */
72 @brief Set the horizontal orientation
74 @if MOBILE @since_tizen 2.3
75 @elseif WEARABLE @since_tizen 2.3.1
78 @remark By default, box object arranges their contents vertically from top to
80 By calling this function with @p horizontal as @c EINA_TRUE, the box will
81 become horizontal, arranging contents from left to right.
83 @remark This flag is ignored if a custom layout function is set.
89 @brief Get the horizontal orientation
91 @if MOBILE @since_tizen 2.3
92 @elseif WEARABLE @since_tizen 2.3.1
97 @return @c EINA_TRUE if the box is set to horizontal mode, @c EINA_FALSE otherwise */
100 bool horizontal; /*@ The horizontal flag (@c EINA_TRUE = horizontal,
101 @c EINA_FALSE = vertical) */
107 @brief Set the space (padding) between the box's elements.
109 @if MOBILE @since_tizen 2.3
110 @elseif WEARABLE @since_tizen 2.3.1
113 @remark Extra space in pixels that will be added between a box child and its
114 neighbors after its containing cell has been calculated. This padding
115 is set for all elements in the box, besides any possible padding that
116 individual elements may have through their size hints.
122 @brief Get the space (padding) between the box's elements.
124 @if MOBILE @since_tizen 2.3
125 @elseif WEARABLE @since_tizen 2.3.1
128 @see elm_box_padding_set()
133 Evas_Coord horizontal; /*@ The horizontal space between elements */
134 Evas_Coord vertical; /*@ The vertical space between elements */
140 @brief Set the layout defining function to be used by the box
142 @if MOBILE @since_tizen 2.3
143 @elseif WEARABLE @since_tizen 2.3.1
146 @remark Whenever anything changes that requires the box in @p obj to recalculate
147 the size and position of its elements, the function @p cb will be called
148 to determine what the layout of the children will be.
150 @remark Once a custom function is set, everything about the children layout
151 is defined by it. The flags set by elm_box_horizontal_set() and
152 elm_box_homogeneous_set() no longer have any meaning, and the values
153 given by elm_box_padding_set() and elm_box_align_set() are up to this
154 layout function to decide if they are used and how. These last two
155 will be found in the @c priv parameter, of type @c Evas_Object_Box_Data,
156 passed to @p cb. The @c Evas_Object the function receives is not the
157 Elementary widget, but the internal Evas Box it uses, so none of the
158 functions described here can be used on it.
160 @remark Any of the layout functions in @c Evas can be used here, as well as the
161 special elm_box_layout_transition().
163 @remark The final @p data argument received by @p cb is the same @p data passed
164 here, and the @p free_data function will be called to free it
165 whenever the box is destroyed or another layout function is set.
167 @remark Setting @p cb to NULL will revert back to the default layout function.
169 @see elm_box_layout_transition()
174 Evas_Object_Box_Layout cb; /*@ The callback function used for layout */
175 const(void)* data; /*@ Data that will be passed to layout function */
176 Ecore_Cb free_data; /*@ Function called to free @p data */
182 @brief Get a list of the objects packed into the box
184 @if MOBILE @since_tizen 2.3
185 @elseif WEARABLE @since_tizen 2.3.1
188 @remark Returns a new @c list with a pointer to @c Evas_Object in its nodes.
189 The order of the list corresponds to the packing order the box uses.
191 @remark You must free this list with eina_list_free() once you are done with it.
194 return: own(list<Evas_Object*>*);
201 @brief Add an object at the end of the pack list
203 @if MOBILE @since_tizen 2.3
204 @elseif WEARABLE @since_tizen 2.3.1
207 @remark Pack @p subobj into the box @p obj, placing it last in the list of
208 children objects. The actual position the object will get on screen
209 depends on the layout used. If no custom layout is set, it will be at
210 the bottom or right, depending if the box is vertical or horizontal,
213 @see elm_box_pack_start()
214 @see elm_box_pack_before()
215 @see elm_box_pack_after()
216 @see elm_box_unpack()
217 @see elm_box_unpack_all()
223 @in Evas_Object *subobj; /*@ The object to add to the box */
228 @brief Remove all items from the box, without deleting them
230 @if MOBILE @since_tizen 2.3
231 @elseif WEARABLE @since_tizen 2.3.1
234 @remark Clear the box from all children, but don't delete the respective objects.
235 If no other references of the box children exist, the objects will never
236 be deleted, and thus the application will leak the memory. Make sure
237 when using this function that you hold a reference to all the objects
241 @see elm_box_unpack()
248 @brief Unpack a box item
250 @if MOBILE @since_tizen 2.3
251 @elseif WEARABLE @since_tizen 2.3.1
254 @remark Remove the object given by @p subobj from the box @p obj without
257 @see elm_box_unpack_all()
263 @in Evas_Object *subobj; /*@ The object to unpack */
268 @brief Adds an object to the box after the indicated object
270 @if MOBILE @since_tizen 2.3
271 @elseif WEARABLE @since_tizen 2.3.1
274 @remark This will add the @p subobj to the box indicated after the object
275 indicated with @p after. If @p after is not already in the box, results
276 are undefined. After means either to the right of the indicated object or
277 below it depending on orientation.
279 @see elm_box_pack_start()
280 @see elm_box_pack_end()
281 @see elm_box_pack_before()
282 @see elm_box_unpack()
283 @see elm_box_unpack_all()
289 @in Evas_Object *subobj; /*@ The object to add to the box */
290 @in Evas_Object *after; /*@ The object after which to add it */
295 @brief Add an object to the beginning of the pack list
297 @if MOBILE @since_tizen 2.3
298 @elseif WEARABLE @since_tizen 2.3.1
301 @remark Pack @p subobj into the box @p obj, placing it first in the list of
302 children objects. The actual position the object will get on screen
303 depends on the layout used. If no custom layout is set, it will be at
304 the top or left, depending if the box is vertical or horizontal,
307 @see elm_box_pack_end()
308 @see elm_box_pack_before()
309 @see elm_box_pack_after()
310 @see elm_box_unpack()
311 @see elm_box_unpack_all()
317 @in Evas_Object *subobj; /*@ The object to add to the box */
322 @brief Force the box to recalculate its children packing.
324 @if MOBILE @since_tizen 2.3
325 @elseif WEARABLE @since_tizen 2.3.1
328 @remark If any children was added or removed, box will not calculate the
329 values immediately rather leaving it to the next main loop
330 iteration. While this is great as it would save lots of
331 recalculation, whenever you need to get the position of a just
332 added item you must force recalculate before doing so.
339 @brief Adds an object to the box before the indicated object
341 @if MOBILE @since_tizen 2.3
342 @elseif WEARABLE @since_tizen 2.3.1
345 @remark This will add the @p subobj to the box indicated before the object
346 indicated with @p before. If @p before is not already in the box, results
347 are undefined. Before means either to the left of the indicated object or
348 above it depending on orientation.
350 @see elm_box_pack_start()
351 @see elm_box_pack_end()
352 @see elm_box_pack_after()
353 @see elm_box_unpack()
354 @see elm_box_unpack_all()
360 @in Evas_Object *subobj; /*@ The object to add to the box */
361 @in Evas_Object *before; /*@ The object before which to add it */
366 @brief Clear the box of all children
368 @if MOBILE @since_tizen 2.3
369 @elseif WEARABLE @since_tizen 2.3.1
372 @remark Remove all the elements contained by the box, deleting the respective
375 @see elm_box_unpack()
376 @see elm_box_unpack_all()
385 Evas.Object_Smart.add;
386 Evas.Object_Smart.del;
387 Elm_Widget.focus_direction;
388 Elm_Widget.focus_next_manager_is;
389 Elm_Widget.focus_direction_manager_is;
390 Elm_Widget.focus_next;
391 Elm_Widget.theme_apply;
392 Elm_Widget.sub_object_del;