32 kLHintsCenterX = BIT(1),
33 kLHintsRight = BIT(2),
35 kLHintsCenterY = BIT(4),
36 kLHintsBottom = BIT(5),
37 kLHintsExpandX = BIT(6),
38 kLHintsExpandY = BIT(7),
39 kLHintsNormal = (kLHintsLeft | kLHintsTop)
44 class TGCompositeFrame;
57 class TGLayoutHints :
public TObject,
public TRefCnt {
59 friend class TGFrameElement;
60 friend class TGCompositeFrame;
64 TGFrameElement *fPrev;
66 TGLayoutHints& operator=(
const TGLayoutHints&);
75 void UpdateFrameElements(TGLayoutHints *l);
78 TGLayoutHints(ULong_t hints = kLHintsNormal,
79 Int_t padleft = 0, Int_t padright = 0,
80 Int_t padtop = 0, Int_t padbottom = 0):
81 fFE(0), fPrev(0), fLayoutHints(hints), fPadtop(padtop), fPadbottom(padbottom),
82 fPadleft(padleft), fPadright(padright)
85 TGLayoutHints(
const TGLayoutHints &lh);
87 virtual ~TGLayoutHints();
89 ULong_t GetLayoutHints()
const {
return fLayoutHints; }
90 Int_t GetPadTop()
const {
return fPadtop; }
91 Int_t GetPadBottom()
const {
return fPadbottom; }
92 Int_t GetPadLeft()
const {
return fPadleft; }
93 Int_t GetPadRight()
const {
return fPadright; }
95 virtual void SetLayoutHints(ULong_t lh) { fLayoutHints = lh; }
96 virtual void SetPadTop(Int_t v) { fPadtop = v; }
97 virtual void SetPadBottom(Int_t v) { fPadbottom = v; }
98 virtual void SetPadLeft(Int_t v) { fPadleft = v; }
99 virtual void SetPadRight(Int_t v) { fPadright = v; }
101 void Print(Option_t* option =
"")
const;
102 void ls(Option_t* option =
"")
const { Print(option); }
104 virtual void SavePrimitive(std::ostream &out, Option_t *option =
"");
106 ClassDef(TGLayoutHints,0)
112 class TGFrameElement :
public TObject {
115 TGFrameElement(
const TGFrameElement&);
116 TGFrameElement& operator=(
const TGFrameElement&);
121 TGLayoutHints *fLayout;
123 TGFrameElement() : fFrame(0), fState(0), fLayout(0) { }
124 TGFrameElement(TGFrame *f, TGLayoutHints *l);
127 void Print(Option_t* option =
"")
const;
128 void ls(Option_t* option =
"")
const { Print(option); }
130 ClassDef(TGFrameElement, 0);
142 class TGLayoutManager :
public TObject {
147 TGLayoutManager() : fModified(kTRUE) {}
149 virtual void Layout() = 0;
150 virtual TGDimension GetDefaultSize()
const = 0;
151 virtual void SetDefaultWidth(UInt_t ) {}
152 virtual void SetDefaultHeight(UInt_t ) {}
153 virtual Bool_t IsModified()
const {
return fModified; }
154 virtual void SetModified(Bool_t flag = kTRUE) { fModified = flag; }
156 ClassDef(TGLayoutManager,0)
166 class TGVerticalLayout :
public TGLayoutManager {
169 TGCompositeFrame *fMain;
172 TGVerticalLayout(
const TGVerticalLayout& gvl) :
173 TGLayoutManager(gvl), fMain(gvl.fMain), fList(gvl.fList) { }
174 TGVerticalLayout& operator=(
const TGVerticalLayout& gvl)
175 {
if(
this!=&gvl) { TGLayoutManager::operator=(gvl);
176 fMain=gvl.fMain; fList=gvl.fList;}
return *
this;}
179 TGVerticalLayout(TGCompositeFrame *main);
181 virtual void Layout();
182 virtual TGDimension GetDefaultSize()
const;
183 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
185 ClassDef(TGVerticalLayout,0)
188 class TGHorizontalLayout :
public TGVerticalLayout {
190 TGHorizontalLayout(TGCompositeFrame *main) : TGVerticalLayout(main) { }
192 virtual void Layout();
193 virtual TGDimension GetDefaultSize()
const;
194 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
196 ClassDef(TGHorizontalLayout,0)
208 class TGRowLayout :
public TGVerticalLayout {
212 TGRowLayout(TGCompositeFrame *main, Int_t s = 0) :
213 TGVerticalLayout(main), fSep(s) { }
215 virtual void Layout();
216 virtual TGDimension GetDefaultSize()
const;
217 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
219 ClassDef(TGRowLayout,0)
222 class TGColumnLayout :
public TGRowLayout {
224 TGColumnLayout(TGCompositeFrame *main, Int_t s = 0) : TGRowLayout(main, s) { }
226 virtual void Layout();
227 virtual TGDimension GetDefaultSize()
const;
228 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
230 ClassDef(TGColumnLayout,0)
242 class TGMatrixLayout :
public TGLayoutManager {
245 TGMatrixLayout(
const TGMatrixLayout&);
246 TGMatrixLayout& operator=(
const TGMatrixLayout&);
249 TGCompositeFrame *fMain;
258 TGMatrixLayout(TGCompositeFrame *main, UInt_t r, UInt_t c, Int_t s=0, Int_t h=0);
260 virtual void Layout();
261 virtual TGDimension GetDefaultSize()
const;
262 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
264 ClassDef(TGMatrixLayout,0)
276 class TGTileLayout :
public TGLayoutManager {
279 TGTileLayout(
const TGTileLayout&);
280 TGTileLayout& operator=(
const TGTileLayout&);
284 TGCompositeFrame *fMain;
290 TGTileLayout(TGCompositeFrame *main, Int_t sep = 0);
292 virtual void Layout();
293 virtual TGDimension GetDefaultSize()
const;
294 virtual Bool_t IsModified()
const {
return fModified; }
295 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
297 ClassDef(TGTileLayout,0)
300 class TGListLayout :
public TGTileLayout {
302 TGListLayout(TGCompositeFrame *main, Int_t sep = 0) :
303 TGTileLayout(main, sep) { }
305 virtual void Layout();
306 virtual TGDimension GetDefaultSize()
const;
307 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
309 ClassDef(TGListLayout,0)
312 class TGListDetailsLayout :
public TGTileLayout {
317 TGListDetailsLayout(TGCompositeFrame *main, Int_t sep = 0, UInt_t w = 0) :
318 TGTileLayout(main, sep), fWidth(w) { }
320 virtual void Layout();
321 virtual TGDimension GetDefaultSize()
const;
322 virtual void SetDefaultWidth(UInt_t w) { fWidth = w; }
323 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
325 ClassDef(TGListDetailsLayout,0)