aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-04-27 19:26:40 +0200
committerSebastian Geerken <devnull@localhost>2014-04-27 19:26:40 +0200
commit5e0678ef523f24dd452278427d8e02ba9e7f76e8 (patch)
tree6ad8c944c32a5f2cd4ec342419b4d96c5b649cd5
parent24eb54b311d80d45d3ce3e9f4d88963939c4a9ab (diff)
RTFL messages.
-rw-r--r--dw/outofflowmgr.cc43
-rw-r--r--dw/textblock.hh9
2 files changed, 44 insertions, 8 deletions
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc
index ce26be4d..a2f5a722 100644
--- a/dw/outofflowmgr.cc
+++ b/dw/outofflowmgr.cc
@@ -888,27 +888,53 @@ bool OutOfFlowMgr::hasRelationChanged (bool oldTBAlloc,
bool OutOfFlowMgr::doFloatsExceedCB (Side side)
{
+ DBG_OBJ_MSGF ("resize.oofm", 0, "<b>doFloatsExceedCB</b> (%s)",
+ side == LEFT ? "LEFT" : "RIGHT");
+ DBG_OBJ_MSG_START ();
+
SortedFloatsVector *list = side == LEFT ? leftFloatsCB : rightFloatsCB;
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 CBA = "
+ "(%d, %d, %d * %d)?",
+ fla->x, fla->y, fla->width, fla->ascent + fla->descent,
+ containingBlockAllocation.x, containingBlockAllocation.y,
+ containingBlockAllocation.width,
+ containingBlockAllocation.ascent
+ + containingBlockAllocation.descent);
if (fla->x + fla->width >
containingBlockAllocation.x + containingBlockAllocation.width ||
fla->y + fla->ascent + fla->descent >
containingBlockAllocation.y + containingBlockAllocation.ascent
- + containingBlockAllocation.descent)
+ + containingBlockAllocation.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_MSG_END ();
+
return exceeds;
}
bool OutOfFlowMgr::haveExtremesChanged (Side side)
{
+ DBG_OBJ_MSGF ("resize.oofm", 0, "<b>haveExtremesChanged</b> (%s)",
+ side == LEFT ? "LEFT" : "RIGHT");
+ DBG_OBJ_MSG_START ();
+
// This is quite different from doFloatsExceedCB, since there is no
// counterpart to getExtremes, as sizeAllocate is a counterpart to
// sizeRequest. So we have to determine whether the allocation has
@@ -956,6 +982,9 @@ bool OutOfFlowMgr::haveExtremesChanged (Side side)
}
}
+ DBG_OBJ_MSGF ("resize.oofm", 1, "=> %s", changed ? "true" : "false");
+ DBG_OBJ_MSG_END ();
+
return changed;
}
@@ -1617,7 +1646,8 @@ void OutOfFlowMgr::getFloatsSize (Requisition *cbReq, Side side, int *width,
void OutOfFlowMgr::getExtremes (Extremes *cbExtr, int *oofMinWidth,
int *oofMaxWidth)
{
- DBG_OBJ_MSG ("resize.oofm", 0, "<b>getExtremes</b> ()");
+ DBG_OBJ_MSGF ("resize.oofm", 0, "<b>getExtremes</b> ((%d / %d), ...)",
+ cbExtr->minWidth, cbExtr->maxWidth);
DBG_OBJ_MSG_START ();
int oofMinWidthAbsPos, oofMaxWidthAbsPos;
@@ -1642,16 +1672,17 @@ void OutOfFlowMgr::getExtremes (Extremes *cbExtr, int *oofMinWidth,
void OutOfFlowMgr::getFloatsExtremes (Extremes *cbExtr, Side side,
int *minWidth, int *maxWidth)
{
- *minWidth = *maxWidth = 0;
-
- SortedFloatsVector *list = getFloatsListForTextblock (containingBlock, side);
-
DBG_OBJ_MSGF ("resize.oofm", 0,
"<b>getFloatsExtremes</b> ((%d / %d), %s, ...)",
cbExtr->minWidth, cbExtr->maxWidth,
side == LEFT ? "LEFT" : "RIGHT");
DBG_OBJ_MSG_START ();
+ *minWidth = *maxWidth = 0;
+
+ SortedFloatsVector *list = getFloatsListForTextblock (containingBlock, side);
+
+
for (int i = 0; i < list->size(); i++) {
Float *vloat = list->get(i);
diff --git a/dw/textblock.hh b/dw/textblock.hh
index 3c79a75b..5cd43d32 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -802,8 +802,13 @@ public:
bool includeFirstSpace, bool includeLastSpace);
void borderChanged (int y, core::Widget *vloat);
- inline void oofSizeChanged (bool extremesChanged)
- { queueResize (-1, extremesChanged); }
+ inline void oofSizeChanged (bool extremesChanged) {
+ DBG_OBJ_MSGF ("resize", 0, "<b>oofSizeChanged</b> (%s)",
+ extremesChanged ? "true" : "false");
+ DBG_OBJ_MSG_START ();
+ queueResize (-1, extremesChanged);
+ DBG_OBJ_MSG_END ();
+ }
inline int getAvailWidth () { return availWidth; }
inline int getAvailAscent () { return availAscent; }
inline int getAvailDescent () { return availDescent; }