diff options
author | Sebastian Geerken <devnull@localhost> | 2014-12-08 17:35:18 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-12-08 17:35:18 +0100 |
commit | 3d521d286174264448cbd1b2315ff89f9d8e8edf (patch) | |
tree | 37515aa58dc935014b677c7212ada0fdfab7b2bd /dw/oofawarewidget.hh | |
parent | de2139f76ee1fa4f14970914bb6c87fe46feed17 (diff) | |
parent | 2bb03c759cb44241d42e3385336a1c6b9a8d7d9f (diff) |
Merged with main repo (part 1/2).
Diffstat (limited to 'dw/oofawarewidget.hh')
-rw-r--r-- | dw/oofawarewidget.hh | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/dw/oofawarewidget.hh b/dw/oofawarewidget.hh index 95af54a0..8fb32716 100644 --- a/dw/oofawarewidget.hh +++ b/dw/oofawarewidget.hh @@ -144,23 +144,6 @@ protected: { 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 testWidgetPositioned (Widget *widget) - { return testWidgetAbsolutelyPositioned (widget) || - testWidgetRelativelyPositioned (widget) || - testWidgetFixedlyPositioned (widget); } - 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; } - static bool getOOFMIndex (Widget *widget); void initOutOfFlowMgrs (); @@ -232,6 +215,41 @@ public: OOFAwareWidget (); ~OOFAwareWidget (); + static inline bool testStyleFloat (core::style::Style *style) + { return style->vloat != core::style::FLOAT_NONE; } + + static inline bool testStyleAbsolutelyPositioned (core::style::Style *style) + { return style->position == core::style::POSITION_ABSOLUTE; } + static inline bool testStyleFixedlyPositioned (core::style::Style *style) + { return style->position == core::style::POSITION_FIXED; } + static inline bool testStyleRelativelyPositioned (core::style::Style *style) + { return style->position == core::style::POSITION_RELATIVE; } + + static inline bool testStylePositioned (core::style::Style *style) + { return testStyleAbsolutelyPositioned (style) || + testStyleRelativelyPositioned (style) || + testStyleFixedlyPositioned (style); } + + static inline bool testStyleOutOfFlow (core::style::Style *style) + { return testStyleFloat (style) || testStyleAbsolutelyPositioned (style) + || testStyleFixedlyPositioned (style); } + + static inline bool testWidgetFloat (Widget *widget) + { return testStyleFloat (widget->getStyle ()); } + + static inline bool testWidgetAbsolutelyPositioned (Widget *widget) + { return testStyleAbsolutelyPositioned (widget->getStyle ()); } + static inline bool testWidgetFixedlyPositioned (Widget *widget) + { return testStyleFixedlyPositioned (widget->getStyle ()); } + static inline bool testWidgetRelativelyPositioned (Widget *widget) + { return testStyleRelativelyPositioned (widget->getStyle ()); } + + static inline bool testWidgetPositioned (Widget *widget) + { return testStylePositioned (widget->getStyle ()); } + + static inline bool testWidgetOutOfFlow (Widget *widget) + { return testStyleOutOfFlow (widget->getStyle ()); } + bool doesWidgetOOFInterruptDrawing (Widget *widget); void draw (core::View *view, core::Rectangle *area, |