I was surprised when my CGUIFileOpenDialog instance called IGUISkin::draw3DWindowBackground() ... (which caused a few headaches while refactoring my concrete skin).
I would expect CGUIFileOpenDialog to either inherit IGUIWindow (is-a), contain a window instance (has-a), or that it not--apparently--break encapsulation by calling IGUISkin::draw3DWindowBackground(). The function name and documentation insinuates that the function exclusively skins IGUIWindow instances. However, this is not true. Perhaps it is merely a result of the development lifetime rather than design.
In all honesty, it is a minor issue that could be improved (if not resolved) by updating the documentation. But, in my opinion the issue ought to be formally resolved in a future release.
{Edit: added proposed solution}
My proposed solution is to refactor CGUIFileDialog, removing the window behaviors:
- Drawing methods (titlebar, window buttons, background, and borders)
- Dragging behavior
- Modal state
Such an implementation would adhere more closely to the OOP concept of encapsulation. Implementers would contain IGUIFileOpenDialog instances in an IGUIWindow instance ... or, for that matter, any instance of a class derived from IGUIElement!
Cheers,
~Andrew~
{ BTW, great job overall on the GUI API ... best 3D-Graphics Engine GUI implementation I've seen (to date)! }