diff options
author | Sebastian Geerken <devnull@localhost> | 2015-01-31 17:15:19 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-01-31 17:15:19 +0100 |
commit | 20be26d3698eeeeaf2c0a9e55a28831466fc0bd1 (patch) | |
tree | dd0388e3b11d9a409809609f1bf946964ebb58f4 /dw/oofpositionedmgr.hh | |
parent | eac1c960c8c875715fdb8d123e4c19302d93eb00 (diff) |
Relative positions, part 6 (hopefully last): calculating the positions.
Diffstat (limited to 'dw/oofpositionedmgr.hh')
-rw-r--r-- | dw/oofpositionedmgr.hh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/dw/oofpositionedmgr.hh b/dw/oofpositionedmgr.hh index 272cc62b..2962a9d1 100644 --- a/dw/oofpositionedmgr.hh +++ b/dw/oofpositionedmgr.hh @@ -34,16 +34,16 @@ protected: <dw::core::Widget>, Child> *childrenByWidget; - inline int getPosLeft (core::Widget *child, int availWidth) - { return getPosBorder (child->getStyle()->left, availWidth); } - inline int getPosRight (core::Widget *child, int availWidth) - { return getPosBorder (child->getStyle()->right, availWidth); } - inline int getPosTop (core::Widget *child, int availHeight) - { return getPosBorder (child->getStyle()->top, availHeight); } - inline int getPosBottom (core::Widget *child, int availHeight) - { return getPosBorder (child->getStyle()->bottom, availHeight); } - - int getPosBorder (core::style::Length cssValue, int refLength); + inline bool getPosLeft (core::Widget *child, int availWidth, int *result) + { return getPosBorder (child->getStyle()->left, availWidth, result); } + inline bool getPosRight (core::Widget *child, int availWidth, int *result) + { return getPosBorder (child->getStyle()->right, availWidth, result); } + inline bool getPosTop (core::Widget *child, int availHeight, int *result) + { return getPosBorder (child->getStyle()->top, availHeight, result); } + inline bool getPosBottom (core::Widget *child, int availHeight, int *result) + { return getPosBorder (child->getStyle()->bottom, availHeight, result); } + + bool getPosBorder (core::style::Length cssValue, int refLength, int *result); public: OOFPositionedMgr (OOFAwareWidget *container); |