Warning, file /include/root/TGTripleSlider.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_TGTripleSlider
0013 #define ROOT_TGTripleSlider
0014
0015
0016 #include "TGFrame.h"
0017 #include "TGWidget.h"
0018 #include "TGDoubleSlider.h"
0019
0020 class TGTripleVSlider : public TGDoubleVSlider {
0021
0022 protected:
0023 Int_t fCz;
0024 Double_t fSCz;
0025 Bool_t fConstrained;
0026 Bool_t fRelative;
0027 const TGPicture *fPointerPic;
0028
0029 void DoRedraw() override;
0030 virtual void SetPointerPos(Int_t z, Int_t opt = 0);
0031
0032 public:
0033 TGTripleVSlider(const TGWindow *p = nullptr, UInt_t h = 1, UInt_t type = 1, Int_t id = -1,
0034 UInt_t options = kVerticalFrame,
0035 Pixel_t back = GetDefaultFrameBackground(),
0036 Bool_t reversed = kFALSE,
0037 Bool_t mark_ends = kFALSE,
0038 Bool_t constrained = kTRUE,
0039 Bool_t relative = kFALSE);
0040
0041 ~TGTripleVSlider() override;
0042
0043 virtual void PointerPositionChanged() { Emit("PointerPositionChanged()"); }
0044 virtual void DrawPointer();
0045 virtual Float_t GetPointerPosition() const {
0046 return (Float_t) GetPointerPositionD();
0047 }
0048 virtual Long64_t GetPointerPositionL() const {
0049 return (Long64_t) GetPointerPositionD();
0050 }
0051 virtual Double_t GetPointerPositionD() const {
0052 if (fReversedScale) return fVmin + fVmax - fSCz;
0053 else return fSCz;
0054 }
0055 Bool_t HandleButton(Event_t *event) override;
0056 Bool_t HandleConfigureNotify(Event_t* event) override;
0057 Bool_t HandleMotion(Event_t *event) override;
0058 virtual void SetConstrained(Bool_t on = kTRUE);
0059 virtual void SetPointerPosition(Double_t pos);
0060 virtual void SetPointerPosition(Float_t pos) {
0061 SetPointerPosition((Double_t) pos);
0062 }
0063 virtual void SetPointerPosition(Long64_t pos) {
0064 SetPointerPosition((Double_t) pos);
0065 }
0066 virtual void SetRelative(Bool_t rel = kTRUE) { fRelative = rel; }
0067 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0068
0069 ClassDefOverride(TGTripleVSlider,0)
0070 };
0071
0072
0073 class TGTripleHSlider : public TGDoubleHSlider {
0074
0075 protected:
0076 Int_t fCz;
0077 Double_t fSCz;
0078 Bool_t fConstrained;
0079 Bool_t fRelative;
0080 const TGPicture *fPointerPic;
0081
0082 void DoRedraw() override;
0083 virtual void SetPointerPos(Int_t z, Int_t opt = 0);
0084
0085 public:
0086 TGTripleHSlider(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t type = 1, Int_t id = -1,
0087 UInt_t options = kHorizontalFrame,
0088 Pixel_t back = GetDefaultFrameBackground(),
0089 Bool_t reversed = kFALSE,
0090 Bool_t mark_ends = kFALSE,
0091 Bool_t constrained = kTRUE,
0092 Bool_t relative = kFALSE);
0093
0094 ~TGTripleHSlider() override;
0095
0096 virtual void PointerPositionChanged() { Emit("PointerPositionChanged()"); }
0097 virtual void DrawPointer();
0098 virtual Float_t GetPointerPosition() const {
0099 return (Float_t) GetPointerPositionD();
0100 }
0101 virtual Double_t GetPointerPositionD() const {
0102 if (fReversedScale) return fVmin + fVmax - fSCz;
0103 else return fSCz;
0104 }
0105 virtual Long64_t GetPointerPositionL() const {
0106 return (Long64_t) GetPointerPositionD();
0107 }
0108 Bool_t HandleButton(Event_t *event) override;
0109 Bool_t HandleConfigureNotify(Event_t* event) override;
0110 Bool_t HandleMotion(Event_t *event) override;
0111 virtual void SetConstrained(Bool_t on = kTRUE);
0112 virtual void SetPointerPosition(Double_t pos);
0113 virtual void SetPointerPosition(Float_t pos) {
0114 SetPointerPosition((Double_t) pos);
0115 }
0116 virtual void SetPointerPosition(Long64_t pos) {
0117 SetPointerPosition((Double_t) pos);
0118 }
0119 virtual void SetRelative(Bool_t rel = kTRUE) { fRelative = rel; }
0120 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0121
0122 ClassDefOverride(TGTripleHSlider,0)
0123 };
0124
0125 #endif