aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/dw-out-of-flow.doc37
1 files changed, 18 insertions, 19 deletions
diff --git a/doc/dw-out-of-flow.doc b/doc/dw-out-of-flow.doc
index 3e773ba4..c3db17e3 100644
--- a/doc/dw-out-of-flow.doc
+++ b/doc/dw-out-of-flow.doc
@@ -51,7 +51,8 @@ discussed in detail in the next section.)
Implication for size calculations and allocation
================================================
-*See also:* \ref dw-widget-sizes
+*See also:* \ref dw-widget-sizes, especially the section *Rules for
+Methods Related to Resizing*.
The size/position model of ::dw consists mainly of the following two
steps:
@@ -60,9 +61,10 @@ steps:
calculation typically depends on the sizes of the widgets, which
are calculated recursively, but not more.
2. After this, the toplevel widget is allocated at position (0, 0),
- with the preiosly calculated size. Each widget must allocate its
- children, although the condition for the toplevel widget is not
- necessary, but each widget may be allocated at every size.
+ with the previosly calculated size. Each widget must allocate its
+ children; here, the condition for the toplevel widget (allocated
+ size equals requested size) is not necessary; instead, each widget
+ may be allocated at every size.
Especially for floats, this model becomes a bit difficult, for reasons
described below. For the solutions, much is centralized at the level
@@ -72,18 +74,15 @@ dw::OutOfFlowMgr (details below).
**The size of a widget depends on the size not only of the children.**
In the example above, the last list item (green, following the
generating list item) must know the size of the the float (which is
-not a child or, generally, descendant, but generally the sibling of an
-anchestor) to determine the borders, which is done in
-dw::Textblock::sizeRequestImpl.
+not a child or, generally, descendant) to determine the borders, which
+is done in dw::Textblock::sizeRequestImpl.
-In this situation, it is important not to call, within
-dw::Textblock::sizeRequestImpl of this textblock,
-dw::core::Widget::sizeRequest for the float. Instead, ... (?)
-
-(Actually, dw::Textblock::sizeRequestImpl calls
-dw::core::Widget::sizeRequest for the float, which conflicts with the
-rules defined in \ref dw-widget-sizes; but actually should not cause
-conflicts. Should be revised.)
+For this, the size model has been extended (see \ref dw-widget-sizes,
+section *Rules for Methods Related to Resizing*): *sizeRequest* can be
+called within *sizeRequestImpl* for other widgets that children (with
+some caution). Namely, dw::Textblock::sizeRequestImpl calls
+dw::core::Widget::sizeRequest for the float, via
+dw::OutOfFlowMgr::getBorder and dw::OutOfFlowMgr::ensureFloatSize.
**The size of a widget depends on the allocation of another widget.**
In the example above, both list items (blue and green) must know the
@@ -104,9 +103,10 @@ For details see:
- dw::OutOfFlowMgr::getLeftBorder, dw::OutOfFlowMgr::getRightBorder,
dw::OutOfFlowMgr::getBorder (called by the first two), and
- especially, dw::OutOfFlowMgr::getYWidget (called by the latter),
- where these three cases are distinguished;
-- dw::OutOfFlowMgr::sizeAllocate, which is called by the containing
+ especially, dw::OutOfFlowMgr::getFloatsListForTextblock (called by
+ the latter), where these three cases are distinguished;
+- dw::OutOfFlowMgr::sizeAllocateStart,
+ dw::OutOfFlowMgr::sizeAllocateEnd which are called by the containing
block.
Implementation overview
@@ -114,7 +114,6 @@ Implementation overview
Widget level
------------
-
The terms _generating block_ and _containing block_ have been raised
to a higher level, the one of dw::core::Widget, and are here called
_generating widget_ and _containing widget_. To represent the