aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-01-09 13:17:50 +0100
committerSebastian Geerken <devnull@localhost>2016-01-09 13:17:50 +0100
commitc9199eabe605b94cbfc47ac356a651cc086a6747 (patch)
treed2b6a1a4714422015dfa941c006d1196eddfd557 /dw
parentc714e1a14e82a7b45195f3d37c9edb2cb82c7107 (diff)
SRDOP: Extend Widget::calcExtraSpace and Widget::calcExtraSpaceImpl by references.
Diffstat (limited to 'dw')
-rw-r--r--dw/textblock.cc7
-rw-r--r--dw/textblock.hh3
-rw-r--r--dw/widget.cc12
-rw-r--r--dw/widget.hh6
4 files changed, 18 insertions, 10 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 9d64c2c9..3b7479af 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -738,11 +738,14 @@ void Textblock::sizeAllocateImpl (core::Allocation *allocation)
DBG_OBJ_LEAVE ();
}
-void Textblock::calcExtraSpaceImpl (bool vertical)
+void Textblock::calcExtraSpaceImpl (bool vertical, int numPos,
+ Widget **references, int *x, int *y)
{
DBG_OBJ_ENTER0 ("resize", 0, "Textblock::calcExtraSpaceImpl");
- OOFAwareWidget::calcExtraSpaceImpl (vertical);
+ sizeRequestParams.fill (numPos, references, x, y);
+
+ OOFAwareWidget::calcExtraSpaceImpl (vertical, numPos, references, x, y);
if (vertical) {
int clearPosition = 0;
diff --git a/dw/textblock.hh b/dw/textblock.hh
index 3120b59e..2346f22d 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -831,7 +831,8 @@ protected:
void sizeAllocateImpl (core::Allocation *allocation);
- void calcExtraSpaceImpl (bool vertical);
+ void calcExtraSpaceImpl (bool vertical, int numPos, Widget **references,
+ int *x, int *y);
int getAvailWidthOfChild (core::Widget *child, bool forceValue);
int getAvailHeightOfChild (core::Widget *child, bool forceValue);
diff --git a/dw/widget.cc b/dw/widget.cc
index 6f021d72..005fa976 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -606,7 +606,7 @@ void Widget::sizeRequest (Requisition *requisition, int numPos,
}
if (callImpl) {
- calcExtraSpace (true);
+ calcExtraSpace (true, numPos, references, x, y);
/** \todo Check requisition == &(this->requisition) and do what? */
sizeRequestImpl (requisition, numPos, references, x, y);
this->requisition = *requisition;
@@ -1044,7 +1044,7 @@ void Widget::getExtremes (Extremes *extremes, int numPos, Widget **references,
}
if (callImpl) {
- calcExtraSpace (false);
+ calcExtraSpace (false, numPos, references, x, y);
// For backward compatibility (part 1/2):
extremes->minWidthIntrinsic = extremes->maxWidthIntrinsic = -1;
@@ -1084,12 +1084,13 @@ void Widget::getExtremes (Extremes *extremes, int numPos, Widget **references,
* If `vertical` is false, only horizontal dimensions are calculated. (This is
* used for extremes.)
*/
-void Widget::calcExtraSpace (bool vertical)
+void Widget::calcExtraSpace (bool vertical, int numPos, Widget **references,
+ int *x, int *y)
{
DBG_OBJ_ENTER0 ("resize", 0, "calcExtraSpace");
extraSpace.top = extraSpace.right = extraSpace.bottom = extraSpace.left = 0;
- calcExtraSpaceImpl (vertical);
+ calcExtraSpaceImpl (vertical, numPos, references, x, y);
if (vertical) {
DBG_OBJ_SET_NUM ("extraSpace.top", extraSpace.top);
@@ -1649,7 +1650,8 @@ void Widget::sizeAllocateImpl (Allocation *allocation)
* If `vertical` is false, only horizontal dimensions are calculated. (This is
* used for extremes.)
*/
-void Widget::calcExtraSpaceImpl (bool vertical)
+void Widget::calcExtraSpaceImpl (bool vertical, int numPos, Widget **references,
+ int *x, int *y)
{
}
diff --git a/dw/widget.hh b/dw/widget.hh
index d2665343..94b8b7ec 100644
--- a/dw/widget.hh
+++ b/dw/widget.hh
@@ -303,7 +303,8 @@ protected:
*/
virtual void getExtremesSimpl (Extremes *extremes);
- virtual void calcExtraSpaceImpl (bool vertical);
+ virtual void calcExtraSpaceImpl (bool vertical, int numPos,
+ Widget **references, int *x, int *y);
/**
* \brief See \ref dw-widget-sizes.
@@ -485,7 +486,8 @@ public:
Widget **references = NULL, int *x = NULL, int *y = NULL);
void sizeAllocate (Allocation *allocation);
- void calcExtraSpace (bool vertical);
+ void calcExtraSpace (bool vertical, int numPos, Widget **references,
+ int *x, int *y);
int getAvailWidth (bool forceValue);
int getAvailHeight (bool forceValue);