ROOT  6.06/09
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 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TSlider //
19 // //
20 // A TSlider object is a specialized TPad including a TSliderBox object//
21 // The TSliderBox can be moved in the pad. //
22 // Slider drawing options include the possibility to change the slider //
23 // starting and ending positions or only one of them. //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26 
27 #ifndef ROOT_TPad
28 #include "TPad.h"
29 #endif
30 
31 class TSlider : public TPad {
32 
33 protected:
34  Double_t fMinimum; //Slider minimum value in [0,1]
35  Double_t fMaximum; //Slider maximum value in [0,1]
36  TObject *fObject; //!Pointer to associated object
37  TString fMethod; //command to be executed when slider is changed
38 
39 private:
40  TSlider(const TSlider &org); // no copy, use TObject::Clone()
41  TSlider &operator=(const TSlider &rhs); // idem
42 
43 public:
44  TSlider();
45  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);
46  virtual ~TSlider();
47  TObject *GetObject() const {return fObject;}
48  Double_t GetMinimum() const {return fMinimum;}
49  Double_t GetMaximum() const {return fMaximum;}
50  virtual const char *GetMethod() const { return fMethod.Data(); }
51  virtual void Paint(Option_t *option="");
52  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
53  virtual void SetMethod(const char *method) { fMethod=method; } // *MENU*
54  void SetObject(TObject *obj=0) {fObject=obj;}
55  virtual void SetMinimum(Double_t min=0) {fMinimum=min;}
56  virtual void SetMaximum(Double_t max=1) {fMaximum=max;}
57  virtual void SetRange(Double_t xmin=0, Double_t xmax=1);
58 
59  ClassDef(TSlider,1) //A user interface slider.
60 };
61 
62 #endif
63 
virtual void Paint(Option_t *option="")
Paint this slider with its current attributes.
Definition: TSlider.cxx:158
float xmin
Definition: THbookFile.cxx:93
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
Definition: vector.h:433
virtual const char * GetMethod() const
Definition: TSlider.h:50
TString fMethod
Pointer to associated object.
Definition: TSlider.h:37
ClassDef(TAttBBox2D, 0)
const char Option_t
Definition: RtypesCore.h:62
Double_t fMaximum
Definition: TSlider.h:35
virtual void SetMaximum(Double_t max=1)
Definition: TSlider.h:56
virtual void SetRange(Double_t xmin=0, Double_t xmax=1)
Set Slider range in [0,1].
Definition: TSlider.cxx:204
Basic string class.
Definition: TString.h:137
TSlider & operator=(const TSlider &rhs)
TObject * GetObject() const
Definition: TSlider.h:47
A specialized TPad including a TSliderBox object.
Definition: TSlider.h:31
const char * Data() const
Definition: TString.h:349
static const double x2[5]
Double_t fMinimum
Definition: TSlider.h:34
virtual ~TSlider()
slider default destructor.
Definition: TSlider.cxx:151
void SetObject(TObject *obj=0)
Definition: TSlider.h:54
char * out
Definition: TBase64.cxx:29
short Color_t
Definition: RtypesCore.h:79
virtual void SetMethod(const char *method)
Definition: TSlider.h:53
The most important graphics class in the ROOT system.
Definition: TPad.h:46
short Short_t
Definition: RtypesCore.h:35
float xmax
Definition: THbookFile.cxx:93
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TSlider.cxx:166
static const double x1[5]
TObject * fObject
Definition: TSlider.h:36
virtual void SetMinimum(Double_t min=0)
Definition: TSlider.h:55
double Double_t
Definition: RtypesCore.h:55
Double_t GetMinimum() const
Definition: TSlider.h:48
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Definition: vector.h:440
#define name(a, b)
Definition: linkTestLib0.cpp:5
#define org(otri, vertexptr)
Definition: triangle.c:1037
Mother of all ROOT objects.
Definition: TObject.h:58
TObject * obj
Double_t GetMaximum() const
Definition: TSlider.h:49