aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-05-20 22:47:25 +0200
committerSebastian Geerken <devnull@localhost>2015-05-20 22:47:25 +0200
commitbb6b9a5275d148782cb81811461d5063de38cb92 (patch)
tree04fdfdae48bb291c7c26a87d6044fd3c1ff122a7 /dw/textblock.cc
parent150606242d7da8d9c616e05bdf8a3e92de428c8a (diff)
Size requisitions depending on positions (SRDOP): added method signatures.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index d1d2fb26..3dba2dc2 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -314,10 +314,13 @@ Textblock::~Textblock ()
* padding/border/margin. This can be used to align the first lines
* of several textblocks in a horizontal line.
*/
-void Textblock::sizeRequestImpl (core::Requisition *requisition)
+void Textblock::sizeRequestImpl (core::Requisition *requisition,
+ bool posDefined, int x, int y)
{
DBG_OBJ_ENTER0 ("resize", 0, "sizeRequestImpl");
+ assert (posDefined || !needsPositionForSize ());
+
int newLineBreakWidth = getAvailWidth (true);
if (newLineBreakWidth != lineBreakWidth) {
lineBreakWidth = newLineBreakWidth;
@@ -401,6 +404,16 @@ void Textblock::sizeRequestImpl (core::Requisition *requisition)
DBG_OBJ_LEAVE ();
}
+core::Widget *Textblock::sizeRequestReference ()
+{
+ return needsPositionForSize() ? oofContainer[OOFM_FLOATS] : NULL;
+}
+
+bool Textblock::needsPositionForSize ()
+{
+ return false;
+}
+
int Textblock::calcVerticalBorder (int widgetPadding, int widgetBorder,
int widgetMargin, int lineBorderTotal,
int lineMarginTotal)