diff options
-rw-r--r-- | dw/bullet.cc | 2 | ||||
-rw-r--r-- | dw/image.cc | 2 | ||||
-rw-r--r-- | dw/outofflowmgr.cc | 4 | ||||
-rw-r--r-- | dw/ruler.cc | 2 | ||||
-rw-r--r-- | dw/table.cc | 26 | ||||
-rw-r--r-- | dw/table.hh | 1 | ||||
-rw-r--r-- | dw/textblock.cc | 4 | ||||
-rw-r--r-- | dw/ui.cc | 2 | ||||
-rw-r--r-- | dw/widget.cc | 2 |
9 files changed, 44 insertions, 1 deletions
diff --git a/dw/bullet.cc b/dw/bullet.cc index 54fd136e..0ae8ccb7 100644 --- a/dw/bullet.cc +++ b/dw/bullet.cc @@ -50,7 +50,9 @@ void Bullet::getExtremesImpl (core::Extremes *extremes) void Bullet::containerSizeChangedForChildren () { + DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren"); // Nothing to do. + DBG_OBJ_LEAVE (); } void Bullet::draw (core::View *view, core::Rectangle *area) diff --git a/dw/image.cc b/dw/image.cc index bed1ca1d..9dc6d6ee 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -260,7 +260,9 @@ void Image::sizeAllocateImpl (core::Allocation *allocation) void Image::containerSizeChangedForChildren () { + DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren"); // Nothing to do. + DBG_OBJ_LEAVE (); } void Image::enterNotifyImpl (core::EventCrossing *event) diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc index 8c29eb26..b5fc7ad0 100644 --- a/dw/outofflowmgr.cc +++ b/dw/outofflowmgr.cc @@ -634,12 +634,16 @@ void OutOfFlowMgr::sizeAllocateEnd (Textblock *caller) void OutOfFlowMgr::containerSizeChangedForChildren () { + DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren"); + for (int i = 0; i < leftFloatsCB->size (); i++) leftFloatsCB->get(i)->getWidget()->containerSizeChanged (); for (int i = 0; i < rightFloatsCB->size (); i++) rightFloatsCB->get(i)->getWidget()->containerSizeChanged (); for (int i = 0; i < absolutelyPositioned->size(); i++) absolutelyPositioned->get(i)->widget->containerSizeChanged (); + + DBG_OBJ_LEAVE (); } bool OutOfFlowMgr::hasRelationChanged (TBInfo *tbInfo, int *minFloatPos, diff --git a/dw/ruler.cc b/dw/ruler.cc index b624718d..cb48ee79 100644 --- a/dw/ruler.cc +++ b/dw/ruler.cc @@ -55,7 +55,9 @@ bool Ruler::isBlockLevel () void Ruler::containerSizeChangedForChildren () { + DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren"); // Nothing to do. + DBG_OBJ_LEAVE (); } bool Ruler::usesAvailWidth () diff --git a/dw/table.cc b/dw/table.cc index 3cdff345..1a61c9b6 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -301,6 +301,8 @@ int Table::applyPerHeight (int containerHeight, core::style::Length perHeight) void Table::containerSizeChangedForChildren () { + DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren"); + for (int col = 0; col < numCols; col++) { for (int row = 0; row < numRows; row++) { int n = row * numCols + col; @@ -308,6 +310,30 @@ void Table::containerSizeChangedForChildren () children->get(n)->cell.widget->containerSizeChanged (); } } + + DBG_OBJ_LEAVE (); +} + +bool Table::affectsSizeChangeContainerChild (core::Widget *child) +{ + DBG_OBJ_ENTER ("resize", 0, "affectsSizeChangeContainerChild", "%p", child); + + bool ret; + + // This is a bit more complicated, as compared to the standard + // implementation (Widget::affectsSizeChangeContainerChild). + // Height would handled the same way, but width is more + // complicated: we would have to track numerous values here. Always + // returning true is correct in all cases, but generally + // inefficient. + + // TODO Better solution? + + ret = true; + + DBG_OBJ_MSGF ("resize", 1, "=> %s", ret ? "true" : "false"); + DBG_OBJ_LEAVE (); + return ret; } bool Table::usesAvailWidth () diff --git a/dw/table.hh b/dw/table.hh index 4cb97040..b9dae75d 100644 --- a/dw/table.hh +++ b/dw/table.hh @@ -449,6 +449,7 @@ protected: void (*splitHeightFun) (int, int*, int*)); void containerSizeChangedForChildren (); + bool affectsSizeChangeContainerChild (Widget *child); bool usesAvailWidth (); bool isBlockLevel (); diff --git a/dw/textblock.cc b/dw/textblock.cc index 9d073c9b..9342e792 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -650,6 +650,8 @@ void Textblock::sizeAllocateImpl (core::Allocation *allocation) void Textblock::containerSizeChangedForChildren () { + DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren"); + for (int i = 0; i < words->size (); i++) { Word *word = words->getRef (i); if (word->content.type == core::Content::WIDGET_IN_FLOW) @@ -658,6 +660,8 @@ void Textblock::containerSizeChangedForChildren () if (outOfFlowMgr) outOfFlowMgr->containerSizeChangedForChildren (); + + DBG_OBJ_LEAVE (); } bool Textblock::usesAvailWidth () @@ -66,7 +66,9 @@ void Embed::sizeAllocateImpl (Allocation *allocation) void Embed::containerSizeChangedForChildren () { + DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren"); // Nothing to do (as long as all resources return empty iterators). + DBG_OBJ_LEAVE (); } void Embed::enterNotifyImpl (core::EventCrossing *event) diff --git a/dw/widget.cc b/dw/widget.cc index 83c401a6..8d00c127 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -340,7 +340,7 @@ bool Widget::affectedByContainerSizeChange () (getStyle()->height == style::LENGTH_AUTO ? usesAvailHeight () : false); } else - ret = this->affectsSizeChangeContainerChild (this); + ret = container->affectsSizeChangeContainerChild (this); DBG_OBJ_MSGF ("resize", 1, "=> %s", ret ? "true" : "false"); DBG_OBJ_LEAVE (); |