docs: Update Efl.Ui.Box documentation

It has had a big uppercase FIXME text for 2 years.
This commit is contained in:
Xavi Artigas 2019-07-09 19:22:10 +02:00
parent fa60393b4f
commit 56970daac4
1 changed files with 24 additions and 16 deletions

View File

@ -1,29 +1,37 @@
class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layout, class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layout,
Efl.Ui.Layout_Orientable, Efl.Gfx.Arrangement Efl.Ui.Layout_Orientable, Efl.Gfx.Arrangement
{ {
[[The box widget. [[A container that arranges children widgets in a vertical or horizontal fashion.
A box arranges objects in a linear fashion, governed by a layout function The Box widget is the most basic (and the most used) of the container widgets.
that defines the details of this arrangement. Other widgets are added to the Box through the @Efl.Pack_Linear interface, and the
layout direction (either vertical or horizontal) is controlled through the
@Efl.Ui.Layout_Orientable.orientation property.
By default, the box will use an internal function to set the layout to The Box widget itself is invisible, as are most container widgets: Their purpose is
a single row, either vertical or horizontal. This layout is affected to handle the position and size of all their children so you don't have to.
by a number of parameters. The values given by @Efl.Gfx.Arrangement.content_padding.set
and @Efl.Gfx.Arrangement.content_align.set and the hints set to each object in the box.
FIXME: All widgets inside a vertical Box container will have the same width as the container,
THIS CLASS NEEDS GOOD UP TO DATE DOCUMENTATION. LEGACY BOX AND UI BOX and their heights will be automatically chosen so that they cover the whole surface of
BEHAVE SLIGHTLY DIFFERENTLY AND USE VASTLY DIFFERENT APIS. the container from top to bottom (Imagine a stack of pizza boxes neatly fitting inside
your oven). The @Efl.Ui.Box.homogeneous property then controls whether all widgets have
the same height (homogeneous) or not.
A horizontal Box container example would be the button toolbar at the top of most word
processing programs.
Precise layout can be further customized through the @Efl.Gfx.Arrangement interface on
the Box itself, or through the @Efl.Gfx.Hint interface on each of the children widgets.
]] ]]
methods { methods {
@property homogeneous { @property homogeneous {
[[Control homogeneous mode. [[In homogeneous mode all children of a vertical Box have the same height, equal to
the height of the tallest widget. Children of a horizontal Box have the same width,
This will enable the homogeneous mode where children are of the same equal to the width of the widest widget. Otherwise, individual widget sizes are not
weight and of the same min size which is determined by maximum min modified.
size of children.]] ]]
values { values {
homogeneous: bool; [[$true if the box is homogeneous, $false otherwise]] homogeneous: bool; [[$true if the Box is homogeneous, $false otherwise.]]
} }
} }
} }