Property Grids in C++

During my experience writing an editor for my Chaos Engine remake I fell in love with C#’s property grid since it is like the ultimate Swiss army knife of data manipulation.  The property grid can be seen below:

Property Grid

From my understanding, you send the property grid a structure, it accesses C#’s internal representation of that structure and makes all of its members available for manipulation in their native data types.  Even things such as enums are correctly handled, and alone it can form the greater part of a powerful level editor.

My current focus is the re-implementation of something similar in C++, which will form one of the cornerstones of my level editor.  Since there is no way to ask C++ what the layout of a structure is, I need to give this information to my property grid in addition to a pointer to the structure to be modified.  These representations can be programmed at compile time and included in the static data section, and the beauty is that we can use the same representation for all objects of the same type.  As always, I like to make a mockup before I start to program so that I can first focus 100% on the visual layouts, and then later focus 100% on the programming side of things.  If I were to do both at the same time the final design may be unfocussed and rushed.  My mockup is designed to match the scripting art for nice consistency.  I hope to have this finished in the next few days.

Editor

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s