aboutsummaryrefslogtreecommitdiff
path: root/dw/oofpositionedmgr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/oofpositionedmgr.cc')
-rw-r--r--dw/oofpositionedmgr.cc31
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