diff options
author | Sebastian Geerken <devnull@localhost> | 2015-02-03 11:01:28 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-02-03 11:01:28 +0100 |
commit | ac04cad270ed1ad13e99124361b14af6682234e2 (patch) | |
tree | e5961f80e168c12cb4664633ce080b4b44fd9d45 /dw/oofposabslikemgr.hh | |
parent | cdc7bebac4c0fa7fe198c4b72c62948ffeb12815 (diff) |
Removed 'reference' of posioned elements.
Diffstat (limited to 'dw/oofposabslikemgr.hh')
-rw-r--r-- | dw/oofposabslikemgr.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dw/oofposabslikemgr.hh b/dw/oofposabslikemgr.hh index 61c3ed8c..a561a407 100644 --- a/dw/oofposabslikemgr.hh +++ b/dw/oofposabslikemgr.hh @@ -2,6 +2,7 @@ #define __DW_OOFPOSABSLIKEMGR_HH__ #include "oofpositionedmgr.hh" +#include "oofawarewidget.hh" namespace dw { @@ -23,6 +24,23 @@ protected: enum { NOT_ALLOCATED, IN_ALLOCATION, WAS_ALLOCATED } containerAllocationState; + inline bool generatorPosDefined (Child *child) { + return child->generator == container || + (containerAllocationState != NOT_ALLOCATED + && child->generator->wasAllocated ()); + } + inline int generatorPosX (Child *child) { + assert (generatorPosDefined (child)); + return child->generator == container ? 0 : + child->generator->getAllocation()->x + - (containerAllocation.x + containerBoxOffsetX ()); + } + inline int generatorPosY (Child *child) { + assert (generatorPosDefined (child)); + return child->generator == container ? 0 : + child->generator->getAllocation()->y + - (containerAllocation.y + containerBoxOffsetY ()); + } bool doChildrenExceedContainer (); bool haveExtremesChanged (); |