Warning, file /include/root/TGSplitter.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGSplitter
0013 #define ROOT_TGSplitter
0014
0015
0016 #include "TGFrame.h"
0017
0018
0019 class TGSplitter : public TGFrame {
0020
0021 protected:
0022 Cursor_t fSplitCursor;
0023 Bool_t fDragging;
0024 Bool_t fExternalHandler;
0025 const TGPicture *fSplitterPic;
0026
0027 private:
0028 TGSplitter(const TGSplitter&) = delete;
0029 TGSplitter& operator=(const TGSplitter&) = delete;
0030
0031 public:
0032 TGSplitter(const TGWindow *p = nullptr, UInt_t w = 2, UInt_t h = 4,
0033 UInt_t options = kChildFrame,
0034 Pixel_t back = GetDefaultFrameBackground());
0035 ~TGSplitter() override { }
0036
0037 virtual void SetFrame(TGFrame *frame, Bool_t prev) = 0;
0038
0039 Bool_t HandleButton(Event_t *event) override = 0;
0040 Bool_t HandleMotion(Event_t *event) override = 0;
0041 Bool_t HandleCrossing(Event_t *event) override = 0;
0042
0043 void DragStarted();
0044 void Moved(Int_t delta);
0045
0046 Bool_t GetExternalHandler() const { return fExternalHandler; }
0047 void SetExternalHandler(Bool_t x) { fExternalHandler = x; }
0048
0049 ClassDefOverride(TGSplitter,0)
0050 };
0051
0052
0053 class TGVSplitter : public TGSplitter {
0054
0055 private:
0056 TGVSplitter(const TGVSplitter&) = delete;
0057 TGVSplitter& operator=(const TGVSplitter&) = delete;
0058
0059 protected:
0060 Int_t fStartX;
0061 UInt_t fFrameWidth;
0062 UInt_t fFrameHeight;
0063 Int_t fMin;
0064 Int_t fMax;
0065 TGFrame *fFrame;
0066 Bool_t fLeft;
0067
0068 public:
0069 TGVSplitter(const TGWindow *p = nullptr, UInt_t w = 4, UInt_t h = 4,
0070 UInt_t options = kChildFrame,
0071 Pixel_t back = GetDefaultFrameBackground());
0072 TGVSplitter(const TGWindow *p, UInt_t w, UInt_t h, Bool_t external);
0073 ~TGVSplitter() override;
0074
0075 void DrawBorder() override;
0076 void SetFrame(TGFrame *frame, Bool_t left) override;
0077 const TGFrame *GetFrame() const { return fFrame; }
0078 Bool_t GetLeft() const { return fLeft; }
0079 Bool_t IsLeft() const { return fLeft; }
0080 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0081
0082 Bool_t HandleButton(Event_t *event) override;
0083 Bool_t HandleMotion(Event_t *event) override;
0084 Bool_t HandleCrossing(Event_t *event) override;
0085
0086 ClassDefOverride(TGVSplitter,0)
0087 };
0088
0089
0090 class TGHSplitter : public TGSplitter {
0091
0092 private:
0093 TGHSplitter(const TGHSplitter&) = delete;
0094 TGHSplitter& operator=(const TGHSplitter&) = delete;
0095
0096 protected:
0097 Int_t fStartY;
0098 UInt_t fFrameWidth;
0099 UInt_t fFrameHeight;
0100 Int_t fMin;
0101 Int_t fMax;
0102 TGFrame *fFrame;
0103 Bool_t fAbove;
0104
0105 public:
0106 TGHSplitter(const TGWindow *p = nullptr, UInt_t w = 4, UInt_t h = 4,
0107 UInt_t options = kChildFrame,
0108 Pixel_t back = GetDefaultFrameBackground());
0109 TGHSplitter(const TGWindow *p, UInt_t w, UInt_t h, Bool_t external);
0110 ~TGHSplitter() override;
0111
0112 void DrawBorder() override;
0113 void SetFrame(TGFrame *frame, Bool_t above) override;
0114 const TGFrame *GetFrame() const { return fFrame; }
0115 Bool_t GetAbove() const { return fAbove; }
0116 Bool_t IsAbove() const { return fAbove; }
0117 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0118
0119 Bool_t HandleButton(Event_t *event) override;
0120 Bool_t HandleMotion(Event_t *event) override;
0121 Bool_t HandleCrossing(Event_t *event) override;
0122
0123 ClassDefOverride(TGHSplitter,0)
0124 };
0125
0126 class TGVFileSplitter : public TGVSplitter {
0127
0128 private:
0129 TGVFileSplitter(const TGVFileSplitter&) = delete;
0130 TGVFileSplitter& operator=(const TGVFileSplitter&) = delete;
0131
0132 public:
0133 TGVFileSplitter(const TGWindow *p = nullptr, UInt_t w = 4, UInt_t h = 4,
0134 UInt_t options = kChildFrame,
0135 Pixel_t back = GetDefaultFrameBackground());
0136 ~TGVFileSplitter() override;
0137
0138 Bool_t HandleDoubleClick(Event_t *) override;
0139 Bool_t HandleButton(Event_t *event) override;
0140 Bool_t HandleMotion(Event_t *event) override;
0141 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0142
0143 void LayoutHeader(TGFrame *f);
0144 void LayoutListView();
0145 void ButtonPressed();
0146 void ButtonReleased();
0147 void DoubleClicked(TGVFileSplitter* frame);
0148
0149 ClassDefOverride(TGVFileSplitter,0)
0150 };
0151
0152
0153 #endif