Changeset 8755
- Timestamp:
- 10/10/07 19:59:43 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8754 r8755 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2007/10/10 Thomas Bretz 22 23 * mtools/MagicDomino.[h,cc], mtools/MagicReversi.[h,cc], 24 mtools/MagicShow.[h,cc], mtools/MagicSnake.[h,cc], 25 mtools/MineSweeper.[h,cc]: 26 - added a constructor supporting any MGeomCam 27 28 * mtools/MagicJam.h: 29 - removed some new function from the context menu 30 31 20 32 21 33 2007/10/08 Thomas Bretz -
trunk/MagicSoft/Mars/mtools/MagicDomino.cc
r2173 r8755 215 215 // ------------------------------------------------------------------------ 216 216 // 217 // default constructor 218 // 219 MagicDomino::MagicDomino() 220 : fGeomCam(NULL), fDir(kBottom), fDone(NULL) 217 void MagicDomino::Init() 221 218 { 222 219 memset(fText, 0, sizeof(fText)); 223 224 SetNewCamera(new MGeomCamMagic);225 220 226 221 // … … 233 228 234 229 Draw(); 230 } 231 232 // ------------------------------------------------------------------------ 233 // 234 // default constructor 235 // 236 MagicDomino::MagicDomino() 237 : fGeomCam(NULL), fDir(kBottom), fDone(NULL) 238 { 239 SetNewCamera(new MGeomCamMagic); 240 Init(); 241 } 242 // ------------------------------------------------------------------------ 243 // 244 // 245 MagicDomino::MagicDomino(const MGeomCam &geom) 246 : fGeomCam(NULL), fDir(kBottom), fDone(NULL) 247 { 248 SetNewCamera(static_cast<MGeomCam*>(geom.Clone())); 249 Init(); 235 250 } 236 251 -
trunk/MagicSoft/Mars/mtools/MagicDomino.h
r1907 r8755 83 83 Short_t AnalysePixel(Int_t dir); 84 84 void GetSortedNeighbors(Int_t indices[6]); 85 void Init(); 85 86 86 87 void Draw(Option_t *option=""); … … 91 92 public: 92 93 MagicDomino(); 94 MagicDomino(const MGeomCam &geom); 93 95 ~MagicDomino(); 94 96 -
trunk/MagicSoft/Mars/mtools/MagicJam.h
r7342 r8755 41 41 void SetAutoScale() { } 42 42 void SetMinMax(Double_t min=-1111, Double_t max=-1111) { SetMinimum(min); SetMaximum(max); } 43 TH1 *ShowBackground(Int_t niter=2, Option_t *option="same") { return 0; } 44 Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05) { return 0; } 45 void SetErrorSpread(Bool_t f=kTRUE) { } 43 46 44 47 // Make the full pad sensible for the context menu -
trunk/MagicSoft/Mars/mtools/MagicReversi.cc
r2173 r8755 181 181 } 182 182 183 // ------------------------------------------------------------------------ 184 // 185 // default constructor 186 // 187 MagicReversi::MagicReversi() 188 : fGeomCam(NULL), fDone(NULL), fW(0), fH(0), fDrawingPad(NULL), fIsAllocated(kFALSE) 189 { 190 SetNewCamera(new MGeomCamMagic); 191 183 void MagicReversi::Init() 184 { 192 185 // 193 186 // Make sure, that the object is destroyed when the canvas/pad is … … 201 194 202 195 Draw(); 196 } 197 198 // ------------------------------------------------------------------------ 199 // 200 // default constructor 201 // 202 MagicReversi::MagicReversi() 203 : fGeomCam(NULL), fDone(NULL), fW(0), fH(0), fDrawingPad(NULL), fIsAllocated(kFALSE) 204 { 205 SetNewCamera(new MGeomCamMagic); 206 207 Init(); 208 } 209 210 MagicReversi::MagicReversi(const MGeomCam &geom) 211 : fGeomCam(NULL), fDone(NULL), fW(0), fH(0), fDrawingPad(NULL), fIsAllocated(kFALSE) 212 { 213 SetNewCamera(static_cast<MGeomCam*>(geom.Clone())); 214 215 Init(); 203 216 } 204 217 -
trunk/MagicSoft/Mars/mtools/MagicReversi.h
r1907 r8755 70 70 void DrawHexagons(); 71 71 void Free(); 72 void Init(); 72 73 73 74 Bool_t Flip(Int_t idx, Bool_t flip); … … 83 84 public: 84 85 MagicReversi(); 86 MagicReversi(const MGeomCam &geom); 85 87 ~MagicReversi(); 86 88 -
trunk/MagicSoft/Mars/mtools/MagicShow.cc
r2173 r8755 167 167 } 168 168 169 // ------------------------------------------------------------------------ 170 // 171 // default constructor 172 // 173 MagicShow::MagicShow() 174 : fTimer(this, 250, kTRUE), fGeomCam(NULL), fNumPixel(-1), fAuto(kTRUE), fW(0), fH(0) 175 { 176 SetNewCamera(new MGeomCamMagic); 177 169 void MagicShow::Init() 170 { 178 171 memset(fText, 0, sizeof(fText)); 179 172 … … 189 182 190 183 fTimer.TurnOn(); 184 } 185 186 // ------------------------------------------------------------------------ 187 // 188 // default constructor 189 // 190 MagicShow::MagicShow() 191 : fTimer(this, 250, kTRUE), fGeomCam(NULL), fNumPixel(-1), fAuto(kTRUE), fW(0), fH(0) 192 { 193 SetNewCamera(new MGeomCamMagic); 194 Init(); 195 } 196 197 // ------------------------------------------------------------------------ 198 // 199 // default constructor 200 // 201 MagicShow::MagicShow(const MGeomCam &geom) 202 : fTimer(this, 250, kTRUE), fGeomCam(NULL), fNumPixel(-1), fAuto(kTRUE), fW(0), fH(0) 203 { 204 SetNewCamera(static_cast<MGeomCam*>(geom.Clone())); 205 Init(); 191 206 } 192 207 -
trunk/MagicSoft/Mars/mtools/MagicShow.h
r1440 r8755 58 58 void SetNewCamera(MGeomCam *); 59 59 void ChangePixel(Int_t add); 60 void Init(); 60 61 61 62 Bool_t HandleTimer(TTimer *timer); … … 67 68 public: 68 69 MagicShow(); 70 MagicShow(const MGeomCam &geom); 69 71 ~MagicShow(); 70 72 -
trunk/MagicSoft/Mars/mtools/MagicSnake.cc
r2173 r8755 153 153 } 154 154 155 // ------------------------------------------------------------------------ 156 // 157 // default constructor 158 // 159 MagicSnake::MagicSnake() 160 : fTimer(this, 500, kTRUE), fGeomCam(NULL), fDone(NULL), fPaused(NULL), fW(0), fH(0) 161 { 162 SetNewCamera(new MGeomCamMagic); 163 155 void MagicSnake::Init() 156 { 164 157 // 165 158 // Make sure, that the object is destroyed when the canvas/pad is … … 175 168 176 169 fTimer.TurnOn(); 170 } 171 172 // ------------------------------------------------------------------------ 173 // 174 // default constructor 175 // 176 MagicSnake::MagicSnake() 177 : fTimer(this, 500, kTRUE), fGeomCam(NULL), fDone(NULL), fPaused(NULL), fW(0), fH(0) 178 { 179 SetNewCamera(new MGeomCamMagic); 180 Init(); 181 } 182 183 // ------------------------------------------------------------------------ 184 // 185 // default constructor 186 // 187 MagicSnake::MagicSnake(const MGeomCam &geom) 188 : fTimer(this, 500, kTRUE), fGeomCam(NULL), fDone(NULL), fPaused(NULL), fW(0), fH(0) 189 { 190 SetNewCamera(static_cast<MGeomCam*>(geom.Clone())); 191 Init(); 177 192 } 178 193 -
trunk/MagicSoft/Mars/mtools/MagicSnake.h
r1907 r8755 82 82 void SetWormColor(); 83 83 void Pause(Bool_t yes=kTRUE); 84 void Init(); 84 85 85 86 Bool_t HandleTimer(TTimer *timer); … … 91 92 public: 92 93 MagicSnake(); 94 MagicSnake(const MGeomCam &geom); 93 95 ~MagicSnake(); 94 96 -
trunk/MagicSoft/Mars/mtools/MineSweeper.cc
r2173 r8755 175 175 } 176 176 177 // ------------------------------------------------------------------------ 178 // 179 // default constructor 180 // 181 MineSweeper::MineSweeper() 182 : fGeomCam(NULL), fDone(NULL), fShow(NULL), fW(0), fH(0), fDrawingPad(NULL), fIsAllocated(kFALSE) 183 { 184 SetNewCamera(new MGeomCamMagic); 185 177 void MineSweeper::Init() 178 { 186 179 // 187 180 // Make sure, that the object is destroyed when the canvas/pad is … … 193 186 194 187 Draw(); 188 } 189 190 // ------------------------------------------------------------------------ 191 // 192 // default constructor 193 // 194 MineSweeper::MineSweeper() 195 : fGeomCam(NULL), fDone(NULL), fShow(NULL), fW(0), fH(0), fDrawingPad(NULL), fIsAllocated(kFALSE) 196 { 197 SetNewCamera(new MGeomCamMagic); 198 Init(); 199 } 200 201 MineSweeper::MineSweeper(const MGeomCam &geom) 202 : fGeomCam(NULL), fDone(NULL), fShow(NULL), fW(0), fH(0), fDrawingPad(NULL), fIsAllocated(kFALSE) 203 { 204 SetNewCamera(static_cast<MGeomCam*>(geom.Clone())); 205 Init(); 195 206 } 196 207 -
trunk/MagicSoft/Mars/mtools/MineSweeper.h
r1907 r8755 60 60 void DrawHexagons(); 61 61 void Free(); 62 void Init(); 62 63 63 64 void Paint(Option_t *option=""); … … 68 69 public: 69 70 MineSweeper(); 71 MineSweeper(const MGeomCam &geom); 70 72 ~MineSweeper(); 71 73
Note:
See TracChangeset
for help on using the changeset viewer.