Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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-2021, 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#include "TPad.h"
16
17class TSlider : public TPad {
18
19protected:
20 Double_t fMinimum{0}; ///< Slider minimum value in [0,1]
21 Double_t fMaximum{1}; ///< Slider maximum value in [0,1]
22 TObject *fObject{nullptr}; ///<!Pointer to associated object
23 TString fMethod; ///< command to be executed when slider is changed
24
25private:
26 TSlider(const TSlider &) = delete;
27 TSlider &operator=(const TSlider &) = delete;
28
29public:
30 TSlider();
31 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);
32 virtual ~TSlider();
33 TObject *GetObject() const { return fObject; }
34 Double_t GetMinimum() const { return fMinimum; }
35 Double_t GetMaximum() const { return fMaximum; }
36 virtual const char *GetMethod() const { return fMethod.Data(); }
37 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
38 virtual void SetMethod(const char *method) { fMethod = method; } // *MENU*
39 void SetObject(TObject *obj = nullptr) { fObject = obj; }
40 virtual void SetMinimum(Double_t min = 0) { fMinimum = min; }
41 virtual void SetMaximum(Double_t max = 1) { fMaximum = max; }
42 virtual void SetRange(Double_t xmin = 0, Double_t xmax = 1);
43
44 ClassDefOverride(TSlider,1) //A user interface slider.
45};
46
47#endif
48
short Color_t
Definition RtypesCore.h:92
short Short_t
Definition RtypesCore.h:39
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
char name[80]
Definition TGX11.cxx:110
float xmin
float xmax
Mother of all ROOT objects.
Definition TObject.h:41
The most important graphics class in the ROOT system.
Definition TPad.h:28
A specialized TPad including a TSliderBox object.
Definition TSlider.h:17
Double_t GetMaximum() const
Definition TSlider.h:35
TSlider()
slider default constructor.
Definition TSlider.cxx:107
TObject * fObject
!Pointer to associated object
Definition TSlider.h:22
virtual const char * GetMethod() const
Definition TSlider.h:36
virtual void SetMethod(const char *method)
Definition TSlider.h:38
virtual void SetMaximum(Double_t max=1)
Definition TSlider.h:41
TObject * GetObject() const
Definition TSlider.h:33
Double_t fMaximum
Slider maximum value in [0,1].
Definition TSlider.h:21
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Definition TSlider.cxx:153
virtual void SetMinimum(Double_t min=0)
Definition TSlider.h:40
TSlider & operator=(const TSlider &)=delete
TSlider(const TSlider &)=delete
void SetObject(TObject *obj=nullptr)
Definition TSlider.h:39
Double_t GetMinimum() const
Definition TSlider.h:34
virtual ~TSlider()
slider default destructor.
Definition TSlider.cxx:146
virtual void SetRange(Double_t xmin=0, Double_t xmax=1)
Set Slider range in [0,1].
Definition TSlider.cxx:183
Double_t fMinimum
Slider minimum value in [0,1].
Definition TSlider.h:20
TString fMethod
command to be executed when slider is changed
Definition TSlider.h:23
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380