diff options
author | Sebastian Geerken <devnull@localhost> | 2015-05-20 22:47:25 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-05-20 22:47:25 +0200 |
commit | bb6b9a5275d148782cb81811461d5063de38cb92 (patch) | |
tree | 04fdfdae48bb291c7c26a87d6044fd3c1ff122a7 /dw/textblock.cc | |
parent | 150606242d7da8d9c616e05bdf8a3e92de428c8a (diff) |
Size requisitions depending on positions (SRDOP): added method signatures.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 15 |
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) |