aboutsummaryrefslogtreecommitdiff
path: root/dw/alignedtablecell.hh
blob: b49660ba32d7b67a71f5eaf0cc37f23e411b9d04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __DW_ALIGNEDTABLECELL_HH__
#define __DW_ALIGNEDTABLECELL_HH__

#include "core.hh"
#include "alignedtextblock.hh"

namespace dw {

class AlignedTableCell: public AlignedTextblock
{
private:
   int charWordIndex, charWordPos;

protected:
   int getAvailWidthOfChild (Widget *child, bool forceValue);
   int getAvailHeightOfChild (Widget *child, bool forceValue);

   bool getAdjustMinWidth ();

   int wordWrap (int wordIndex, bool wrapAll);

   int getValue ();
   void setMaxValue (int maxValue, int value);

public:
   static int CLASS_ID;

   AlignedTableCell(AlignedTableCell *ref, bool limitTextWidth);
   ~AlignedTableCell();

   int applyPerWidth (int containerWidth, core::style::Length perWidth);
   int applyPerHeight (int containerHeight, core::style::Length perHeight);

   bool isBlockLevel ();
};

} // namespace dw

#endif // __DW_ALIGNEDTABLECELL_HH__