aboutsummaryrefslogtreecommitdiff
path: root/dw/oofawarewidget.hh
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-02-01 23:50:18 +0100
committerSebastian Geerken <devnull@localhost>2015-02-01 23:50:18 +0100
commit76ef5d3794d67fed2e6ff65d48781674d335309b (patch)
treec6998bfa49bacb007148e5b67b54518733b175b3 /dw/oofawarewidget.hh
parent8ad3c10d06eaa5143fe60f899ad623695764a620 (diff)
Fixed endless recursion. Also cleanup and documentation update.
Diffstat (limited to 'dw/oofawarewidget.hh')
-rw-r--r--dw/oofawarewidget.hh21
1 files changed, 13 insertions, 8 deletions
diff --git a/dw/oofawarewidget.hh b/dw/oofawarewidget.hh
index 9ac83eee..8b7c1fde 100644
--- a/dw/oofawarewidget.hh
+++ b/dw/oofawarewidget.hh
@@ -38,9 +38,19 @@ namespace oof {
*
* - Implementations of dw::core::Widget::getAvailWidthOfChild and
* dw::core::Widget::getAvailHeightOfChild have to distinguish
- * between widgets in flow and out of flow; see implementations of
- * dw::oof::OOFAwareWidget. (Open issue: What about
- * dw::core::Widget::correctRequisitionOfChild and
+ * between widgets in flow and out of flow; general pattern:
+ *
+ * \code
+ * if (isWidgetOOF (child) && getWidgetOutOfFlowMgr(child) &&
+ * getWidgetOutOfFlowMgr(child)->dealingWithSizeOfChild (child))
+ * width =
+ * getWidgetOutOfFlowMgr(child)->getAvailWidthOfChild (child,forceValue);
+ * else {
+ * // ... specific implementation ...
+ * \endcode
+ *
+ * See also implementations of dw::Textblock and dw::Table. (Open
+ * issue: What about dw::core::Widget::correctRequisitionOfChild and
* dw::core::Widget::correctExtremesOfChild? Currently, all widgets
* are used the default implementation.)
*
@@ -228,11 +238,6 @@ public:
static inline bool testWidgetOutOfFlow (Widget *widget)
{ return testStyleOutOfFlow (widget->getStyle ()); }
- // These two methods (which are protected in Widget) are made public
- // for OOFPosRelMgr.
- int getAvailWidthOfChild (Widget *child, bool forceValue);
- int getAvailHeightOfChild (Widget *child, bool forceValue);
-
bool doesWidgetOOFInterruptDrawing (Widget *widget);
void draw (core::View *view, core::Rectangle *area,