aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-05-19 13:48:08 +0200
committerSebastian Geerken <devnull@localhost>2014-05-19 13:48:08 +0200
commit665c35b337f536a512a09aa70d1bde128c19984e (patch)
treeb2197b12f17c5f1640538ab0472a6dda5044d1f4
parentc039ea12dd95e358b2aff826971d73fa0c170d63 (diff)
Some documentation.
-rw-r--r--doc/dw-grows.doc16
-rw-r--r--doc/dw-out-of-flow.doc33
2 files changed, 46 insertions, 3 deletions
diff --git a/doc/dw-grows.doc b/doc/dw-grows.doc
index 669e46f5..32800c19 100644
--- a/doc/dw-grows.doc
+++ b/doc/dw-grows.doc
@@ -1,5 +1,19 @@
/** \page dw-grows GROWS - Grand Redesign Of Widget Sizes
-...
+This paper describes (will describe) some design changes to
+calculating widget sizes. Goals are:
+
+- Simplification of widget size calculation by the parent widget;
+ dw::Textblock::calcWidgetSize, dw::OutOfFlowMgr::ensureFloatSize
+ etc. should become simpler or perhaps even obsolete.
+
+- Making the implementation of some features possible:
+
+ - *max-width*, *max-height*, *min-width*, *min-height*;
+ - correct aspect ratio for images with only one percentage size defined;
+ - *display: inline-block*;
+ - <button>.
+
+(...)
*/ \ No newline at end of file
diff --git a/doc/dw-out-of-flow.doc b/doc/dw-out-of-flow.doc
index 9a43a178..9febee55 100644
--- a/doc/dw-out-of-flow.doc
+++ b/doc/dw-out-of-flow.doc
@@ -209,7 +209,36 @@ Integration of line breaking and floats
Absolute and fixed positiones
=============================
-...
-
+If you look at dw::OutOfFlowMgr in detail, you will find that some
+work on absolute positions has already be done, but is
+deactivated. Absolutely positioned elements will also be handled by
+dw::OutOfFlowMgr, in a way transparent to dw::Textblock. Positioning
+is much simpler than for floats: the complicated relation between
+dw::Textblock and dw::OutOfFlowMgr (calculation of the vertical
+position of floats on one hand, limiting line widths by floats on the
+other hand) does not occur here.
+
+Since handling sizes becomes an important part for absolute positions,
+the full implementation will be realized after finishing the planned
+redesign of widget sizes (see \ref dw-grows).
+
+(One note already about the *z-index* attribute: different blocks,
+represented by widgets, may overlap; *z-index* has an influence the
+order in which
+
+1. widgets are drawn (in *ascending* order of *z-index*), and
+2. mouse events are deligated to the widgets (in *descending* oder of
+ *z-index*).
+
+Something similar is already done for floats: effectively, floats have
+a larger *z-index* than the textblocks in flow. (See *end* of
+dw::Textblock::draw and *beginning* of
+dw::Textblock::getWidgetAtPoint.)
+
+For a complete implementation, handling *z-index* becomes a bit more
+complicated. An idea is to keep track of the minimum and maximum value
+of *z-index*, and then iterating over all possible values (ascending
+for drawing, descending for event handling), handling only widgets
+with a specific *z-index* in one iteration.)
*/ \ No newline at end of file