Line data Source code
1 : #ifndef ALIMUONPAINTERINTERFACEHELPER_H
2 : #define ALIMUONPAINTERINTERFACEHELPER_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 AliMUONPainterInterfaceHelper
11 : /// \brief Helper class to ease building a GUI with button groups...
12 : ///
13 : // Author Laurent Aphecetche, Subatech
14 :
15 : #ifndef ROOT_TObject
16 : # include "TObject.h"
17 : #endif
18 :
19 : class TGWindow;
20 : class TGButton;
21 : class TGButtonGroup;
22 : class TString;
23 :
24 0 : class AliMUONPainterInterfaceHelper : public TObject
25 : {
26 : public:
27 : AliMUONPainterInterfaceHelper();
28 : virtual ~AliMUONPainterInterfaceHelper();
29 :
30 : static void AddRadioButton(TGButtonGroup& bg,
31 : const TString& name,
32 : void* userData=0x0,
33 : Bool_t select=kFALSE);
34 :
35 : static void AddCheckButton(TGButtonGroup& bg,
36 : const TString& name,
37 : void* userData=0x0,
38 : Bool_t select=kFALSE);
39 :
40 : /// Id of first button in a group
41 0 : static Int_t ButtonStartingId() { return 1; }
42 :
43 : static void ClearButtons(TGButtonGroup& bg);
44 :
45 : using TObject::Copy;
46 :
47 : static void Copy(const TGButtonGroup& src, TGButtonGroup& dest);
48 :
49 : using TObject::Dump;
50 :
51 : static void Dump(const TGButtonGroup& bg);
52 :
53 : static TGButton* FindButtonByName(const TGButtonGroup& bg, const TString& name);
54 :
55 : static TGButton* FindButtonByUserData(const TGButtonGroup& bg, const void* userData);
56 :
57 : static TGButton* FindDownButton(const TGButtonGroup& bg);
58 :
59 : static void SetBackgroundColor(const char* resourceBaseName, TGWindow& window);
60 :
61 : static void SetState(TGButtonGroup& bg, Bool_t state);
62 :
63 : static void Select(TGButtonGroup& bg, const TString& buttonName, Bool_t emit=kFALSE);
64 :
65 : static void Unselect(TGButtonGroup& bg, const TString& buttonName, Bool_t emit=kFALSE);
66 :
67 : static void RemoveButton(TGButtonGroup& bg, const TGButton* button);
68 :
69 12 : ClassDef(AliMUONPainterInterfaceHelper,1) // Helper class for TGButtonGroup manipulation
70 : };
71 :
72 : #endif
|