Re: Drawing in compiled programs

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Mar 30 1999 - 18:30:39 MEST


Hi Marcus,

   to process pending events try calling:

    gSystem->ProcessEvents();

at some strategic places.

Cheers, Fons.



Marcus H. Mendenhall wrote:
> 
> Rene:
> 
> This doesn't quite do what I want.  I would like to be able to maintain
> control in my code, and just pass enough to the system to allow it to draw
> graphs.  If I call gApplication->Run(kTRUE) I don't get control back until
> the user tries to quit.
> 
> Essentially, what I need is a method that looks like TSystem::Run() but
> with the while loop turned off: something like the example below
> 
>  void TSystem::RunOnce()
> {
>    // System event loop.
> 
>    fInControl = kTRUE;
>    fDone      = kFALSE;
> 
>    // RETRY {
>       // while (!fDone) {
>          gApplication->StartIdleing();
>          InnerLoop();
>          gApplication->StopIdleing();
>     //   }
>   //  } ENDTRY;
> 
>    fInControl = kFALSE;
> }
> 
> which I would then call once per pass through my program's main computation
> and drawing loop to keep the display up to date.
> 
> Marcus
> 
> >Hi Marcus,
> >I suggest you look into the standard Root example hworld in
> >$ROOTSYS/test/hworld.cxx
> >
> >You will see an example using simple graphics and what you have to do.

-- 
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 04 2000 - 00:43:31 MET