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

Last change on this file was 7450, checked in by tbretz, 19 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="") : TEnv(name), fName(name) { fChecked.SetOwner(); }
29
30 TObject *Clone(const char *newname="") const;
31
32 Int_t GetValue(const char *name, Int_t dflt);
33 Double_t GetValue(const char *name, Double_t dflt);
34 const char *GetValue(const char *name, const char *dflt);
35
36 const char *GetName() const { return fName; }
37
38 Int_t GetColor(const char *name, Int_t dftl);
39 Int_t GetAlign(const char *name, Int_t dftl);
40 Int_t GetFillStyle(const char *name, Int_t dftl);
41 Int_t GetLineStyle(const char *name, Int_t dftl);
42
43 void GetAttributes(const char *name, TObject *obj, TObject *dftl=0);
44 void GetAttLine(const char *name, TAttLine &line, TAttLine *dftl=0);
45 void GetAttText(const char *name, TAttText &text, TAttText *dftl=0);
46 void GetAttFill(const char *name, TAttFill &fill, TAttFill *dftl=0);
47 void GetAttMarker(const char *name, TAttMarker &marker, TAttMarker *dftl=0);
48 void GetAttPave(const char *name, TPave &pave, TPave *dftl=0);
49
50 void SetColor(const char *name, Int_t col);
51 void SetAlign(const char *name, Int_t align);
52 void SetFillStyle(const char *name, Int_t style);
53 void SetLineStyle(const char *name, Int_t style);
54 void SetMarkerStyle(const char *name, Int_t style);
55
56 void SetAttributes(const char *name, const TObject *obj);
57 void SetAttLine(const char *name, const TAttLine &line);
58 void SetAttText(const char *name, const TAttText &text);
59 void SetAttFill(const char *name, const TAttFill &fill);
60 void SetAttMarker(const char *name, const TAttMarker &marker);
61 void SetAttPave(const char *name, const TPave &pave);
62
63 void AddEnv(const TEnv &env, Bool_t overwrite=kTRUE);
64
65 void PrintUntouched() const;
66
67 ClassDef(MEnv, 0) // A slightly more advanced version of TEnv
68};
69
70#endif
71
Note: See TracBrowser for help on using the repository browser.