Changeset 2897


Ignore:
Timestamp:
01/23/04 18:23:44 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r2893 r2897  
    805805// --------------------------------------------------------------------------
    806806//
     807// This function was connected to all created canvases. It is used
     808// to redirect GetObjectInfo into our own status bar.
     809//
     810// The 'connection' is done in AddTab
     811//
     812void MStatusDisplay::EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
     813{
     814    //  Writes the event status in the status bar parts
     815    if (!selected)
     816        return;
     817
     818    TCanvas *c = (TCanvas *)gTQSender;
     819
     820    TVirtualPad* save=gPad;
     821
     822    gPad = c->GetSelectedPad();
     823
     824    SetStatusLine2(selected->GetObjectInfo(px,py));
     825
     826    gPad=save;
     827}
     828
     829// --------------------------------------------------------------------------
     830//
    807831// Adds a new tab with the name 'name'. Adds a TRootEmbeddedCanvas to the
    808832// tab and returns a reference to the corresponding TCanvas.
     
    834858    if (TestBit(kNoContextMenu))
    835859        c.SetBit(kNoContextMenu);
     860
     861    // Connect all TCanvas::ProcessedEvent to this->EventInfo
     862    // This means, that after TCanvas has processed an event
     863    // EventInfo of this class is called, see TCanvas::HandleInput
     864    c.ConnectToClass("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
     865                     "MStatusDisplay", this, "EventInfo(Int_t,Int_t,Int_t,TObject*)");
    836866
    837867    // layout and map new tab
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.h

    r2805 r2897  
    196196     Bool_t CheckTabForCanvas(int num) const;
    197197
     198     void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected);
     199
    198200     ClassDef(MStatusDisplay, 0)   // Window for a status display
    199201};
Note: See TracChangeset for help on using the changeset viewer.