Re: [ROOT] TGWindow::MapWindow virtual?

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Mon May 03 2004 - 09:54:39 MEST


Hi,
I do not see any reason why not make it virtual.
There are some cases when it is usefull to add extra actions
on mapping/unmapping. For example, onUnmapping someWindow
also unMap other windows which are not childs of  this someWindow -
that is a case of "popup-like windows"

Regards. Valeriy


> I should not overload that method. You should provide your own
> implementation of HandleEvent
> http://root.cern.ch/root/htmldoc/TGWindow.html#TGWindow:HandleEvent 
> 
> http://root.cern.ch/root/htmldoc/Event_t.html
> 
> 
> in case EGEventType Event_t.fType = kMapNotify | kUnmapNotify,
> (see: http://root.cern.ch/root/htmldoc/GuiTypes.h )
> 
> bool YourCustomWidget::HandleEvent(Event_t *event){
> 
>   switch (event->fType) {
>     case kMapNotify:   your map action;   break; 
>     case kUnmapNotify: your unmap action; break;
>   };
>   return YourCustomWidgetBaseClass::HandleEvent(event);
> }
> 
>  
> > -----Original Message-----
> > From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]
> > On Behalf Of Thomas Bretz
> > Sent: Sunday, May 02, 2004 8:20 PM
> > To: roottalk@pcroot.cern.ch
> > Subject: [ROOT] TGWindow::MapWindow virtual?
> > 
> > Hi,
> > 
> > is there any reason that Map/UmapWindow is not virtual? I would like
> to
> > take some action when my window is mapped/unmapped.
> > 
> > Thomas.
> 
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET