aboutsummaryrefslogtreecommitdiff
path: root/dw/oofposabsmgr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/oofposabsmgr.cc')
-rw-r--r--dw/oofposabsmgr.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/dw/oofposabsmgr.cc b/dw/oofposabsmgr.cc
index 07daca86..a0b8b721 100644
--- a/dw/oofposabsmgr.cc
+++ b/dw/oofposabsmgr.cc
@@ -35,6 +35,20 @@ OOFPosAbsMgr::~OOFPosAbsMgr ()
DBG_OBJ_DELETE ();
}
+bool OOFPosAbsMgr::isReference (core::Widget *widget)
+{
+ // Only the toplevel widget (as for all) as well as absolutely,
+ // relatively, and fixedly positioned elements constitute the
+ // containing block (i. e. the reference widget) for absolutely
+ // positioned elements (But neither floats nor other elements like
+ // table cells, or elements with 'overview' set to another value
+ // than 'visible').
+
+ return widget->instanceOf (OOFAwareWidget::CLASS_ID) &&
+ (widget->getParent() == NULL ||
+ OOFAwareWidget::testWidgetPositioned (widget));
+}
+
// Comment for all containerBox* implementations: for the toplevel
// widget, assume margin = border = 0 (should perhaps set so when
// widgets are constructed), so that the padding area is actually the