Re: [ROOT] EventStatus

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Thu Jun 08 2000 - 20:47:00 MEST


Hi George,

   I agree it would be nice to better abstract the drawing of the event
status in TCanvas so you could pass any TGStatusBar widget to be drawn in.

I've added it to my TODO list.

Cheers, Fons.




George Irwin wrote:
> 
> > Hi Faouzi,
> > the StatusBar is part of the TRootCanvas object (which contains the
> > menubar canvas and status bar) and is not available in the
> > embeddedcanvas (which only contains the canvas). You can add a
> > status bar to the widget containing the embedded canvas.  How
> > to create a statusbar see the code for TRootCanvas.
> > Cheers, Fons.
> 
> Hi Fons,  In October I sent a related question to roottalk, which
> never got an answer.  Is there a nice way to forward the event status
> information to the status bar owned by the frame containing the
> canvas?  Thanks.  George
> 
> "I want to use TRootEmbeddedCanvas with a TGStatusBar.  However,
> TRootEmbeddedCanvas instantiates its TCanvas *fCanvas with a
> constructor which disallows a TGStatusBar.  So I create my
> TRootEmbeddedCanvas from another TGCompositeFrame (fParent of
> TRootEmbeddedCanvas) which owns a TGStatusBar and has a menu item
> which toggles an fShowEventStatus switch.  Then I have to modify the
> methods like:
> 
> TRootEmbeddedCanvas::HandleContainerButton(Event_t event)
> 
> to forward event status information to fParent's TGStatusBar using:
> 
> ((ParentType*)fParent)->SetStatusText(fCanvas->GetSelected()->GetObjec
> tInfo(px,py),ipart);
> 
> I'd prefer not to have to modify TRootEmbeddedCanvas.  Adding the
> ParentType dependency to the modified TRootEmbeddedCanvas class seems
> particularly ugly.  Is there a better way to do this?  For example,
> the TRootEmbeddedContainer class might be a logical place to provide
> status bar and perhaps menu functionality."
> 
> >
> 
> > Faouzi Attallah wrote:
> > >
> 
> > > Hi Rene,
> > >
> 
> > > Is it possible, or is there a way to get working
> > > ToggleEventStatus() within a TRootEmbeddedCanvas.
> > >
> 
> > > Thanks a lot.
> > > Faouzi.

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET