library: libGui
#include "TGTripleSlider.h"

TGTripleHSlider


class description - source file - inheritance tree (.pdf)

class TGTripleHSlider : public TGDoubleHSlider

Inheritance Chart:
TObject
<-
TGObject
<-
TGWindow
TQObject
<-
TGFrame
TGWidget
<-
TGDoubleSlider
<-
TGDoubleHSlider
<-
TGTripleHSlider

    protected:
virtual void DoRedraw() virtual void SetPointerPos(Int_t z, Int_t opt = 0) public:
TGTripleHSlider(const TGWindow* p = 0, UInt_t w = 1, UInt_t type = 1, Int_t id = -1, UInt_t options = kHorizontalFrame, Pixel_t back = GetDefaultFrameBackground(), Bool_t reversed = kFALSE, Bool_t mark_ends = kFALSE, Bool_t constrained = kTRUE, Bool_t relative = kFALSE) TGTripleHSlider(const TGTripleHSlider&) virtual ~TGTripleHSlider() 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(ofstream& 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)

Data Members


    protected:
Int_t fCz horizontal 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 const TGPicture* fPointerPic picture to draw pointer

Class Description

                                                                      
 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                                                          
                                                                      


TGTripleHSlider(const TGWindow *p, UInt_t w, UInt_t type, Int_t id, UInt_t options, ULong_t back, Bool_t reversed, Bool_t mark_ends, Bool_t constrained, Bool_t relative) : TGDoubleHSlider(p, w, type, id, options, back, reversed, mark_ends)
 Create horizontal slider widget.

~TGTripleHSlider()
 Delete a horizontal slider widget.

void DoRedraw()
 Redraw horizontal slider widget.

void DrawPointer()
 Draw slider pointer

Bool_t HandleButton(Event_t *event)
 Handle mouse button event in horizontal slider widget.

Bool_t HandleMotion(Event_t *event)
 Handle mouse motion event in horizontal slide widget.

void SetConstrained(Bool_t on)
 Set pointer position constrained in the slider range.

void SetPointerPos(Int_t z, Int_t opt)
 Set slider pointer position in pixel value.

void SetPointerPosition(Float_t pos)
 Set pointer position in scaled (real) value

void SavePrimitive(ofstream &out, Option_t *option)
 Save an horizontal slider as a C++ statement(s) on output stream out.



Inline Functions


                   void PointerPositionChanged()
                Float_t GetPointerPosition() const
                   void SetRelative(Bool_t rel = kTRUE)
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
        TGTripleHSlider TGTripleHSlider(const TGTripleHSlider&)


Author: Bertrand Bellenot 20/01/06
Last update: root/gui:$Name: $:$Id: TGTripleSlider.cxx,v 1.2 2006/02/23 15:40:30 antcheva Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.