Home » Developing U++ » U++ Developers corner » About DHCtrl and window handles...
Re: About DHCtrl and window handles... [message #12705 is a reply to message #12684] |
Tue, 13 November 2007 15:34 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
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...
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.
Ciao
Max
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.
[Updated on: Tue, 13 November 2007 15:39] Report message to a moderator
|
|
|
|
|
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: Thu May 16 01:54:43 CEST 2024
Total time taken to generate the page: 0.02236 seconds
|