On 9 Aug 98 at 23:48, Valeriy Onuchin wrote: > class LiveObject: public TObject, public TTimer > { > public: > LiveObject() {gSystem->AddTimer(this);} > > void ExecuteEvent(Int_t event, Int_t px, Int_t py) > { some actions in responce to graphic events > (for example, if(event==kButton1Up) TTimer::Remove();) > } > > Bool_t Notify() {SomeAction(); Reset(); return kFALSE;} > }; > > > > The only obstacle which prevents having this is that > TTimer is original from TObject (TObject->TSysEvtHandler->TTimer). > > Is it possible to have inheritance like this: > > TSysEvtHandler -> TVirtualTimer > TVirtualTimer + TObject -> TTimer > > or it requires dramatic modifications of ROOT? Execuse me but I didn't understand why this " class LiveObject: public TTimer " doesn't work for you ? Could you send me (not to roottalk) the further information to figure your needs out. Have a look at the last version of ROOT 2.00/10 It says: // // 18/07/1998 19.17.01 by Fons Rademakers // - TSystem: new method ProcessEvents(). Call this method regularly in tight calculation loops. It allows the processing of GUI, socket and timer events. Most importantly it allows the clean interruption of such a tigh loop. That is, it returns kTRUE when the users wants to terminate the loop. Currently the user can terminate the loop by selecting the canvas menu View/Interrupt or by hitting any key in the canvas. The interrupt flag is set via the routine TROOT::SetInterrupt(). Of course, this method can be called via any GUI button. - TROOT: new methods SetInterrupt() and IsInterrupted(). Used to toggle the variable TROOT::fInterrupt. - TRootCanvas: new menu item View/Interrupt (see above). - hsimple.C: calls gSystem->ProcessEvents() in main loop. Valery ================================================================= Dr. Valeri Faine (Fine) ------------------- Phone: +1 516 344 7806 Brookhaven National Laboratory FAX : +1 516 344 4206 Bldg. 510A /STAR mailto:fine@bnl.gov Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine USA Dr. Valery Fine Telex : 911621 dubna su ----------- LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80 141980 Dubna, Moscow region Fax : +7 09621 6 51 45 Russia mailto:fine@main1.jinr.dubna.su
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET