Home » Developing U++ » U++ Developers corner » About DHCtrl and window handles...
Re: About DHCtrl and window handles... [message #12722 is a reply to message #12705] |
Wed, 14 November 2007 10:47 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
mdelfede wrote on Tue, 13 November 2007 09:34 | In order to avoid the need of make friends of GLCtrl all windowed x11 controls (and maybe it could serve for other purposes...)
I suggest to add these 2 protected members to GLCtrl :
/////////////////////////////////////////////////////////////////////////////////////////
// Add subwindow to upp list of Xwindows
void Ctrl::AddUppXWindow(Window &w)
{
int i = Xwindow().Find(None);
if(i >= 0)
Xwindow().SetKey(i, w);
XWindow& cw = i >= 0 ? Xwindow()[i] : Xwindow().Add(w);
cw.ctrl = this;
cw.exposed = true;
cw.owner = GetParent();
cw.xic = NULL;
} // END Ctrl::AddUppXWindow()
/////////////////////////////////////////////////////////////////////////////////////////
// Removes subwindow to upp list of Xwindows
void Ctrl::RemoveUppXWindow(Window &w)
{
int i = Xwindow().Find(w);
if(i >= 0)
{
Xwindow().SetKey(i, None);
Xwindow()[i].ctrl = NULL;
}
} // END Ctrl::RemoveUppXWindow()
This code is duplicated both in X11 Topwindow AND in GLCtrl, and is coming in my windowed X11 control too...
|
OK, np, good idea, adding that now.
Quote: |
BTW, after I finish my X11 DHCtrl, I guess it would be not bad to rewrite X11 GLCtrl part to be derived of it... I'm already doing it for testing purposes.
|
Agree.
Quote: |
p.s.: I'm thinking again that the good behaviour for event handling should start from TopWindow parenting child controls and propagated to them. AFAIK now, as is DHCtrl done (and mine too...) the parent of a windowed child control *don't* have any knowledge of events going to the child, as opposite as normal controls... maybe that can cause problems, I don't know yet.
|
Hard to say. Anyway, IMO, interface-wise it should be arranged that at the end of EventProc, the widget will call DHCtrl::EvenProc, which will do the all required stuff....
Mirek
|
|
|
|
|
About DHCtrl and window handles...
By: mirek on Mon, 12 November 2007 20:39
|
|
|
Re: About DHCtrl and window handles...
By: Novo on Mon, 12 November 2007 21:03
|
|
|
Re: About DHCtrl and window handles...
By: mdelfede on Mon, 12 November 2007 21:53
|
|
|
Re: About DHCtrl and window handles...
By: mirek on Mon, 12 November 2007 23:21
|
|
|
Re: About DHCtrl and window handles...
By: mdelfede on Mon, 12 November 2007 23:42
|
|
|
Re: About DHCtrl and window handles...
By: mirek on Tue, 13 November 2007 00:13
|
|
|
Re: About DHCtrl and window handles...
By: mdelfede on Tue, 13 November 2007 00:47
|
|
|
Re: About DHCtrl and window handles...
By: mdelfede on Tue, 13 November 2007 15:34
|
|
|
Re: About DHCtrl and window handles...
By: mirek on Wed, 14 November 2007 10:47
|
|
|
Re: About DHCtrl and window handles...
By: mdelfede on Wed, 14 November 2007 15:21
|
|
|
Re: About DHCtrl and window handles...
By: mirek on Wed, 14 November 2007 22:18
|
|
|
Re: About DHCtrl and window handles...
By: mdelfede on Wed, 14 November 2007 23:55
|
|
|
Re: About DHCtrl and window handles...
By: mirek on Fri, 16 November 2007 12:00
|
|
|
Re: About DHCtrl and window handles...
By: mdelfede on Fri, 16 November 2007 16:50
|
Goto Forum:
Current Time: Wed May 15 04:38:51 CEST 2024
Total time taken to generate the page: 0.01567 seconds
|