12 #ifndef ROOT_TGTableLayout
13 #define ROOT_TGTableLayout
19 enum ETableLayoutHints {
20 kLHintsShrinkX = BIT(8),
21 kLHintsShrinkY = BIT(9),
22 kLHintsFillX = BIT(10),
23 kLHintsFillY = BIT(11)
35 class TGTableLayoutHints :
public TGLayoutHints {
38 TGTableLayoutHints(
const TGTableLayoutHints&);
39 TGTableLayoutHints& operator=(
const TGTableLayoutHints&);
48 TGTableLayoutHints(UInt_t attach_left, UInt_t attach_right,
49 UInt_t attach_top, UInt_t attach_bottom,
50 ULong_t hints = kLHintsNormal,
51 UInt_t padleft = 0, UInt_t padright = 0,
52 UInt_t padtop = 0, UInt_t padbottom = 0)
53 : TGLayoutHints(hints,padleft,padright,padtop,padbottom),
54 fAttachLeft(attach_left),
55 fAttachRight(attach_right),
56 fAttachTop(attach_top),
57 fAttachBottom(attach_bottom) { }
58 virtual ~TGTableLayoutHints() { }
60 UInt_t GetAttachLeft()
const {
return fAttachLeft; }
61 UInt_t GetAttachRight()
const {
return fAttachRight; }
62 UInt_t GetAttachTop()
const {
return fAttachTop; }
63 UInt_t GetAttachBottom()
const {
return fAttachBottom; }
64 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
66 ClassDef(TGTableLayoutHints,0)
85 class TGTableLayout :
public TGLayoutManager {
88 TGTableLayout(
const TGTableLayout&);
89 TGTableLayout& operator=(
const TGTableLayout&);
103 TGCompositeFrame *fMain;
107 void FindRowColSizes();
108 void FindRowColSizesInit();
109 void FindRowColSizesHomogeneous();
110 void FindRowColSizesSinglyAttached();
111 void FindRowColSizesMultiplyAttached();
113 void SetRowColSizes();
114 void SetRowColSizesInit();
118 static void SetRowColResize(UInt_t real_size, UInt_t nthings,
119 TableData_t *thing, Bool_t homogeneous);
128 TGTableLayout(TGCompositeFrame *main, UInt_t nrows, UInt_t ncols,
129 Bool_t homogeneous = kFALSE, Int_t sep = 0, Int_t hints = 0);
130 virtual ~TGTableLayout();
132 virtual void Layout();
133 virtual TGDimension GetDefaultSize()
const;
134 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
136 ClassDef(TGTableLayout,0)