Home » Developing U++ » U++ Developers corner » About DHCtrl and window handles...
Re: About DHCtrl and window handles... [message #12732 is a reply to message #12722] |
Wed, 14 November 2007 15:21   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Wed, 14 November 2007 10:47 |
OK, np, good idea, adding that now.
|
good, so I'll remove my friend patch to Ctrlcore and fetch new sources.
Quote: |
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.
|
The windowed control start working ok, and in parallel also the GLCtrl derived from it. I have just a question more : windowed controls (X11 & windows too) should not receive paint/mouse and so events if they are not initialized. Up to now, I resorted to add an isInitialized member to my DHCtrl, but then all code in event handlers should check it before painting/reacting, ecc.
There is not a flag already present in Ctrl class that can be used to automatize that ?
For example, I'd set a "no_event" flag in constructor of my dhctrl, and reset it after window is created. But then the core of Ctrl should look for such a flag and avoid sending events to the uninitialized ctrl. (at least, no paint events).
Quote: |
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....
|
Ok, I'm yet trying to fully understand the event chain, so I can't thell much more on the subject.
What I've seen in some other framework is a main event handler for each control (It could be your EventProc) that is called BEFORE events are dispatched to the control, and that can suppress the dispatching of them, for example, or modify them.
From what I've seen in my code, even if I set Ctrl EventProc to do nothing or to eat all events those are still passed to Paint() function, for example (not yet checked for mouse events). It's normal ?
Ciao
Max
|
|
|
 |
|
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 Jun 25 19:02:43 CEST 2025
Total time taken to generate the page: 0.03379 seconds
|