Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGXYLayout.h
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Reiner Rohlfs 24/03/2002
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun, Fons Rademakers and Reiner Rohlfs *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12
13#ifndef ROOT_TGXYLayout
14#define ROOT_TGXYLayout
15
16#include "TGLayout.h"
17
18
20
21protected:
22 Double_t fX; ///< x - position of widget
23 Double_t fY; ///< y - position of widget
24 Double_t fW; ///< width of widget
25 Double_t fH; ///< height of widget
26 UInt_t fFlag; ///< rubber flag
27
28public:
29
34 kLRubberH = BIT(3)
35 };
36
38 UInt_t rubberFlag = kLRubberX | kLRubberY);
39
40 Double_t GetX() const { return fX; };
41 Double_t GetY() const { return fY; };
42 Double_t GetW() const { return fW; };
43 Double_t GetH() const { return fH; };
44 UInt_t GetFlag() const { return fFlag; };
45
46 void SetX(Double_t x) { fX = x; }
47 void SetY(Double_t y) { fY = y; }
48 void SetW(Double_t w) { fW = w; }
49 void SetH(Double_t h) { fH = h; }
50 void SetFlag(UInt_t flag) { fFlag = flag; }
51
52 void SavePrimitive(std::ostream &out, Option_t * = "") override;
53
54 ClassDefOverride(TGXYLayoutHints,0) // Hits for the X / Y - layout manager
55};
56
57
59
60protected:
61 TList *fList; ///< list of frames to arrange
62 TGCompositeFrame *fMain; ///< container frame
63
64 Bool_t fFirst; ///< flag to determine the first call of Layout()
65 UInt_t fFirstWidth; ///< original width of the frame fMain
66 UInt_t fFirstHeight; ///< original height of the frame fMain
67
68 Int_t fTWidth; ///< text width of a default character "1234567890" / 10
69 Int_t fTHeight; ///< text height
70
71 TGXYLayout(const TGXYLayout&);
73
74public:
76
77 void Layout() override;
78 TGDimension GetDefaultSize() const override;
79 void SavePrimitive(std::ostream &out, Option_t * = "") override;
80
81 void NewSize() { fFirst = kTRUE; }
82
83 ClassDefOverride(TGXYLayout,0) // X / Y - layout manager
84};
85
86#endif
int main()
Definition Prototype.cxx:12
#define h(i)
Definition RSha256.hxx:106
unsigned int UInt_t
Definition RtypesCore.h:46
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:90
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Frame layout manager.
Definition TGLayout.h:135
This layout hint must be used for the TGXYLayout manager!
Definition TGXYLayout.h:19
Double_t GetX() const
Definition TGXYLayout.h:40
void SetY(Double_t y)
Definition TGXYLayout.h:47
void SetFlag(UInt_t flag)
Definition TGXYLayout.h:50
void SetH(Double_t h)
Definition TGXYLayout.h:49
void SetX(Double_t x)
Definition TGXYLayout.h:46
Double_t fY
y - position of widget
Definition TGXYLayout.h:23
Double_t fW
width of widget
Definition TGXYLayout.h:24
Double_t fH
height of widget
Definition TGXYLayout.h:25
Double_t GetH() const
Definition TGXYLayout.h:43
Double_t GetW() const
Definition TGXYLayout.h:42
UInt_t fFlag
rubber flag
Definition TGXYLayout.h:26
void SavePrimitive(std::ostream &out, Option_t *="") override
Save XY layout hints as a C++ statement(s) on output stream.
Double_t fX
x - position of widget
Definition TGXYLayout.h:22
void SetW(Double_t w)
Definition TGXYLayout.h:48
Double_t GetY() const
Definition TGXYLayout.h:41
UInt_t GetFlag() const
Definition TGXYLayout.h:44
Is a layout manager where the position and the size of each widget in the frame are defined by X / Y ...
Definition TGXYLayout.h:58
Int_t fTWidth
text width of a default character "1234567890" / 10
Definition TGXYLayout.h:68
TList * fList
list of frames to arrange
Definition TGXYLayout.h:61
UInt_t fFirstWidth
original width of the frame fMain
Definition TGXYLayout.h:65
UInt_t fFirstHeight
original height of the frame fMain
Definition TGXYLayout.h:66
void Layout() override
Recalculates the postion and the size of all widgets.
TGCompositeFrame * fMain
container frame
Definition TGXYLayout.h:62
TGXYLayout & operator=(const TGXYLayout &)
assignment operator
Int_t fTHeight
text height
Definition TGXYLayout.h:69
Bool_t fFirst
flag to determine the first call of Layout()
Definition TGXYLayout.h:64
void NewSize()
Definition TGXYLayout.h:81
void SavePrimitive(std::ostream &out, Option_t *="") override
Save XY layout manager as a C++ statement(s) on output stream.
TGDimension GetDefaultSize() const override
Returns the original size of the frame.
A doubly linked list.
Definition TList.h:38
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17