Thinking of Rolling My own GUI toolkit.

Started by
10 comments, last by ToniKorpela 11 years, 9 months ago
In CEGUI event handers can be subscribed via C++ code - a scripting module is not required to to use event handlers at the basic level (that being where C++ event handlers are subscribed via C++ code).

Of course scenarios can exist where a ScriptModule might be needed, but depending on one's needs, this does not need to be the Lua module, and for example could be a module made for the sole purpose of mapping events specified in layout xml files to a set of C++ functions. Lots of customisation opportunities exist here.

I respectfully suggest moving further CEGUI specific discussion to its own forum thread - in order not to totally derail / hijack this thread :)

CE.
Advertisement
CrazyEddie I thank you for your input and for noticing that it is going off topic.

I will update you guys once I actually start programming the library. I am currently busy with other things, but i have been thinking about this quite much.

I will most likely create really simple XML system for easily creating graphical user interfaces, but at first I will focus only writing the basic GUI elements. I am currently thinking that i will leave the event handling up to the library user, because basically every window framework offers input system and handles stuff like how to get the mouse position differently. This way the library can be easily used with any input system as long as they use OpenGL, because i am not going to install windows to use directx.

So basically after loading the XML file you would get list of widgets created and you could call their functions like:
if(widgetName->isDown( mouse_X, mouse_Y) == true) { /* do whatever you want... */ }

Of course I will give full ability to modify the widgets after they have been loaded like:
widgetName->setBackground(filename);

But i will probably include way to include events in the XML file and when this event function is called the XML file will specify what happens to the widget, but you would need to use the event functions like isDown() return value to specify if to do something for your own code instead off registering callback functions.

By the way.. I should probably say that i have never written complete application which uses GUI with c/c++ or any other language. The only thing i have done is tested them around a bit. Probably one of the reasons is that i am not good with art and i enjoy network and database programming more than anything.

This topic is closed to new replies.

Advertisement