Re: [ROOT] Event handling or graphing huge datasets

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Feb 26 2002 - 18:53:21 MET


Hi Tony,

  just an answer to the first part of your question:

On Tue, 2002-02-26 at 17:20, Colley, Tony wrote:
> Hi Rooters.
> 
> I have two questions... a specific one and a general one.
> 
> Specific: I am trying to write an extension of TGraph, i.e., a derived class
> (DvatGraph) which (for now) simply overrides the ExecuteEvent function. I
> have done this, but only Button 1 events seem to be passed to this
> ExecuteEvent function. I have tried to find where in the ROOT code it is
> specified that TGraph shall only handle Button 1 events, but I seem to be
> lost in a maze of twisty passages all looking alike. So... the specific
> question is, how do I route other button events to TGraph (or at least to my
> DvatGraph)?
>
Indeed only Button 1 events (down, motion, up and double click) and key
board events are passed. The button 2 (object pop) and button 3 (object
contextmenu) are handled in TCanvas and are not propagated. If you want
to get all events in a derived graphics class you can connect a slot to
the TCanvas::ProcessedEvent() signal. In this slot you check if
"selected" is "this" and handle the event.



Cheers, Fons.


-- 
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 7679480



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:43 MET