aboutsummaryrefslogtreecommitdiff
path: root/dw/simpletablecell.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-07-24 23:40:21 +0200
committerSebastian Geerken <devnull@localhost>2014-07-24 23:40:21 +0200
commit6c77ae97e8d500a35caf3b9acdc5c0a377337d9d (patch)
treefd96fa08b1ef23266865edefed5587da3bdb6a39 /dw/simpletablecell.cc
parentb6aeac03a3e6c5f4ea7edaad9a42b79cf5a8fe10 (diff)
More work on tables; some reorganization.
Diffstat (limited to 'dw/simpletablecell.cc')
-rw-r--r--dw/simpletablecell.cc39
1 files changed, 33 insertions, 6 deletions
diff --git a/dw/simpletablecell.cc b/dw/simpletablecell.cc
index 43dec92a..2621c348 100644
--- a/dw/simpletablecell.cc
+++ b/dw/simpletablecell.cc
@@ -20,7 +20,8 @@
#include "simpletablecell.hh"
-#include "table.hh"
+#include "tablecell.hh"
+#include "../lout/misc.hh"
#include "../lout/debug.hh"
namespace dw {
@@ -41,24 +42,50 @@ SimpleTableCell::~SimpleTableCell()
bool SimpleTableCell::getAdjustMinWidth ()
{
- return Table::getAdjustTableMinWidth ();
+ return tablecell::getAdjustMinWidth ();
}
bool SimpleTableCell::isBlockLevel ()
{
- return false;
+ return tablecell::isBlockLevel ();
+}
+
+int SimpleTableCell::getAvailWidthOfChild (Widget *child, bool forceValue)
+{
+ DBG_OBJ_ENTER ("resize", 0, "SimpleTableCell/getAvailWidthOfChild",
+ "%p, %s", child, forceValue ? "true" : "false");
+
+ int width = tablecell::correctAvailWidthOfChild
+ (this, child, Textblock::getAvailWidthOfChild (child, forceValue),
+ forceValue);
+
+ DBG_OBJ_LEAVE ();
+ return width;
+}
+
+int SimpleTableCell::getAvailHeightOfChild (Widget *child, bool forceValue)
+{
+ DBG_OBJ_ENTER ("resize", 0, "SimpleTableCell/getAvailHeightOfChild",
+ "%p, %s", child, forceValue ? "true" : "false");
+
+ int height = tablecell::correctAvailHeightOfChild
+ (this, child, Textblock::getAvailHeightOfChild (child, forceValue),
+ forceValue);
+
+ DBG_OBJ_LEAVE ();
+ return height;
}
int SimpleTableCell::applyPerWidth (int containerWidth,
- core::style::Length perWidth)
+ core::style::Length perWidth)
{
- return core::style::multiplyWithPerLength (containerWidth, perWidth);
+ return tablecell::applyPerWidth (this, containerWidth, perWidth);
}
int SimpleTableCell::applyPerHeight (int containerHeight,
core::style::Length perHeight)
{
- return core::style::multiplyWithPerLength (containerHeight, perHeight);
+ return tablecell::applyPerHeight (this, containerHeight, perHeight);
}
} // namespace dw