TSlider.h

Go to the documentation of this file.
00001 // @(#)root/gpad:$Id: TSlider.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Rene Brun   23/11/96
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TSlider
00013 #define ROOT_TSlider
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TSlider                                                              //
00019 //                                                                      //
00020 //  A TSlider object is a specialized TPad including a TSliderBox object//
00021 //  The TSliderBox can be moved in the pad.                             //
00022 //  Slider drawing options include the possibility to change the slider //
00023 //  starting and ending positions or only one of them.                  //
00024 //                                                                      //
00025 //////////////////////////////////////////////////////////////////////////
00026 
00027 #ifndef ROOT_TPad
00028 #include "TPad.h"
00029 #endif
00030 
00031 class TSlider : public TPad {
00032 
00033 protected:
00034    Double_t      fMinimum;      //Slider minimum value in [0,1]
00035    Double_t      fMaximum;      //Slider maximum value in [0,1]
00036    TObject      *fObject;       //!Pointer to associated object
00037    TString       fMethod;       //command to be executed when slider is changed
00038 
00039 private:
00040    TSlider(const TSlider &org);             // no copy, use TObject::Clone()
00041    TSlider &operator=(const TSlider &rhs);  // idem
00042 
00043 public:
00044    TSlider();
00045    TSlider(const char *name, const char *title, Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, Color_t color=16, Short_t bordersize=2, Short_t bordermode =-1);
00046    virtual ~TSlider();
00047    TObject      *GetObject()  const {return fObject;}
00048    Double_t      GetMinimum() const {return fMinimum;}
00049    Double_t      GetMaximum() const {return fMaximum;}
00050    virtual const char *GetMethod() const { return fMethod.Data(); }
00051    virtual void  Paint(Option_t *option="");
00052    virtual void  SavePrimitive(ostream &out, Option_t *option = "");
00053    virtual void  SetMethod(const char *method) { fMethod=method; } // *MENU*
00054    void          SetObject(TObject *obj=0) {fObject=obj;}
00055    virtual void  SetMinimum(Double_t min=0) {fMinimum=min;}
00056    virtual void  SetMaximum(Double_t max=1) {fMaximum=max;}
00057    virtual void  SetRange(Double_t xmin=0, Double_t xmax=1);
00058 
00059    ClassDef(TSlider,1)  //A user interface slider.
00060 };
00061 
00062 #endif
00063 

Generated on Tue Jul 5 14:13:57 2011 for ROOT_528-00b_version by  doxygen 1.5.1