Re: [ROOT] TRootEmbeddedCanvas event handling

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Mar 26 2002 - 14:11:00 MET


Hi Glen,

  you could attach a slot function to the ProcessedEvent() signal
generated by the TCanvas. Do something like:

  TRootEmbeddedCanvas *em = ....;
  em->GetCanvas()->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
"MyClass", this, "UpdateNumbers(Int_t,Int_t,Int_t,TObject*)");

then implement MyClass::UpdateNumber(Int_t event, Int_t x, Int_t y,
TObject *selected) where you update the numbers.

Cheers, Fons.



On Mon, 2002-03-25 at 23:03, Glen R. Salo wrote:
> Hi,
> 
> I have a GUI with a TRootEmbeddedCanvas and a several TGNumberEntrys.  A
> TGeometry is displayed in the TRootEmbeddedCanvas.  As I rotate the
> TGeometry by depressing the left mouse button and moving the mouse, I would
> like to continuously update the view angles displayed in the
> TGNumberEntries.  Any suggestions on how I would go about doing this?
> 
> Thanks,
> 
> Glen
-- 
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:47 MET