diff options
author | Sebastian Geerken <devnull@localhost> | 2014-06-27 23:06:02 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-06-27 23:06:02 +0200 |
commit | 48698e1c23cde05557b2a25786effec59525147f (patch) | |
tree | 99573a6cc44d5ab8a30bc642c38da224141503fc /dw/table.hh | |
parent | fafccbb4d785eaed21bb77e93419a84edda18e05 (diff) |
Some refactoring related to column extremes calculation.
Diffstat (limited to 'dw/table.hh')
-rw-r--r-- | dw/table.hh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dw/table.hh b/dw/table.hh index 5288c986..d1743f68 100644 --- a/dw/table.hh +++ b/dw/table.hh @@ -394,6 +394,17 @@ private: bool colWidthsUpToDateWidthColExtremes; + enum ExtrMod { MIN, MIN_INTR, MAX, MAX_INTR }; + + const char *getExtrModName (ExtrMod mod); + int getExtreme (core::Extremes *extremes, ExtrMod mod); + void setExtreme (core::Extremes *extremes, ExtrMod mod, int value); + + inline int getColExtreme (int col, ExtrMod mod) { + return getExtreme (colExtremes->getRef(col), mod); } + inline void setColExtreme (int col, ExtrMod mod, int value) { + setExtreme (colExtremes->getRef(col), mod, value); } + inline bool childDefined(int n) { return n < children->size() && children->get(n) != NULL && @@ -408,9 +419,13 @@ private: void calcColumnExtremes (); void forceCalcColumnExtremes (); + void calcExtremesSpanMulteCols (int col, int cs, + core::Extremes *cellExtremes, + ExtrMod minExtrMod, ExtrMod maxExtrMod); void apportion2 (int totalWidth, bool forceTotalWidth, int firstCol, int lastCol, + ExtrMod minExtrMod, ExtrMod maxExtrMod, lout::misc::SimpleVector<int> *dest, int destOffset, bool setRedrawX); |