Changeset 8755


Ignore:
Timestamp:
10/10/07 19:59:43 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8754 r8755  
    1818
    1919                                                 -*-*- 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
    2032
    2133 2007/10/08 Thomas Bretz
  • trunk/MagicSoft/Mars/mtools/MagicDomino.cc

    r2173 r8755  
    215215// ------------------------------------------------------------------------
    216216//
    217 //  default constructor
    218 //
    219 MagicDomino::MagicDomino()
    220     : fGeomCam(NULL), fDir(kBottom), fDone(NULL)
     217void MagicDomino::Init()
    221218{
    222219    memset(fText, 0, sizeof(fText));
    223 
    224     SetNewCamera(new MGeomCamMagic);
    225220
    226221    //
     
    233228
    234229    Draw();
     230}
     231
     232// ------------------------------------------------------------------------
     233//
     234//  default constructor
     235//
     236MagicDomino::MagicDomino()
     237    : fGeomCam(NULL), fDir(kBottom), fDone(NULL)
     238{
     239    SetNewCamera(new MGeomCamMagic);
     240    Init();
     241}
     242// ------------------------------------------------------------------------
     243//
     244//
     245MagicDomino::MagicDomino(const MGeomCam &geom)
     246    : fGeomCam(NULL), fDir(kBottom), fDone(NULL)
     247{
     248    SetNewCamera(static_cast<MGeomCam*>(geom.Clone()));
     249    Init();
    235250}
    236251
  • trunk/MagicSoft/Mars/mtools/MagicDomino.h

    r1907 r8755  
    8383    Short_t AnalysePixel(Int_t dir);
    8484    void    GetSortedNeighbors(Int_t indices[6]);
     85    void    Init();
    8586
    8687    void  Draw(Option_t *option="");
     
    9192public:
    9293    MagicDomino();
     94    MagicDomino(const MGeomCam &geom);
    9395    ~MagicDomino();
    9496
  • trunk/MagicSoft/Mars/mtools/MagicJam.h

    r7342 r8755  
    4141    void  SetAutoScale() { }
    4242    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) { }
    4346
    4447    // Make the full pad sensible for the context menu
  • trunk/MagicSoft/Mars/mtools/MagicReversi.cc

    r2173 r8755  
    181181}
    182182
    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 
     183void MagicReversi::Init()
     184{
    192185    //
    193186    // Make sure, that the object is destroyed when the canvas/pad is
     
    201194
    202195    Draw();
     196}
     197
     198// ------------------------------------------------------------------------
     199//
     200//  default constructor
     201//
     202MagicReversi::MagicReversi()
     203    : fGeomCam(NULL), fDone(NULL), fW(0), fH(0), fDrawingPad(NULL), fIsAllocated(kFALSE)
     204{
     205    SetNewCamera(new MGeomCamMagic);
     206
     207    Init();
     208}
     209
     210MagicReversi::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();
    203216}
    204217
  • trunk/MagicSoft/Mars/mtools/MagicReversi.h

    r1907 r8755  
    7070    void  DrawHexagons();
    7171    void  Free();
     72    void  Init();
    7273
    7374    Bool_t Flip(Int_t idx, Bool_t flip);
     
    8384public:
    8485    MagicReversi();
     86    MagicReversi(const MGeomCam &geom);
    8587    ~MagicReversi();
    8688
  • trunk/MagicSoft/Mars/mtools/MagicShow.cc

    r2173 r8755  
    167167}
    168168
    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 
     169void MagicShow::Init()
     170{
    178171    memset(fText, 0, sizeof(fText));
    179172
     
    189182
    190183    fTimer.TurnOn();
     184}
     185
     186// ------------------------------------------------------------------------
     187//
     188//  default constructor
     189//
     190MagicShow::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//
     201MagicShow::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();
    191206}
    192207
  • trunk/MagicSoft/Mars/mtools/MagicShow.h

    r1440 r8755  
    5858    void   SetNewCamera(MGeomCam *);
    5959    void   ChangePixel(Int_t add);
     60    void   Init();
    6061
    6162    Bool_t HandleTimer(TTimer *timer);
     
    6768public:
    6869    MagicShow();
     70    MagicShow(const MGeomCam &geom);
    6971    ~MagicShow();
    7072
  • trunk/MagicSoft/Mars/mtools/MagicSnake.cc

    r2173 r8755  
    153153}
    154154
    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 
     155void MagicSnake::Init()
     156{
    164157    //
    165158    // Make sure, that the object is destroyed when the canvas/pad is
     
    175168
    176169    fTimer.TurnOn();
     170}
     171
     172// ------------------------------------------------------------------------
     173//
     174//  default constructor
     175//
     176MagicSnake::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//
     187MagicSnake::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();
    177192}
    178193
  • trunk/MagicSoft/Mars/mtools/MagicSnake.h

    r1907 r8755  
    8282    void   SetWormColor();
    8383    void   Pause(Bool_t yes=kTRUE);
     84    void   Init();
    8485
    8586    Bool_t HandleTimer(TTimer *timer);
     
    9192public:
    9293    MagicSnake();
     94    MagicSnake(const MGeomCam &geom);
    9395    ~MagicSnake();
    9496
  • trunk/MagicSoft/Mars/mtools/MineSweeper.cc

    r2173 r8755  
    175175}
    176176
    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 
     177void MineSweeper::Init()
     178{
    186179    //
    187180    // Make sure, that the object is destroyed when the canvas/pad is
     
    193186
    194187    Draw();
     188}
     189
     190// ------------------------------------------------------------------------
     191//
     192//  default constructor
     193//
     194MineSweeper::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
     201MineSweeper::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();
    195206}
    196207
  • trunk/MagicSoft/Mars/mtools/MineSweeper.h

    r1907 r8755  
    6060    void  DrawHexagons();
    6161    void  Free();
     62    void  Init();
    6263
    6364    void  Paint(Option_t *option="");
     
    6869public:
    6970    MineSweeper();
     71    MineSweeper(const MGeomCam &geom);
    7072    ~MineSweeper();
    7173
Note: See TracChangeset for help on using the changeset viewer.