Logo ROOT  
Reference Guide
TSlider.h
Go to the documentation of this file.
1 // @(#)root/gpad:$Id$
2 // Author: Rene Brun 23/11/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TSlider
13 #define ROOT_TSlider
14 
15 
16 #include "TPad.h"
17 
18 class TSlider : public TPad {
19 
20 protected:
21  Double_t fMinimum; ///< Slider minimum value in [0,1]
22  Double_t fMaximum; ///< Slider maximum value in [0,1]
23  TObject *fObject; ///<!Pointer to associated object
24  TString fMethod; ///< command to be executed when slider is changed
25 
26 private:
27  TSlider(const TSlider &org); // no copy, use TObject::Clone()
28  TSlider &operator=(const TSlider &rhs); // idem
29 
30 public:
31  TSlider();
32  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);
33  virtual ~TSlider();
34  TObject *GetObject() const {return fObject;}
35  Double_t GetMinimum() const {return fMinimum;}
36  Double_t GetMaximum() const {return fMaximum;}
37  virtual const char *GetMethod() const { return fMethod.Data(); }
38  virtual void Paint(Option_t *option="");
39  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
40  virtual void SetMethod(const char *method) { fMethod=method; } // *MENU*
41  void SetObject(TObject *obj=0) {fObject=obj;}
42  virtual void SetMinimum(Double_t min=0) {fMinimum=min;}
43  virtual void SetMaximum(Double_t max=1) {fMaximum=max;}
44  virtual void SetRange(Double_t xmin=0, Double_t xmax=1);
45 
46  ClassDef(TSlider,1) //A user interface slider.
47 };
48 
49 #endif
50 
TSlider::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TSlider.cxx:169
TSlider::fMinimum
Double_t fMinimum
Slider minimum value in [0,1].
Definition: TSlider.h:27
TSlider::GetObject
TObject * GetObject() const
Definition: TSlider.h:40
TPad
Definition: TPad.h:26
TString::Data
const char * Data() const
Definition: TString.h:369
xmax
float xmax
Definition: THbookFile.cxx:95
TSlider::SetMethod
virtual void SetMethod(const char *method)
Definition: TSlider.h:46
TPad.h
TString
Definition: TString.h:136
TSlider::Paint
virtual void Paint(Option_t *option="")
Paint this slider with its current attributes.
Definition: TSlider.cxx:161
Color_t
short Color_t
Definition: RtypesCore.h:83
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
TSlider::fObject
TObject * fObject
!Pointer to associated object
Definition: TSlider.h:29
TSlider::GetMaximum
Double_t GetMaximum() const
Definition: TSlider.h:42
TSlider::TSlider
TSlider()
slider default constructor.
Definition: TSlider.cxx:107
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
xmin
float xmin
Definition: THbookFile.cxx:95
TSlider::~TSlider
virtual ~TSlider()
slider default destructor.
Definition: TSlider.cxx:154
org
#define org(otri, vertexptr)
Definition: triangle.c:1037
Short_t
short Short_t
Definition: RtypesCore.h:39
Double_t
double Double_t
Definition: RtypesCore.h:59
TSlider::SetObject
void SetObject(TObject *obj=0)
Definition: TSlider.h:47
TSlider::fMethod
TString fMethod
command to be executed when slider is changed
Definition: TSlider.h:30
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TSlider::fMaximum
Double_t fMaximum
Slider maximum value in [0,1].
Definition: TSlider.h:28
name
char name[80]
Definition: TGX11.cxx:110
TSlider::SetMaximum
virtual void SetMaximum(Double_t max=1)
Definition: TSlider.h:49
TSlider::SetMinimum
virtual void SetMinimum(Double_t min=0)
Definition: TSlider.h:48
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TSlider::SetRange
virtual void SetRange(Double_t xmin=0, Double_t xmax=1)
Set Slider range in [0,1].
Definition: TSlider.cxx:207
TSlider::operator=
TSlider & operator=(const TSlider &rhs)
TSlider::GetMinimum
Double_t GetMinimum() const
Definition: TSlider.h:41
TSlider
Definition: TSlider.h:18
TSlider::GetMethod
virtual const char * GetMethod() const
Definition: TSlider.h:43