To simplify event-driven programming
it whould be nice to make possible to have
classes similar the following
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?
With best regards, Valery