CEGui architecture

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
smjones
Just popping in
Just popping in
Posts: 4
Joined: Wed Jan 18, 2006 22:53
Location: California, United States

CEGui architecture

Postby smjones » Wed Jan 18, 2006 23:02

Being new to CEGui and always curious how things work, is there a document that explains how the main "engine" works? How do the Events and EventSet work together with the basic Windows? Does it use "Win32 like" message handling?

Thanks. I'll continue to dig into the code.

-SJ

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: CEGui architecture

Postby scriptkid » Thu Jan 19, 2006 08:23

Hi,

welcome :-)

By my knowledge, there is no such thing like a class diagram or something. Without defending this, i can say that the hierarchy isn't that complicated either. It's not a Java-ish beast full of interfaces, abstract classes, and more of that. Ok a few, but that's just good OOP :-)

And because the cegui system is setup generically (events and properties for example), as soon as you understand how to work with one widget, it's not too hard to get used to all of them.

Roughly speaking, the system is build up around the "system" class and quite a bunch of "manager" classes, which can be seen as sub-systems. If you look at sample code you often see the same pattern:
-Create the system
-Set a renderer
-Use a WindowManager to load or create Windows
-Use a FontManager to set your default font
-Setup your event handling and other specific stuff

Besides that, since 0.4.0, the so-called "falagard" apprauch is being used. (See the wiki for more on this), which allows you to define almost everything by XML! But don't worry, you'll be able to create some cool stuff with the shipped "looks" already too :-)

About your events question: cegui does not listen to any input-events itself. You must provide your own listening through Win32 messages or SDL or whatever, and "inject" them into cegui. So it doesn't force you into anything here.

Since i'm not the author of the system, i invite Mr. Eddie himself to either add to, or correct, the text above :-)

Good luck!

User avatar
smjones
Just popping in
Just popping in
Posts: 4
Joined: Wed Jan 18, 2006 22:53
Location: California, United States

Re: CEGui architecture

Postby smjones » Thu Jan 19, 2006 16:26

Thank you. I feel welcome already!

I did manage to find the class diagram in the help file that was installed. But I did not find much write up on how the library internals work. Your comments, however, gave me some clues.

I am a MFC/Wi32 programmer so naturally I went looking for the message pump. But it looks like the pump is supplied by our own applications. That would explain the call to System::getSingleton()->render() or something like that in the main loop of the application.

-SJ


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests