aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-09-22 14:10:32 +0200
committerSebastian Geerken <devnull@localhost>2014-09-22 14:10:32 +0200
commited66235f15f5098750586fb1b5b12990d4e0d668 (patch)
tree1c659d45118e299f5ec8cb93f4fe067df5e75092
parentfd66852e8f75e67bdce79385dbab292e4e5fc647 (diff)
Extended signature of OOFM::tellPosition.
-rw-r--r--dw/ooffloatsmgr.cc10
-rw-r--r--dw/ooffloatsmgr.hh2
-rw-r--r--dw/oofpositionedmgr.cc2
-rw-r--r--dw/oofpositionedmgr.hh2
-rw-r--r--dw/outofflowmgr.hh2
-rw-r--r--dw/textblock_linebreaking.cc6
6 files changed, 14 insertions, 10 deletions
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc
index d5fa99f4..54dc1634 100644
--- a/dw/ooffloatsmgr.cc
+++ b/dw/ooffloatsmgr.cc
@@ -1482,12 +1482,12 @@ Widget *OOFFloatsMgr::getFloatWidgetAtPoint (SortedFloatsVector *list,
return NULL;
}
-void OOFFloatsMgr::tellPosition (Widget *widget, int yReq)
+void OOFFloatsMgr::tellPosition (Widget *widget, int x, int y)
{
- DBG_OBJ_ENTER ("resize.oofm", 0, "tellPosition", "%p, %d",
- widget, yReq);
+ DBG_OBJ_ENTER ("resize.oofm", 0, "tellPosition", "%p, %d, %d",
+ widget, x, y);
- assert (yReq >= 0);
+ assert (y >= 0);
Float *vloat = findFloatByWidget(widget);
@@ -1497,7 +1497,7 @@ void OOFFloatsMgr::tellPosition (Widget *widget, int yReq)
ensureFloatSize (vloat);
// "yReal" may change due to collisions (see below).
- vloat->yReq = vloat->yReal = yReq;
+ vloat->yReq = vloat->yReal = y;
DBG_OBJ_SET_NUM_O (vloat->getWidget (), "<Float>.yReq", vloat->yReq);
DBG_OBJ_SET_NUM_O (vloat->getWidget (), "<Float>.yReal", vloat->yReal);
diff --git a/dw/ooffloatsmgr.hh b/dw/ooffloatsmgr.hh
index d98de06b..00cd5b9e 100644
--- a/dw/ooffloatsmgr.hh
+++ b/dw/ooffloatsmgr.hh
@@ -354,7 +354,7 @@ public:
void moveExternalIndices (OOFAwareWidget *generatingBlock, int oldStartIndex,
int diff);
- void tellPosition (core::Widget *widget, int yReq);
+ void tellPosition (core::Widget *widget, int x, int y);
void getSize (core::Requisition *cbReq, int *oofWidth, int *oofHeight);
void getExtremes (core::Extremes *cbExtr,
diff --git a/dw/oofpositionedmgr.cc b/dw/oofpositionedmgr.cc
index 8257e0b9..61bc3c7f 100644
--- a/dw/oofpositionedmgr.cc
+++ b/dw/oofpositionedmgr.cc
@@ -231,7 +231,7 @@ Widget *OOFPositionedMgr::getWidgetAtPoint (int x, int y, int level)
return NULL;
}
-void OOFPositionedMgr::tellPosition (Widget *widget, int yReq)
+void OOFPositionedMgr::tellPosition (Widget *widget, int x, int y)
{
}
diff --git a/dw/oofpositionedmgr.hh b/dw/oofpositionedmgr.hh
index 9a1d59b7..c5db0c6f 100644
--- a/dw/oofpositionedmgr.hh
+++ b/dw/oofpositionedmgr.hh
@@ -64,7 +64,7 @@ public:
void moveExternalIndices (OOFAwareWidget *generator, int oldStartIndex,
int diff);
- void tellPosition (core::Widget *widget, int yReq);
+ void tellPosition (core::Widget *widget, int x, int y);
void getSize (core::Requisition *containerReq, int *oofWidth,
int *oofHeight);
diff --git a/dw/outofflowmgr.hh b/dw/outofflowmgr.hh
index 405db354..9a9032a7 100644
--- a/dw/outofflowmgr.hh
+++ b/dw/outofflowmgr.hh
@@ -38,7 +38,7 @@ public:
virtual void moveExternalIndices (OOFAwareWidget *generator,
int oldStartIndex, int diff) = 0;
- virtual void tellPosition (core::Widget *widget, int yReq) = 0;
+ virtual void tellPosition (core::Widget *widget, int x, int y) = 0;
virtual void getSize (core::Requisition *containerReq, int *oofWidth,
int *oofHeight) = 0;
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc
index 9a164198..82aef93a 100644
--- a/dw/textblock_linebreaking.cc
+++ b/dw/textblock_linebreaking.cc
@@ -752,11 +752,15 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll)
floatHandled = true;
// Step 2: position the float and re-calculate the line.
+
+ // TODO "x = 0" is not quite correct, but this does not
+ // matter (currently?).
+
lastFloatPos = newFloatPos;
for (int i = 0; i < NUM_OOFM; i++)
searchOutOfFlowMgr(i)->tellPosition
- (words->getRef(lastFloatPos)->content.widget, yNewLine);
+ (words->getRef(lastFloatPos)->content.widget, 0, yNewLine);
balanceBreakPosAndHeight (wordIndex, firstIndex, &searchUntil,
tempNewLine, penaltyIndex, false,