]>
Commit | Line | Data |
---|---|---|
7bb7ac14 | 1 | #ifndef ALISLIDERFRAME_H |
2 | #define ALISLIDERFRAME_H | |
3 | /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ///////////////////////////////////////////////////////////////////////// | |
7 | // ALICE SLIDER FRAME CLASS // | |
8 | // Author: Mayeul ROUSSELET // | |
9 | // e-mail: Mayeul.Rousselet@cern.ch // | |
10 | // Last update:26/08/2003 // | |
11 | ///////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | #include <Rtypes.h> | |
14 | #include <RQ_OBJECT.h> | |
15 | #include <TGDoubleSlider.h> | |
16 | ||
17 | class TGCompositeFrame; | |
18 | class TGLayoutHints; | |
19 | class TGLabel; | |
20 | class TGNumberEntry; | |
21 | ||
22 | class AliSliderFrame{ | |
23 | //This class implements the cuts manager | |
24 | ||
25 | public: | |
26 | ||
27 | AliSliderFrame(const TGWindow *p, UInt_t w, UInt_t h); | |
28 | virtual ~AliSliderFrame(); | |
29 | ||
30 | //Setters | |
31 | void SetMomentumRange(Float_t min, Float_t max){fMomentumSlider->SetRange(min,max);}; | |
32 | void SetRapidityRange(Float_t min, Float_t max){fRapiditySlider->SetRange(min,max);}; | |
33 | ||
34 | Float_t GetMomentumMax() const {return fMomentumSlider->GetMaxPosition();}; | |
35 | Float_t GetMomentumMin() const {return fMomentumSlider->GetMinPosition();}; | |
36 | Float_t GetRapidityMax() const {return fRapiditySlider->GetMaxPosition();}; | |
37 | Float_t GetRapidityMin() const {return fRapiditySlider->GetMinPosition();}; | |
38 | TGCompositeFrame* GetSliderFrame() const {return fMainFrame;}; | |
39 | ||
40 | //Slots | |
41 | void CloseWindow(); | |
42 | void DoSlider(Int_t pos=0); | |
43 | void DoField(Long_t pos=0); | |
44 | void DoReleased(Int_t pos=0) const; | |
45 | void DoPositionChanged(Int_t pos=0) const; | |
46 | ||
47 | //I/O | |
48 | void SaveToRC() const; | |
49 | void LoadFromRC(); | |
50 | ||
51 | private: | |
52 | ||
53 | TGCompositeFrame *fMainFrame; // Main frame | |
54 | TGCompositeFrame *fMomentumFrame; // Momentum frame | |
55 | TGCompositeFrame *fRapidityFrame; // Rapidity frame | |
56 | TGLayoutHints *fLayout;//Layout of the frame | |
57 | TGLayoutHints *fMomentumLayout; // Layout of momentum frame | |
58 | TGLayoutHints *fRapidityLayout; // Layout of rapidity frame | |
59 | TGDoubleHSlider *fMomentumSlider; // Momentum slider | |
60 | TGDoubleHSlider *fRapiditySlider; // Rapidity slider | |
61 | TGLabel *fMomentumLabel; // Momentum label | |
62 | TGLabel *fRapidityLabel; // Rapidity label | |
63 | TGNumberEntry *fMomentumMaxValue;// Max. value of momentum | |
64 | TGNumberEntry *fMomentumMinValue;// Min. value of momentum | |
65 | TGNumberEntry *fRapidityMaxValue;// Max. value of rapidity | |
66 | TGNumberEntry *fRapidityMinValue;// Min. value of rapidity | |
67 | ||
68 | RQ_OBJECT("AliSliderFrame") | |
69 | ||
70 | ClassDef(AliSliderFrame,0); | |
71 | }; | |
72 | ||
73 | #endif |