Home » Community » Newbie corner » Is it possible to embed a Skylark app in a normal U++ GUI app?
Re: Is it possible to embed a Skylark app in a normal U++ GUI app? [message #37934 is a reply to message #37930] |
Sat, 24 November 2012 09:45 |
|
lectus wrote on Sat, 24 November 2012 01:22 | For example, can you run Skylark at the click of a button, instead of popping up the console as the main application loop?
|
Yes, it is... Although it is little complicated. The main problem is that SkylarkApp has it own event loop, so you need to run it in separate thread if you want to use GUI at the same time. Also, AFAIK it is currently not possible to stop SkylarkApp (only using signals). However, if you can live with these minor problems, you can have a GUI app that has http interface and you can even make the handlers communicate with GUI via PostCallback. You could probably communicate the other way with a little of work too, but I didn't try.
Attached is a proof of concept code. It is not a nice code, I just quickly hacked it together, so it might be slightly unreadable The main idea is that actions on htpp interface (which is taken from Skylark01 tutorial) are communicated to GUI which displays them in title bar. If you have some other questions, perhaps explaining what exactly would you like to achieve, feel free to ask
Best regards,
Honza
-
Attachment: main.cpp
(Size: 1.42KB, Downloaded 195 times)
|
|
|
Goto Forum:
Current Time: Wed May 15 14:24:39 CEST 2024
Total time taken to generate the page: 0.02137 seconds
|