Line data Source code
1 : #ifndef ALIMUONPAINTERCOLORSLIDER_H
2 : #define ALIMUONPAINTERCOLORSLIDER_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : // $Id$
8 :
9 : /// \ingroup graphics
10 : /// \class AliMUONPainterColorSlider
11 : /// \brief A vertical color palette
12 : ///
13 : // Author Laurent Aphecetche, Subatech
14 :
15 : #ifndef ROOT_TGFrame
16 : # include "TGFrame.h"
17 : #endif
18 :
19 : class TGNumberEntry;
20 : class TGTextButton;
21 :
22 : class AliMUONPainterColorSlider : public TGCompositeFrame
23 : {
24 : public:
25 : AliMUONPainterColorSlider(const TGWindow* p, UInt_t w, UInt_t h);
26 : virtual ~AliMUONPainterColorSlider();
27 :
28 : void DefaultButtonWasClicked(); // *SIGNAL*
29 :
30 : void SetDefaultButtonWasClicked(Double_t* range); // *SIGNAL*
31 :
32 : void DataRangeAutoRequested(); // *SIGNAL*
33 :
34 : void DataRangeWasChanged(Double_t* range); // *SIGNAL*
35 :
36 : void LockButtonWasClicked();
37 :
38 : void SetRange(Double_t min, Double_t max, Bool_t emit=kTRUE);
39 :
40 : Bool_t IsLocked() const;
41 :
42 : private:
43 : /// Not implemented
44 : AliMUONPainterColorSlider(const AliMUONPainterColorSlider& rhs);
45 : /// Not implemented
46 : AliMUONPainterColorSlider& operator=(const AliMUONPainterColorSlider& rhs);
47 :
48 : void LockDefaultButtons();
49 : void UnlockDefaultButtons();
50 :
51 : private:
52 : TGNumberEntry* fEntryMin; ///< textbox for min value to be represented
53 : TGNumberEntry* fEntryMax; ///< textbox for max value to be represented
54 : Double_t fMin; ///< min value to be represented
55 : Double_t fMax; ///< max value to be represented
56 : TGTextButton* fAutoButton; ///< to toggle data range computation
57 : TGTextButton* fLockButton; ///< to toggle locking of range
58 : TGTextButton* fDefaultButton; ///< to get back to default range (if defined)
59 : TGTextButton* fSetDefaultButton; ///< to set the default for the current source
60 :
61 12 : ClassDef(AliMUONPainterColorSlider,3) // A painter color palette
62 : };
63 :
64 : #endif
|