diff options
author | Sebastian Geerken <devnull@localhost> | 2014-06-30 23:27:24 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-06-30 23:27:24 +0200 |
commit | 1fe12469957fdb11f1f1272218f99ad44795d7f0 (patch) | |
tree | 885a700e185ab94e6cb31f0034541d6cfa3f923c /doc | |
parent | 72f09de70b3e057adbfc459f4b4b9009cabffa0e (diff) |
GROWS: documentation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/dw-grows.doc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/dw-grows.doc b/doc/dw-grows.doc index 72b6505a..8c2941dd 100644 --- a/doc/dw-grows.doc +++ b/doc/dw-grows.doc @@ -53,10 +53,41 @@ and its container:** - The actual size calculation is, however, controlled by the widget itself, which only *uses* these methods above. +<div style="border: 2px solid #ffff00; margin-top: 0.5em; + margin-bottom: 0.5em; padding: 0.5em 1em; background-color: #ffffe0"> + <b>Update:</b> This is not fully correct; the parents are also involved + for calculating available widths and heights, at least when CSS 'width' + and 'height' are not set.</div> + **Size hints are removed.** Instead, the container methods in the previous paragraph are used. Changes of container sizes (especially viewport the size) are handled in a different way. +**Extremes are extended by intrinsic values.** In some cases (see +dw::Table::forceCalcCellSizes, case *minWidth* > *totalWidth*, for an +example) it is useful to know about minimal and maximal width of a +widget independent of CSS attributes. For this, dw::core::Extremes is +extended by: + +- dw::core::Extremes::minWidthIntrinsic and +- dw::core::Extremes::maxWidthIntrinsic. + +The rules for the calculation: + +1. If a widget has no children, it calculates *minWidthIntrinsic* and + *maxWidthIntrinsic* as those values not affected by CSS hints. + (dw::core::Widget::correctExtremes will not change these values.) +2. A widget must calculate *minWidthIntrinsic* and *maxWidthIntrinsic* + from *minWidthIntrinsic* and *maxWidthIntrinsic* of its children, + and *minWidth* and *maxWidth* from *minWidth* and *maxWidth* of its + children. +3. At the end, *minWidth* and *maxWidth* of a widget are corrected by + CSS attributes. (dw::core::Widget::correctExtremes will do this.) + +<div style="border: 2px solid #ffff00; margin-top: 0.5em; + margin-bottom: 0.5em; padding: 0.5em 1em; background-color: #ffffe0"> + <b>Notice:</b> Currently, dw::core::Widget::getExtremesImpl must + set all four members in dw::core::Extremes; this may change.</div> Open issues =========== |