CEGUI attributes are finished


08-11-2005 15:07:12

I've just finished a complete review of CEGUI attributes. There were a lot of place where CEGUI attributes were hard to wrap. Primarily because the API contains functions like this:

const Image * getDefaultMouseCursor (void) const
void setDefaultMouseCursor (const Image *image)
void setDefaultMouseCursor (MouseCursorImage image)
void setDefaultMouseCursor (const String &imageset, const String &image_name)

Our previous attribute code only handled the case where the get and set functions had the same types (such as the first two functions). It could not handle the case where the set function was overloaded and/or had differing types. Now both CEGUI and Ogre support this. For example, if you wish to set the default mouse cursor, all of these are valid:

system.defaultMouseCursor = image # type(image) == cegui.Image
system.defaultMouseCursor = mouseCursor # type(mouseCursor) == cegui.MouseCursorImage
system.defaultMouseCursor = "someSet", "someImageName"

Basically, whatever the set function allows as parameters you should be able to pass a tuple in for it. At this point, PyCEGUI is wrapped and there should not be any known missing attribute for get/set methods unless it's explicitly stated in the .i file. (For example, I'm waiting for 0.5 before fixing ListboxItem::getOwnerWindow due to a bug in 0.4.) If you find a get/set that you think should be wrapped, please report it. Also if you find a set method which does not properly take a tuple like it should (and it is a proper get/set pair...we do not wrap set methods without a get!), please report that too.

This also applies for Ogre as well, but I only remember 1 or 2 cases where the set method was overloaded, and I'll have to dig through the api later to find them.

The demos should be updated, and the CEGUI should be fairly stable from this point forward, but I will not mark the API stable until dagon is released.


08-11-2005 21:13:46

Sweet! Nice to see this maturing. Thanks for all your hard work.