diff options
author | Sebastian Geerken <devnull@localhost> | 2015-02-03 15:10:50 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-02-03 15:10:50 +0100 |
commit | fa6dd63e38408ee6b9d888a4a0b0aaa44700eb5e (patch) | |
tree | 4360a9e0fe90c2fa218a810502263f843c7e46e6 /dw/oofpositionedmgr.cc | |
parent | ac04cad270ed1ad13e99124361b14af6682234e2 (diff) |
Some cleanup in OOFPosAbsLikeMgr.
Diffstat (limited to 'dw/oofpositionedmgr.cc')
-rw-r--r-- | dw/oofpositionedmgr.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dw/oofpositionedmgr.cc b/dw/oofpositionedmgr.cc index db5cc5e6..afc2b945 100644 --- a/dw/oofpositionedmgr.cc +++ b/dw/oofpositionedmgr.cc @@ -31,6 +31,21 @@ namespace dw { namespace oof { +OOFPositionedMgr::Child::Child (core::Widget *widget, OOFAwareWidget *generator, + int externalIndex) +{ + this->widget = widget; + this->generator = generator; + this->externalIndex = externalIndex; + + x = y = 0; + + // Initially, this child does not actually have been considered, + // but since adding a new element will force a size/extremes + // calculation, this is equivalent. + consideredForSize = consideredForExtremes = true; +} + OOFPositionedMgr::OOFPositionedMgr (OOFAwareWidget *container) { DBG_OBJ_CREATE ("dw::OOFPositionedMgr"); @@ -267,6 +282,22 @@ bool OOFPositionedMgr::getPosBorder (style::Length cssValue, int refLength, return false; } +bool OOFPositionedMgr::allChildrenConsideredForSize () +{ + for (int i = 0; i < children->size(); i++) + if (!children->get(i)->consideredForSize) + return false; + return true; +} + +bool OOFPositionedMgr::allChildrenConsideredForExtremes () +{ + for (int i = 0; i < children->size(); i++) + if (!children->get(i)->consideredForExtremes) + return false; + return true; +} + } // namespace oof } // namespace dw |