Signals and Slots GUI wrapper

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.

Signals and Slots GUI wrapper

Postby SLC » Sat Dec 12, 2015 1:13 am

This is something I made tonight as a fun project after I noticed it gets a bit annoying to have a switch case for all gui elements especially when the user interface might be a little populated. I wish the developers would think about including the option to associate an arbitrary user pointer with gui element instances so I don't have to take this weird approach.

The source can be found here. The Irrlicht tutorial on user interface was converted as an example.

It requires a decent compiler with C++11 features. I've tested this on MinGW GCC 5.2.0 x32 and I know it works on lower versions as well. As for visual studio I have no idea. But I know VS to be a bit sketchy on new C++ features. Either requires some workarounds (if you're lucky) or not having that feature at all. So be warned VS users.

I haven't spent much time testing it so please expect some bugs. If you find any then please let me know and I'll fix it as soon as possible.
User avatar
SLC
 
Posts: 19
Joined: Mon Jan 06, 2014 9:41 pm

Re: Signals and Slots GUI wrapper

Postby Sudi » Fri Dec 25, 2015 12:45 am

Nice!

Shameless plug on my part...without c++11 and with a lot less code: viewtopic.php?f=9&t=43344
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
User avatar
Sudi
 
Posts: 1685
Joined: Fri Aug 26, 2005 8:38 pm


Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest