File indexing completed on 2025-01-18 10:12:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_TGXYLayout
0014 #define ROOT_TGXYLayout
0015
0016 #include "TGLayout.h"
0017
0018
0019 class TGXYLayoutHints : public TGLayoutHints {
0020
0021 protected:
0022 Double_t fX;
0023 Double_t fY;
0024 Double_t fW;
0025 Double_t fH;
0026 UInt_t fFlag;
0027
0028 public:
0029
0030 enum ERubberFlag {
0031 kLRubberX = BIT(0),
0032 kLRubberY = BIT(1),
0033 kLRubberW = BIT(2),
0034 kLRubberH = BIT(3)
0035 };
0036
0037 TGXYLayoutHints(Double_t x, Double_t y, Double_t w, Double_t h,
0038 UInt_t rubberFlag = kLRubberX | kLRubberY);
0039
0040 Double_t GetX() const { return fX; };
0041 Double_t GetY() const { return fY; };
0042 Double_t GetW() const { return fW; };
0043 Double_t GetH() const { return fH; };
0044 UInt_t GetFlag() const { return fFlag; };
0045
0046 void SetX(Double_t x) { fX = x; }
0047 void SetY(Double_t y) { fY = y; }
0048 void SetW(Double_t w) { fW = w; }
0049 void SetH(Double_t h) { fH = h; }
0050 void SetFlag(UInt_t flag) { fFlag = flag; }
0051
0052 void SavePrimitive(std::ostream &out, Option_t * = "") override;
0053
0054 ClassDefOverride(TGXYLayoutHints,0)
0055 };
0056
0057
0058 class TGXYLayout : public TGLayoutManager {
0059
0060 protected:
0061 TList *fList;
0062 TGCompositeFrame *fMain;
0063
0064 Bool_t fFirst;
0065 UInt_t fFirstWidth;
0066 UInt_t fFirstHeight;
0067
0068 Int_t fTWidth;
0069 Int_t fTHeight;
0070
0071 TGXYLayout(const TGXYLayout&);
0072 TGXYLayout& operator=(const TGXYLayout&);
0073
0074 public:
0075 TGXYLayout(TGCompositeFrame *main);
0076
0077 void Layout() override;
0078 TGDimension GetDefaultSize() const override;
0079 void SavePrimitive(std::ostream &out, Option_t * = "") override;
0080
0081 void NewSize() { fFirst = kTRUE; }
0082
0083 ClassDefOverride(TGXYLayout,0)
0084 };
0085
0086 #endif