Re: [ROOT] Event handling in TRootEmbeddedCanvas?

From: jiangyong jia (jjia@rcf.rhic.bnl.gov)
Date: Thu May 04 2000 - 18:25:04 MEST


Hi Fons,

Thanks for the message.
 
1)but I still don't know why I can't access gBatchGuiFactory and
gGuiFactory pointers in root macro( since they are global variable)

2) I wrapped several buttons inside a TGCompositeCanvas, and I popup 
the window, and try to move and click the mouse inside the
TGCompositeFrame(region O, there seems no event catched by it(except
expose event)!, B1 B2 will catch mouse event though!
 ********************
 *------|     O     *
 *  B1  |  _________*
 *______|  |  B2    *
 *         |--------*
 ********************
But I find out TGCanvas will always catch mouse event, so here is my
question:
 What is the policy in root to dispatch mouse events for different
TGFrame???( they are all TGWindow, why some have no event??)

3) is it possible to resize each individual Frame inside TGMainFrame?
It will be a big bonus for root if this functionality is implemented.

Cheers,
Jiangyong

On Wed, 3 May 2000, Fons Rademakers wrote:

> Hi Jiangyong,
> 
>    concerning 1) the gBatchGuiFactory is a pointer to the class TGuiFactory
> which is an "abstract" (i.e. dummy) implementation of the interface to
> the high level gui components, like, canvas, browser, etc. When in batch
> mode and you create a TCanvas, the gui part of the browser will be dummy.
> 
> Ad 2) the TCanvas in the TRootEmbeddedCanvas has its fCanvasImp set to a
> dummy version of the canvas GUI component which was created by via
> gBatchGuiFactory. This dummy GUI component will never generate input events
> (since it is dummy) so there is no problem.
> 
> Cheers, Fons.
> 
> 
> 
> jiangyong jia wrote:
> > 
> > Hi,Dear Brun,
> > Few questions,
> > 1) what is the difference between gBatchGuiFactory and gGuiFactory?
> > and what does batch modes means? It seems to me that i can't access them
> > in root prompt.
> > 2) I want to insert a canvas into GUI interface,
> > I find that TRootEmbeddedCanvasContainer dispatch the mouse event to
> > TCanvas , but TCanvas contains a datamember fCanvasImp which is actually
> > TRootCanvas and it inherite from TGMainFrame. TRootCanvas also catch
> > mouse event(come form TRootCanvasContainer) and dispatch them to TCanvas,
> > So If one use TRootEmbeddedCanvas , TCanvas will receive mouse event from
> > TWO dispatchers???
> > Help!!
> > Cheers,
> > Jiangyong
> > 
> > ************************************************
> >         jjia@rcf.rhic.bnl.gov
> >         Jiangyong Jia
> >         Department of Physics
> >         State University New York at Stony Brook
> >         Stony Brook, New York 11794-3800
> >         Tel.631-344-5455
> > *********************************************
> 
> -- 
> 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 02 2001 - 11:50:24 MET