aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-10-09 22:22:38 +0200
committerSebastian Geerken <devnull@localhost>2015-10-09 22:22:38 +0200
commit55ef9e15acdc335458adef22a72648a7753fd9e9 (patch)
treeee90afbf141ef8c03e19ec053acb56c6573973ae /dw
parent01c1c4d5322f70d55a42a09c5eddc76a1a44241d (diff)
SRDOP: Remove obsolete OOFFloatsMgr::doFloatsExceedCB()
Diffstat (limited to 'dw')
-rw-r--r--dw/ooffloatsmgr.cc54
-rw-r--r--dw/ooffloatsmgr.hh2
2 files changed, 0 insertions, 56 deletions
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc
index 3546d05c..79b76580 100644
--- a/dw/ooffloatsmgr.cc
+++ b/dw/ooffloatsmgr.cc
@@ -386,13 +386,6 @@ void OOFFloatsMgr::sizeAllocateEnd (OOFAwareWidget *caller)
if (caller == container) {
sizeAllocateFloats (LEFT);
sizeAllocateFloats (RIGHT);
-
- // There are cases where some allocated floats exceed the CB size.
- // TODO Still needed after SRDOP?
- bool sizeChanged = doFloatsExceedCB (LEFT) || doFloatsExceedCB (RIGHT);
-
- if (sizeChanged)
- container->oofSizeChanged (false);
}
}
@@ -411,53 +404,6 @@ void OOFFloatsMgr::containerSizeChangedForChildren ()
DBG_OBJ_LEAVE ();
}
-bool OOFFloatsMgr::doFloatsExceedCB (Side side)
-{
- DBG_OBJ_ENTER ("resize.oofm", 0, "doFloatsExceedCB", "%s",
- side == LEFT ? "LEFT" : "RIGHT");
-
- // This method is called to determine whether the *requisition* of
- // the CB must be recalculated. So, we check the float allocations
- // against the *requisition* of the CB, which may (e. g. within
- // tables) differ from the new allocation. (Generally, a widget may
- // allocated at a different size.)
-
- core::Requisition cbReq;
- container->sizeRequest (&cbReq);
-
- SortedFloatsVector *list = side == LEFT ? leftFloats : rightFloats;
- bool exceeds = false;
-
- DBG_OBJ_MSG_START ();
-
- for (int i = 0; i < list->size () && !exceeds; i++) {
- Float *vloat = list->get (i);
- if (vloat->getWidget()->wasAllocated ()) {
- Allocation *fla = vloat->getWidget()->getAllocation ();
- DBG_OBJ_MSGF ("resize.oofm", 2,
- "Does FlA = (%d, %d, %d * %d) exceed CB req+alloc = "
- "(%d, %d, %d * %d)?",
- fla->x, fla->y, fla->width, fla->ascent + fla->descent,
- containerAllocation.x, containerAllocation.y,
- cbReq.width, cbReq.ascent + cbReq.descent);
- if (fla->x + fla->width > containerAllocation.x + cbReq.width ||
- fla->y + fla->ascent + fla->descent
- > containerAllocation.y + cbReq.ascent + cbReq.descent) {
- exceeds = true;
- DBG_OBJ_MSG ("resize.oofm", 2, "Yes.");
- } else
- DBG_OBJ_MSG ("resize.oofm", 2, "No.");
- }
- }
-
- DBG_OBJ_MSG_END ();
-
- DBG_OBJ_MSGF ("resize.oofm", 1, "=> %s", exceeds ? "true" : "false");
- DBG_OBJ_LEAVE ();
-
- return exceeds;
-}
-
void OOFFloatsMgr::sizeAllocateFloats (Side side)
{
SortedFloatsVector *list = side == LEFT ? leftFloats : rightFloats;
diff --git a/dw/ooffloatsmgr.hh b/dw/ooffloatsmgr.hh
index 2adb1c08..521ccd90 100644
--- a/dw/ooffloatsmgr.hh
+++ b/dw/ooffloatsmgr.hh
@@ -164,8 +164,6 @@ private:
int getGBWidthForAllocation (Float *vloat);
int calcFloatX (Float *vloat);
- bool doFloatsExceedCB (Side side);
-
void drawFloats (SortedFloatsVector *list, core::View *view,
core::Rectangle *area, core::DrawingContext *context);
core::Widget *getFloatWidgetAtPoint (SortedFloatsVector *list, int x, int y,