source: tags/Mars-V0.10.3/mbase/MEnv.h

Last change on this file was 8071, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef MARS_MEnv
2#define MARS_MEnv
3
4#ifndef ROOT_TEnv
5#include <TEnv.h>
6#endif
7
8#ifndef ROOT_TOrdCollection
9#include <TOrdCollection.h>
10#endif
11
12class TAttLine;
13class TAttMarker;
14class TAttText;
15class TAttFill;
16class TPave;
17
18class MEnv : public TEnv
19{
20private:
21 TOrdCollection fChecked;
22
23 TString fName; // A workaround!
24
25 TString Compile(TString str, const char *post) const;
26
27public:
28 MEnv(const char *name="");
29
30 Bool_t IsValid() const { return !fName.IsNull(); }
31
32 TObject *Clone(const char *newname="") const;
33
34 Int_t GetValue(const char *name, Int_t dflt);
35 Double_t GetValue(const char *name, Double_t dflt);
36 const char *GetValue(const char *name, const char *dflt);
37
38 const char *GetName() const { return fName; }
39
40 Int_t GetColor(const char *name, Int_t dftl);
41 Int_t GetAlign(const char *name, Int_t dftl);
42 Int_t GetFillStyle(const char *name, Int_t dftl);
43 Int_t GetLineStyle(const char *name, Int_t dftl);
44
45 void GetAttributes(const char *name, TObject *obj, TObject *dftl=0);
46 void GetAttLine(const char *name, TAttLine &line, TAttLine *dftl=0);
47 void GetAttText(const char *name, TAttText &text, TAttText *dftl=0);
48 void GetAttFill(const char *name, TAttFill &fill, TAttFill *dftl=0);
49 void GetAttMarker(const char *name, TAttMarker &marker, TAttMarker *dftl=0);
50 void GetAttPave(const char *name, TPave &pave, TPave *dftl=0);
51
52 void SetColor(const char *name, Int_t col);
53 void SetAlign(const char *name, Int_t align);
54 void SetFillStyle(const char *name, Int_t style);
55 void SetLineStyle(const char *name, Int_t style);
56 void SetMarkerStyle(const char *name, Int_t style);
57
58 void SetAttributes(const char *name, const TObject *obj);
59 void SetAttLine(const char *name, const TAttLine &line);
60 void SetAttText(const char *name, const TAttText &text);
61 void SetAttFill(const char *name, const TAttFill &fill);
62 void SetAttMarker(const char *name, const TAttMarker &marker);
63 void SetAttPave(const char *name, const TPave &pave);
64
65 void AddEnv(const TEnv &env, Bool_t overwrite=kTRUE);
66
67 void PrintUntouched() const;
68
69 ClassDef(MEnv, 0) // A slightly more advanced version of TEnv
70};
71
72#endif
73
Note: See TracBrowser for help on using the repository browser.