forked from enlightenment/efl
259 lines
8.0 KiB
Plaintext
259 lines
8.0 KiB
Plaintext
class Elm.Box extends Efl.Ui.Widget implements Efl.Ui.Focus.Composition, Efl.Ui.Legacy
|
|
{
|
|
[[Elementary box class]]
|
|
legacy_prefix: elm_box;
|
|
eo_prefix: elm_obj_box;
|
|
event_prefix: elm_box;
|
|
methods {
|
|
@property homogeneous {
|
|
set {
|
|
[[Set the box to arrange its children homogeneously
|
|
|
|
If enabled, homogeneous layout makes all items the same size, according
|
|
to the size of the largest of its children.
|
|
|
|
Note: This flag is ignored if a custom layout function is set.
|
|
|
|
]]
|
|
}
|
|
get {
|
|
[[Get whether the box is using homogeneous mode or not ($true if
|
|
it's homogeneous, $false otherwise)]]
|
|
}
|
|
values {
|
|
homogeneous: bool; [[The homogeneous flag]]
|
|
}
|
|
}
|
|
@property align {
|
|
set {
|
|
[[Set the alignment of the whole bounding box of contents.
|
|
|
|
Sets how the bounding box containing all the elements of the box, after
|
|
their sizes and position has been calculated, will be aligned within
|
|
the space given for the whole box widget.
|
|
|
|
]]
|
|
}
|
|
get {
|
|
[[Get the alignment of the whole bounding box of contents.
|
|
|
|
See also @.align.set.
|
|
|
|
]]
|
|
}
|
|
values {
|
|
horizontal: double; [[The horizontal alignment of elements]]
|
|
vertical: double; [[The vertical alignment of elements]]
|
|
}
|
|
}
|
|
@property horizontal {
|
|
set {
|
|
[[Set the horizontal orientation
|
|
|
|
By default, box object arranges their contents vertically from top to
|
|
bottom.
|
|
By calling this function with $horizontal as $true, the box will
|
|
become horizontal, arranging contents from left to right.
|
|
|
|
Note: This flag is ignored if a custom layout function is set.
|
|
|
|
]]
|
|
}
|
|
get {
|
|
[[Get the horizontal orientation ($true if the box is set to
|
|
horizontal mode, $false otherwise)]]
|
|
}
|
|
values {
|
|
horizontal: bool; [[The horizontal flag]]
|
|
}
|
|
}
|
|
@property padding {
|
|
set {
|
|
[[Set the space (padding) between the box's elements.
|
|
|
|
Extra space in pixels that will be added between a box child and its
|
|
neighbors after its containing cell has been calculated. This padding
|
|
is set for all elements in the box, besides any possible padding that
|
|
individual elements may have through their size hints.
|
|
|
|
]]
|
|
}
|
|
get {
|
|
[[Get the space (padding) between the box's elements.
|
|
|
|
See also @.padding.set.
|
|
|
|
]]
|
|
}
|
|
values {
|
|
horizontal: int; [[The horizontal space between elements]]
|
|
vertical: int; [[The vertical space between elements]]
|
|
}
|
|
}
|
|
@property children {
|
|
get {
|
|
[[Get a list of the objects packed into the box
|
|
|
|
Returns a new $list with a pointer to $Evas_Object in its nodes.
|
|
The order of the list corresponds to the packing order the box uses.
|
|
|
|
You must free this list with eina_list_free() once you are done with it.
|
|
|
|
]]
|
|
return: list<Efl.Canvas.Object> @owned @warn_unused; [[List of children]]
|
|
}
|
|
}
|
|
pack_end {
|
|
[[Add an object at the end of the pack list
|
|
|
|
Pack $subobj into the box $obj, placing it last in the list of
|
|
children objects. The actual position the object will get on screen
|
|
depends on the layout used. If no custom layout is set, it will be at
|
|
the bottom or right, depending if the box is vertical or horizontal,
|
|
respectively.
|
|
|
|
See also @.pack_start,
|
|
@.pack_before,
|
|
@.pack_after,
|
|
@.unpack,
|
|
@.unpack_all,
|
|
@.clear.
|
|
]]
|
|
|
|
params {
|
|
@in subobj: Efl.Canvas.Object; [[The object to add to the box]]
|
|
}
|
|
}
|
|
unpack_all {
|
|
[[Remove all items from the box, without deleting them
|
|
|
|
Clear the box from all children, but don't delete the respective objects.
|
|
If no other references of the box children exist, the objects will never
|
|
be deleted, and thus the application will leak the memory. Make sure
|
|
when using this function that you hold a reference to all the objects
|
|
in the box $obj.
|
|
|
|
See also @.clear,
|
|
@.unpack.
|
|
]]
|
|
}
|
|
unpack {
|
|
[[Unpack a box item
|
|
|
|
Remove the object given by $subobj from the box $obj without
|
|
deleting it.
|
|
|
|
See also @.unpack_all,
|
|
@.clear.
|
|
|
|
]]
|
|
|
|
params {
|
|
@in subobj: Efl.Canvas.Object; [[The object to unpack]]
|
|
}
|
|
}
|
|
pack_after {
|
|
[[Adds an object to the box after the indicated object
|
|
|
|
This will add the $subobj to the box indicated after the object
|
|
indicated with $after. If $after is not already in the box, results
|
|
are undefined. After means either to the right of the indicated object or
|
|
below it depending on orientation.
|
|
|
|
See also @.pack_start,
|
|
@.pack_end,
|
|
@.pack_before,
|
|
@.unpack,
|
|
@.unpack_all,
|
|
@.clear.
|
|
|
|
]]
|
|
|
|
params {
|
|
@in subobj: Efl.Canvas.Object; [[The object to add to the box]]
|
|
@in after: Efl.Canvas.Object; [[The object after which to add it]]
|
|
}
|
|
}
|
|
pack_start {
|
|
[[Add an object to the beginning of the pack list
|
|
|
|
Pack $subobj into the box $obj, placing it first in the list of
|
|
children objects. The actual position the object will get on screen
|
|
depends on the layout used. If no custom layout is set, it will be at
|
|
the top or left, depending if the box is vertical or horizontal,
|
|
respectively.
|
|
|
|
See also @.pack_end,
|
|
@.pack_before,
|
|
@.pack_after,
|
|
@.unpack,
|
|
@.unpack_all,
|
|
@.clear.
|
|
|
|
]]
|
|
|
|
params {
|
|
@in subobj: Efl.Canvas.Object; [[The object to add to the box]]
|
|
}
|
|
}
|
|
recalculate {
|
|
[[Force the box to recalculate its children packing.
|
|
|
|
If any children was added or removed, box will not calculate the
|
|
values immediately rather leaving it to the next main loop
|
|
iteration. While this is great as it would save lots of
|
|
recalculation, whenever you need to get the position of a just
|
|
added item you must force recalculate before doing so.
|
|
|
|
]]
|
|
|
|
}
|
|
pack_before {
|
|
[[Adds an object to the box before the indicated object
|
|
|
|
This will add the $subobj to the box indicated before the object
|
|
indicated with $before. If $before is not already in the box, results
|
|
are undefined. Before means either to the left of the indicated object or
|
|
above it depending on orientation.
|
|
|
|
See also @.pack_start,
|
|
@.pack_end,
|
|
@.pack_after,
|
|
@.unpack,
|
|
@.unpack_all,
|
|
@.clear.
|
|
|
|
]]
|
|
|
|
params {
|
|
@in subobj: Efl.Canvas.Object; [[The object to add to the box]]
|
|
@in before: Efl.Canvas.Object; [[The object before which to add it]]
|
|
}
|
|
}
|
|
clear {
|
|
[[Clear the box of all children
|
|
|
|
Remove all the elements contained by the box, deleting the respective
|
|
objects.
|
|
|
|
See also @.unpack,
|
|
@.unpack_all.
|
|
|
|
]]
|
|
|
|
}
|
|
}
|
|
implements {
|
|
class.constructor;
|
|
Efl.Object.constructor;
|
|
Efl.Canvas.Group.group_calculate;
|
|
Efl.Ui.Widget.theme_apply;
|
|
Efl.Ui.Widget.widget_sub_object_del;
|
|
Efl.Ui.Focus.Composition.prepare;
|
|
}
|
|
events {
|
|
child,added: Efl.Object; [[Called when child was added]]
|
|
child,removed: Efl.Object; [[Called when child was removed]]
|
|
}
|
|
}
|