First big commit of the mchview program and its accompanying library,
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterInterfaceHelper.h
CommitLineData
0145e89a 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
19class TGWindow;
20class TGButton;
21class TGButtonGroup;
22class TString;
23
24class AliMUONPainterInterfaceHelper : public TObject
25{
26public:
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 static Int_t ButtonStartingId() { return 1; }
41
42 static void ClearButtons(TGButtonGroup& bg);
43
44 using TObject::Copy;
45
46 static void Copy(const TGButtonGroup& src, TGButtonGroup& dest);
47
48 using TObject::Dump;
49
50 static void Dump(const TGButtonGroup& bg);
51
52 static TGButton* FindButtonByName(const TGButtonGroup& bg, const TString& name);
53
54 static TGButton* FindButtonByUserData(const TGButtonGroup& bg, void* userData);
55
56 static TGButton* FindDownButton(const TGButtonGroup& bg);
57
58 static void SetBackgroundColor(const char* resourceBaseName, TGWindow& window);
59
60 static void SetState(TGButtonGroup& bg, Bool_t state);
61
62 static void Select(TGButtonGroup& bg, const TString& buttonName, Bool_t emit=kFALSE);
63
64 static void Unselect(TGButtonGroup& bg, const TString& buttonName, Bool_t emit=kFALSE);
65
66 ClassDef(AliMUONPainterInterfaceHelper,1) // Helper class for TGButtonGroup manipulation
67};
68
69#endif