Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » About DHCtrl and window handles...
Re: About DHCtrl and window handles... [message #12761 is a reply to message #12732] Wed, 14 November 2007 22:18 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
Quote:


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).



Search for "isopen" and "visible" in X11 code.

Quote:


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 ?



IMO should not happen for your DHCtrl.

Otherwise, U++ really cares about top-level Ctrls only. Messages from these are passed to the library and all dispatching is performed by library (to normal, window-less widgets).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SVN plan...
Next Topic: Interesting problem with setlocale
Goto Forum:
  


Current Time: Wed May 15 14:52:02 CEST 2024

Total time taken to generate the page: 0.02151 seconds