Changeset 13364 for trunk


Ignore:
Timestamp:
04/17/12 14:51:20 (13 years ago)
Author:
tbretz
Message:
Implemented the possibility to start an eventloop in a step-by-step mode which stops at each event which is not flagged with kCONTINUE.
Location:
trunk/Mars/mbase
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MEvtLoop.cc

    r9497 r13364  
    283283}
    284284
    285 Bool_t MEvtLoop::ProcessGuiEvents(Int_t num)
     285Bool_t MEvtLoop::ProcessGuiEvents(Int_t num, Int_t looprc)
    286286{
    287287    if (gROOT->IsBatch())
     
    305305            // FALLTHROUGH
    306306        case MStatusDisplay::kLoopStep:
    307             if (fDisplay && fDisplay->CheckStatus()==MStatusDisplay::kLoopStep)
     307            if (fDisplay && fDisplay->CheckStatus()==MStatusDisplay::kLoopStep && looprc!=kCONTINUE)
     308            {
     309                //fDisplay->ClearStatus();
    308310                fDisplay->SetPause();
     311            }
    309312            // FALLTHROUGH
    310313        case MStatusDisplay::kLoopNone:
     
    501504
    502505            numcnts++;
    503             if (!ProcessGuiEvents(++dummy))
     506            if (!ProcessGuiEvents(++dummy, rc))
    504507                break;
    505508        }
     
    513516
    514517            numcnts++;
    515             if (!ProcessGuiEvents(maxcnt - dummy))
     518            if (!ProcessGuiEvents(maxcnt - dummy, rc))
    516519                break;
    517520        }
  • trunk/Mars/mbase/MEvtLoop.h

    r12864 r13364  
    3939    void StreamPrimitive(ostream &out) const;
    4040
    41     Bool_t ProcessGuiEvents(Int_t num);
     41    Bool_t ProcessGuiEvents(Int_t num, Int_t rc);
    4242
    4343public:
  • trunk/Mars/mbase/MStatusDisplay.h

    r9581 r13364  
    298298     // Eventloop interface
    299299     Status_t CheckStatus() const { return fStatus; }
    300      void ClearStatus() { fStatus = kLoopNone; }
    301      void SetPause() { fStatus = kLoopPause; }
     300     void ClearStatus() { fStatus=kLoopPause; ProcessMessageCommandMenu(kLoopPause); }
     301     void SetPause() { fStatus=kLoopNone; ProcessMessageCommandMenu(kLoopPause); }
     302     void SetLoopStep() { SetPause(); fStatus = kLoopStep; }
    302303
    303304     void Lock() { fIsLocked++; }
Note: See TracChangeset for help on using the changeset viewer.