Changeset 7893 for trunk/MagicSoft/Mars/mtools/MCalendar.h
- Timestamp:
- 08/19/06 22:42:34 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtools/MCalendar.h
r7451 r7893 14 14 #include <Gtypes.h> 15 15 #endif 16 17 /* 18 #include <TAttLine.h> 19 #include <TAttFill.h> 20 #include <TAttText.h> 21 */ 16 22 17 23 class TEnv; … … 26 32 class MTime; 27 33 28 class MCalendar : public TObject 34 class MCalendar : public TObject//, public TAttLine, public TAttText, public TAttFill 29 35 { 30 36 private: 37 /* 38 enum { 39 kMoonPhase, 40 kMoonPeriod, 41 kMagicPeriod 42 };*/ 43 44 /* 45 Int_t fAlign; 46 Bool_t fActive; 47 Bool_t fUpdate; 48 Int_t fDay; 49 */ 31 50 MEnv *fEnv; 32 51 MEnv *fEnvHolidays; 33 52 34 53 Bool_t fOrientation; 54 Bool_t fRotation; 35 55 36 56 Int_t fYear; … … 78 98 // Paint text 79 99 void PaintLatex(TAttText &att, Int_t align, Double_t x[2], Double_t y[2], Double_t ratio[2], /*Double_t height,*/ TString str); 100 void PaintClock(Double_t x[2], Double_t y[2], Double_t r[2], Int_t fill, char dir); 80 101 81 102 // GUI interactions … … 105 126 Float_t GetMoonRadius() const { return fMoonRadius; } 106 127 TString GetStringFmt(const char *fmt="%B", Int_t day=1, Int_t h=12, Int_t m=0, Int_t s=0) const; 128 Bool_t IsRotated() const { return fRotation; } 129 Bool_t IsVertical() const { return fOrientation; } 107 130 108 131 … … 113 136 void SetLayout(Byte_t NumberOfBlocks, Double_t MarginX, Double_t MarginY, Double_t CellSpace, Double_t BlockSpace) { fNumBlocks=NumberOfBlocks, fMarginX=MarginX; fMarginY=MarginY; fCellSpace=CellSpace; fBlockSpace=BlockSpace; } //*MENU* *ARGS={NumberOfBlocks=>fNumBlocks,MarginX=>fMarginX,MarginY=>fMarginY,CellSpace=>fCellSpace,BlockSpace=>fBlockSpace} 114 137 115 void ResetLayout(); //*MENU 138 void ResetLayout(Int_t num); 139 void ResetLayout() { ResetLayout(-1); } //*MENU 116 140 void ResetHolidays(); //*MENU 117 141 118 void SetDefaultLayout(); //*MENU 142 void SetDefaultLayout(Int_t num); 143 void SetDefaultLayout() { SetDefaultLayout(-1); } //*MENU 119 144 void SetDefaultHolidays(); //*MENU 120 145 … … 141 166 142 167 // void ToggleOrientation() { fOrientation = !fOrientation; } //*MENU 168 void SetRotated(Bool_t b=kTRUE) { fRotation = b; } // *TOGGLE* *GETTER=IsRotated 169 void SetVertical(Bool_t b=kTRUE) { fOrientation = b; } // *TOGGLE* *GETTER=IsVertical 143 170 144 171 void PrintEnv() const; //*MENU … … 146 173 void RemoveEnv(const char *VariableName) const;//*MENU 147 174 148 149 175 void SetMoonGraf(Int_t Align, Float_t Radius) { fMoonAlignGraf=Align; fMoonRadius=Radius; } //*MENU* *ARGS={Align>=fMoonAlignGraf,Radius=>fMoonRadius} 150 176 void SetMoonText(Int_t Align, Int_t Type, Int_t Continous) { fMoonAlignText=Align; fMoonTextType=Type; fMoonTextCont=Continous; } //*MENU* *ARGS={Align>=fMoonAlignText,Type=>fMoonTextType,Continous=>fMoonTextCont} 151 177 152 178 // Calendar sheet interface 153 TASImage *DrawImage(const TASImage &img, Float_t x1, Float_t y1, Float_t x2, Float_t y2 ) const;154 TASImage *GetImage(TEnv *env=NULL );179 TASImage *DrawImage(const TASImage &img, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Bool_t rot=kFALSE) const; 180 TASImage *GetImage(TEnv *env=NULL, const char *path=""); 155 181 void DrawLatex(Float_t x, Float_t y, const char *text, const TAttText &att); 156 182 void DrawDate(Float_t x, Float_t y, const char *text, const TAttText &att) … … 168 194 } 169 195 TASImage *DrawTTF(Float_t x1, Float_t x2, Float_t y1, Float_t y2, 170 const char *text, Int_t size, const char *font);196 const char *text, Float_t size, const char *font); 171 197 TASImage *DrawTTFDate(Float_t x1, Float_t x2, Float_t y1, Float_t y2, 172 const char *text, Int_t size, const char *font)198 const char *text, Float_t size, const char *font) 173 199 { 174 200 return DrawTTF(x1, y1, x2, y2, GetStringFmt(text), size, font); … … 183 209 void Paint(Option_t *o=""); 184 210 211 /* 212 void Update(); 213 void SetLineAttributes() {} 214 void SetFillAttributes() {} 215 void SetTextAttributes() {} 216 void SetTextAngle(Float_t) {} 217 void Selected(TVirtualPad*,TObject*,Int_t); 218 */ 219 //void SetAttributes(); //*MENU 220 185 221 ClassDef(MCalendar, 1) 186 222 };
Note:
See TracChangeset
for help on using the changeset viewer.