QuickGUI Widget Desc class        
Print

About the Desc object

A Desc object is used to build more complex objects in QuickGUI. Currently Descs are used for the GUIManager, MouseCursor, and Widget classes. Descs allow efficient construction of classes, by eliminating the need to build a default instance. Customization of a particular Widget can occur during construction! The struct-like nature of the Desc class also lends to serialization. All of the widget customizable data is already encapsulated into a single class.

Each Widget has its own Desc class?

Yes! This might seem confusing, especially since certain widgets are derived from others, such as the Button deriving from the Label widget. How will I know what properties are specific to the widget? I've recently upgraded the Desc object such that all widget specific properties have their widget class prepended to the property. All Label specific properties will be prepended with "label_", and all Button specific properties will be prepended with "button_". In this way, we can easily see what new properties are associated with the ProgressBar, for example. If youre IDE has some form of Intellisense, finding and setting properties will be convenient.

Below are commonly used properties, shared by all widgets:

widget_dimensions
 widget_name
 widget_skinTypeName
 widget_visible

 
Note: There are a lot more widget properties, shared by all widgets.


Contributors to this page: jacmoe133512 points  and KungFooMasta307 points  .
Page last modified on Wednesday 23 of December, 2009 18:44:59 UTC by jacmoe133512 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.