diff options
author | Sebastian Geerken <devnull@localhost> | 2014-09-12 13:11:32 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-09-12 13:11:32 +0200 |
commit | 350fa597967a501d5f5c6988ff35a262e50a2a68 (patch) | |
tree | 102ccb0775eef7e4d4b8b7cfd40b7f11459b1ee2 /dw/oofawarewidget.hh | |
parent | 36fcd74196a898403ef1e66884dc52d296c42665 (diff) |
OOFAwareWidget: moving even more stuff from Textblock to OOFAwareWidget.
Diffstat (limited to 'dw/oofawarewidget.hh')
-rw-r--r-- | dw/oofawarewidget.hh | 27 |
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 (); |