aboutsummaryrefslogtreecommitdiff
path: root/dw/simpletablecell.hh
blob: 6eef509628ebabef3b3a97fa2737dbc2ff5f4a41 (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
#ifndef __DW_SIMPLETABLECELL_HH__
#define __DW_SIMPLETABLECELL_HH__

#include "textblock.hh"

namespace dw {

class SimpleTableCell: public Textblock
{
protected:
   int getAvailWidthOfChild (Widget *child, bool forceValue);
   int getAvailHeightOfChild (Widget *child, bool forceValue);

   void correctRequisitionOfChild (Widget *child,
                                   core::Requisition *requisition,
                                   void (*splitHeightFun) (int, int*, int*));
   void correctExtremesOfChild (Widget *child, core::Extremes *extremes);

   bool getAdjustMinWidth ();

public:
   static int CLASS_ID;

   SimpleTableCell (bool limitTextWidth);
   ~SimpleTableCell ();

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

   bool isBlockLevel ();

   bool mustBeWidenedToAvailWidth ();
};

} // namespace dw

#endif // __DW_SIMPLETABLECELL_HH__