Re: [ROOT] Freeing Up Canvas in Loop?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jun 20 2000 - 19:23:35 MEST


Hi Jon,
You should call gSystem->ProcessEvents() in your loop.
You can find some inspiration from TPad::WaitPrimitive. see the code
and specs at URL:

  http://root.cern.ch/root/html/src/TPad.cxx.html#TPad:WaitPrimitive

You can also use a TTimer, see:

  http://root.cern.ch/root/html/TTimer.html

Rene Brun



Jon Gans wrote:
> 
> Rene,
> Painting isn't the problem. Once it is painted the Menu Bar is Greyed
> out and you cannot inspect the items on the canvas. I would like to be
> able to edit the canvas (and historgrams) while the main macro is still
> running.
> Thanks again
>  jon
> 
> On Tue, 20 Jun 2000, Rene Brun wrote:
> 
> > Hi Jon,
> > call TCanvas::Update in your loop to force the canvas to be paint.
> >
> > By default, the canvas is paint when a <CR> is typed (normal command mode)
> > or when TCanvas::Update is called.
> >
> > Rene Brun
> >
> > Jon Gans wrote:
> > >
> > > I have a menu system that takes input from cin inside a while loop. This
> > > macro calls other functions that draw canvases. However, after the canvas
> > > is drawn, since the calling macro is still in the loop, the canvas are
> > > frozen.
> > >
> > > Is there some semaphore I can overide to make these canvas active while
> > > the calling macro is waiting for more input?
> > >
> > > Thanks
> > > jon



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