00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGTripleSlider
00013 #define ROOT_TGTripleSlider
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 #ifndef ROOT_TGFrame
00057 #include "TGFrame.h"
00058 #endif
00059 #ifndef ROOT_TGWidget
00060 #include "TGWidget.h"
00061 #endif
00062 #ifndef ROOT_TGDoubleSlider
00063 #include "TGDoubleSlider.h"
00064 #endif
00065
00066 class TGTripleVSlider : public TGDoubleVSlider {
00067
00068 protected:
00069 Int_t fCz;
00070 Float_t fSCz;
00071 Bool_t fConstrained;
00072 Bool_t fRelative;
00073 const TGPicture *fPointerPic;
00074
00075 virtual void DoRedraw();
00076 virtual void SetPointerPos(Int_t z, Int_t opt = 0);
00077
00078 public:
00079 TGTripleVSlider(const TGWindow *p = 0, UInt_t h = 1, UInt_t type = 1, Int_t id = -1,
00080 UInt_t options = kVerticalFrame,
00081 Pixel_t back = GetDefaultFrameBackground(),
00082 Bool_t reversed = kFALSE,
00083 Bool_t mark_ends = kFALSE,
00084 Bool_t constrained = kTRUE,
00085 Bool_t relative = kFALSE);
00086
00087 virtual ~TGTripleVSlider();
00088
00089 virtual void PointerPositionChanged() { Emit("PointerPositionChanged()"); }
00090 virtual void DrawPointer();
00091 virtual Float_t GetPointerPosition() const {
00092 if (fReversedScale) return fVmin + fVmax - fSCz;
00093 else return fSCz;
00094 }
00095 virtual Bool_t HandleButton(Event_t *event);
00096 virtual Bool_t HandleConfigureNotify(Event_t* event);
00097 virtual Bool_t HandleMotion(Event_t *event);
00098 virtual void SetConstrained(Bool_t on = kTRUE);
00099 virtual void SetPointerPosition(Float_t pos);
00100 virtual void SetRelative(Bool_t rel = kTRUE) { fRelative = rel; }
00101 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00102
00103 ClassDef(TGTripleVSlider,0)
00104 };
00105
00106
00107 class TGTripleHSlider : public TGDoubleHSlider {
00108
00109 protected:
00110 Int_t fCz;
00111 Float_t fSCz;
00112 Bool_t fConstrained;
00113 Bool_t fRelative;
00114 const TGPicture *fPointerPic;
00115
00116 virtual void DoRedraw();
00117 virtual void SetPointerPos(Int_t z, Int_t opt = 0);
00118
00119 public:
00120 TGTripleHSlider(const TGWindow *p = 0, UInt_t w = 1, UInt_t type = 1, Int_t id = -1,
00121 UInt_t options = kHorizontalFrame,
00122 Pixel_t back = GetDefaultFrameBackground(),
00123 Bool_t reversed = kFALSE,
00124 Bool_t mark_ends = kFALSE,
00125 Bool_t constrained = kTRUE,
00126 Bool_t relative = kFALSE);
00127
00128 virtual ~TGTripleHSlider();
00129
00130 virtual void PointerPositionChanged() { Emit("PointerPositionChanged()"); }
00131 virtual void DrawPointer();
00132 virtual Float_t GetPointerPosition() const {
00133 if (fReversedScale) return fVmin + fVmax - fSCz;
00134 else return fSCz;
00135 }
00136 virtual Bool_t HandleButton(Event_t *event);
00137 virtual Bool_t HandleConfigureNotify(Event_t* event);
00138 virtual Bool_t HandleMotion(Event_t *event);
00139 virtual void SetConstrained(Bool_t on = kTRUE);
00140 virtual void SetPointerPosition(Float_t pos);
00141 virtual void SetRelative(Bool_t rel = kTRUE) { fRelative = rel; }
00142 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00143
00144 ClassDef(TGTripleHSlider,0)
00145 };
00146
00147 #endif