library: libGui #include "TGTripleSlider.h" |
Inheritance Chart: | |||||||||||||||||||||||||||||||||
|
protected:
virtual void DoRedraw() virtual void SetPointerPos(Int_t z, Int_t opt = 0) public:
TGTripleVSlider(const TGWindow* p = 0, UInt_t h = 1, UInt_t type = 1, Int_t id = -1, UInt_t options = kVerticalFrame, Pixel_t back = GetDefaultFrameBackground(), Bool_t reversed = kFALSE, Bool_t mark_ends = kFALSE, Bool_t constrained = kTRUE, Bool_t relative = kFALSE) TGTripleVSlider(const TGTripleVSlider&) virtual ~TGTripleVSlider() static TClass* Class() virtual void DrawPointer() virtual Float_t GetPointerPosition() const virtual Bool_t HandleButton(Event_t* event) virtual Bool_t HandleMotion(Event_t* event) virtual TClass* IsA() const virtual void PointerPositionChanged() virtual void SavePrimitive(ostream& out, Option_t* option = "") virtual void SetConstrained(Bool_t on = kTRUE) virtual void SetPointerPosition(Float_t pos) virtual void SetRelative(Bool_t rel = kTRUE) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)
protected:
Int_t fCz vertical pointer position in pixel coordinates Float_t fSCz vertical pointer position Bool_t fConstrained kTRUE if pointer is constrained to slider edges Bool_t fRelative kTRUE if pointer position is relative to slider const TGPicture* fPointerPic picture to draw pointer
TGTripleVSlider and TGTripleHSlider TripleSlider inherit from DoubleSlider widgets and allow easy selection of a min, max and pointer value out of a range. The pointer position can be constrained to edges of slider and / or can be relative to the slider position. To change the min value press the mouse near to the left / bottom edge of the slider. To change the max value press the mouse near to the right / top edge of the slider. To change both values simultaneously press the mouse near to the center of the slider. To change pointer value press the mouse on the pointer and drag it to the desired position Dragging the slider will generate the event: kC_VSLIDER, kSL_POS, slider id, 0 (for vertical slider) kC_HSLIDER, kSL_POS, slider id, 0 (for horizontal slider) Pressing the mouse will generate the event: kC_VSLIDER, kSL_PRESS, slider id, 0 (for vertical slider) kC_HSLIDER, kSL_PRESS, slider id, 0 (for horizontal slider) Releasing the mouse will generate the event: kC_VSLIDER, kSL_RELEASE, slider id, 0 (for vertical slider) kC_HSLIDER, kSL_RELEASE, slider id, 0 (for horizontal slider) Moving the pointer will generate the event: kC_VSLIDER, kSL_POINTER, slider id, 0 (for vertical slider) kC_HSLIDER, kSL_POINTER, slider id, 0 (for horizontal slider) Use the functions GetMinPosition(), GetMaxPosition() and GetPosition() to retrieve the position of the slider. Use the function GetPointerPosition() to retrieve the position of the pointer
Create a vertical slider widget.
Save an horizontal slider as a C++ statement(s) on output stream out.