aboutsummaryrefslogtreecommitdiff
path: root/dw/oofawarewidget.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dw/oofawarewidget.hh')
-rw-r--r--dw/oofawarewidget.hh27
1 files changed, 23 insertions, 4 deletions
diff --git a/dw/oofawarewidget.hh b/dw/oofawarewidget.hh
index 890d8a14..a7b3de2b 100644
--- a/dw/oofawarewidget.hh
+++ b/dw/oofawarewidget.hh
@@ -24,16 +24,35 @@ protected:
public:
OOFAwareWidget *oofContainer[NUM_OOFM];
- oof::OutOfFlowMgr *outOfFlowMgr[NUM_OOFM];
+ OutOfFlowMgr *outOfFlowMgr[NUM_OOFM];
protected:
+ inline OutOfFlowMgr *searchOutOfFlowMgr (int oofmIndex)
+ { return oofContainer[oofmIndex] ?
+ oofContainer[oofmIndex]->outOfFlowMgr[oofmIndex] : NULL; }
+
+ static inline bool testWidgetFloat (Widget *widget)
+ { return widget->getStyle()->vloat != core::style::FLOAT_NONE; }
+ static inline bool testWidgetAbsolutelyPositioned (Widget *widget)
+ { return widget->getStyle()->position == core::style::POSITION_ABSOLUTE; }
+ static inline bool testWidgetFixedlyPositioned (Widget *widget)
+ { return widget->getStyle()->position == core::style::POSITION_FIXED; }
+ static inline bool testWidgetOutOfFlow (Widget *widget)
+ { return testWidgetFloat (widget) || testWidgetAbsolutelyPositioned (widget)
+ || testWidgetFixedlyPositioned (widget); }
+
+ static inline bool testWidgetRelativelyPositioned (Widget *widget)
+ { return widget->getStyle()->position == core::style::POSITION_RELATIVE; }
+
void initOutOfFlowMgrs ();
void sizeAllocateStart (core::Allocation *allocation);
void sizeAllocateEnd ();
- inline OutOfFlowMgr *searchOutOfFlowMgr (int oofmIndex)
- { return oofContainer[oofmIndex] ?
- oofContainer[oofmIndex]->outOfFlowMgr[oofmIndex] : NULL; }
+ void notifySetAsTopLevel();
+ void notifySetParent();
+
+ static bool isContainingBlock (Widget *widget, int oofmIndex);
+
public:
OOFAwareWidget ();
~OOFAwareWidget ();