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 » U++ Library support » TopWindow&PopUp, TrayIcon » [Solved] How to merge two EventLoops together
[Solved] How to merge two EventLoops together [message #5581] Wed, 04 October 2006 18:27 Go to next message
3togo is currently offline  3togo
Messages: 83
Registered: May 2006
Location: Hong Kong SAR
Member
Present Scenerio:

1) class TrayWindow which is inherited from TopWindow was created
2) EventProc was implemented for TrayWindow

If I created say 1 TopWindow plus 1 TrayWindow as below

TopWindow w1;
TrayWindow t1;

Then it ended up with two set of EventLoops.

Does anyone knows how to merge two eventloops together.

3togo








[Updated on: Fri, 06 October 2006 23:38]

Report message to a moderator

Re: How to merge two EventLoops together [message #5588 is a reply to message #5581] Wed, 04 October 2006 21:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
See section 6 of GUI tutorial.
Re: How to merge two EventLoops together [message #5594 is a reply to message #5588] Thu, 05 October 2006 07:35 Go to previous messageGo to next message
3togo is currently offline  3togo
Messages: 83
Registered: May 2006
Location: Hong Kong SAR
Member
Is there any registering process needed to plug a tailor made "EventProc" so that it could be callable by Ctrl::EventLoop() ?



luzr wrote on Thu, 05 October 2006 03:43

See section 6 of GUI tutorial.


Re: How to merge two EventLoops together [message #5608 is a reply to message #5594] Thu, 05 October 2006 20:20 Go to previous messageGo to next message
3togo is currently offline  3togo
Messages: 83
Registered: May 2006
Location: Hong Kong SAR
Member
My guess is : AddChild();
3togo wrote on Thu, 05 October 2006 13:35

Is there any registering process needed to plug a tailor made "EventProc" so that it could be callable by Ctrl::EventLoop() ?



luzr wrote on Thu, 05 October 2006 03:43

See section 6 of GUI tutorial.




Re: How to merge two EventLoops together [message #5613 is a reply to message #5594] Thu, 05 October 2006 22:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
EventProc is more "implementation" thing, you should not override it directly unless you are doing some very platform specific thing (which OTOH you seem to do Smile.

Simply overriding it should be enough. But do not forget to call Ctrl::EventProc for messages you do not handle...
Re: How to merge two EventLoops together [message #5615 is a reply to message #5613] Thu, 05 October 2006 22:48 Go to previous message
3togo is currently offline  3togo
Messages: 83
Registered: May 2006
Location: Hong Kong SAR
Member
Things are getting much much more complicated than I expected.

Because the window holding the "trayicon" is not created by TopWindow, I must find a way to register it so that it could be included in Ctrl::GetTopWindows().

But how?

My EventProc never knows the very existence of my trayicon because it is not created by TopWindow. I don't want to implement another version of Open() because most of the functions and variables within Ctrl are created as "private" instead of "protected".


Also, it seems to me that there is no such thing similar to GtkContainer in U++.



luzr wrote on Fri, 06 October 2006 04:41

EventProc is more "implementation" thing, you should not override it directly unless you are doing some very platform specific thing (which OTOH you seem to do Smile.

Simply overriding it should be enough. But do not forget to call Ctrl::EventProc for messages you do not handle...


[Updated on: Thu, 05 October 2006 22:59]

Report message to a moderator

Previous Topic: Fix for TopMost on Win32 to allow it to be changed at any time.
Next Topic: Object Hierarchy
Goto Forum:
  


Current Time: Tue Apr 16 19:10:05 CEST 2024

Total time taken to generate the page: 0.01043 seconds