ROOT logo
// @(#)root/gpad:$Id: TSlider.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   23/11/96

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TSlider
#define ROOT_TSlider


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TSlider                                                              //
//                                                                      //
//  A TSlider object is a specialized TPad including a TSliderBox object//
//  The TSliderBox can be moved in the pad.                             //
//  Slider drawing options include the possibility to change the slider //
//  starting and ending positions or only one of them.                  //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TPad
#include "TPad.h"
#endif

class TSlider : public TPad {

protected:
   Double_t      fMinimum;      //Slider minimum value in [0,1]
   Double_t      fMaximum;      //Slider maximum value in [0,1]
   TObject      *fObject;       //!Pointer to associated object
   TString       fMethod;       //command to be executed when slider is changed

private:
   TSlider(const TSlider &org);             // no copy, use TObject::Clone()
   TSlider &operator=(const TSlider &rhs);  // idem

public:
   TSlider();
   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);
   virtual ~TSlider();
   TObject      *GetObject()  const {return fObject;}
   Double_t      GetMinimum() const {return fMinimum;}
   Double_t      GetMaximum() const {return fMaximum;}
   virtual const char *GetMethod() const { return fMethod.Data(); }
   virtual void  Paint(Option_t *option="");
   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
   virtual void  SetMethod(const char *method) { fMethod=method; } // *MENU*
   void          SetObject(TObject *obj=0) {fObject=obj;}
   virtual void  SetMinimum(Double_t min=0) {fMinimum=min;}
   virtual void  SetMaximum(Double_t max=1) {fMaximum=max;}
   virtual void  SetRange(Double_t xmin=0, Double_t xmax=1);

   ClassDef(TSlider,1)  //A user interface slider.
};

#endif

 TSlider.h:1
 TSlider.h:2
 TSlider.h:3
 TSlider.h:4
 TSlider.h:5
 TSlider.h:6
 TSlider.h:7
 TSlider.h:8
 TSlider.h:9
 TSlider.h:10
 TSlider.h:11
 TSlider.h:12
 TSlider.h:13
 TSlider.h:14
 TSlider.h:15
 TSlider.h:16
 TSlider.h:17
 TSlider.h:18
 TSlider.h:19
 TSlider.h:20
 TSlider.h:21
 TSlider.h:22
 TSlider.h:23
 TSlider.h:24
 TSlider.h:25
 TSlider.h:26
 TSlider.h:27
 TSlider.h:28
 TSlider.h:29
 TSlider.h:30
 TSlider.h:31
 TSlider.h:32
 TSlider.h:33
 TSlider.h:34
 TSlider.h:35
 TSlider.h:36
 TSlider.h:37
 TSlider.h:38
 TSlider.h:39
 TSlider.h:40
 TSlider.h:41
 TSlider.h:42
 TSlider.h:43
 TSlider.h:44
 TSlider.h:45
 TSlider.h:46
 TSlider.h:47
 TSlider.h:48
 TSlider.h:49
 TSlider.h:50
 TSlider.h:51
 TSlider.h:52
 TSlider.h:53
 TSlider.h:54
 TSlider.h:55
 TSlider.h:56
 TSlider.h:57
 TSlider.h:58
 TSlider.h:59
 TSlider.h:60
 TSlider.h:61
 TSlider.h:62
 TSlider.h:63