UICore

UICore provides a set of common UI controls that promote a constant look and feel across all aspects of the UI.

The largest piece of UICore is the wxBaseDialog class, which provides a foundation for all dialog windows in the game.  A helper class ISizer is included to allow for derived dialog windows to provide their own layout mechanism during construction of the window.  Ninety percent of the time (or more), all UI controls will be displayed in a dialog window of some sort, so wxBaseDialog is provided as the common foundation that will drive all of the child controls.

UICore provides several kinds of child controls.  There are two types of buttons, wxClearButton, a custom-drawn bitmapped button, and wxFreeButton, a borderless button useful for embedding button-clicking into a window without the look of a button.  There is a list control, wxBaseListCtrl, a tree control, wxBaseTreeCtrl, a check box, wxBaseCheckBox, a static grouping box, wxBaseStaticBox, and two types of text controls.  The first is wxBaseTextCtrl, which allows user to enter text into a field, and then wxBaseStaticText, which is a read-only text box for displaying information to the user.

UICore also provides base classes for any custom-drawn main screen UI elements.  The UI interface allows the main screen window to dynamically resize and reposition UI elements without having to know a thing about their internals.  The BaseUI class builds on the UI interface and provides the support for custom drawing, as well as working with the TraitsUI class to handle the dynamic resize functionality required by the UI interface.  With these classes in place, a main screen window can simply maintain a list of UI * objects and simply use the UI interface to redraw itself on all size and UI resize events, making extension and maintenance a breeze.

All UI elements in the game should be derived from one of these classes, to maintain a consistent user interface throughout the game.

Classes

BaseUI ISizer TraitsUI wxBaseCheckBox wxBaseDialog wxBaseListCtrl wxBaseStaticBox wxBaseStaticText wxBaseTextCtrl wxBaseTreeCtrl wxClearButton wxFreeButton UI

Depends On

DatabaseCore RulesCore

A common base class for dialog boxes.
An interface for sizing dialog windows.
A completely custom-drawn bitmapped button.
A borderless button.
A basic list control.
A basic tree control.
A basic check box window.
A basic static box.
A basic text control.
A basic static text window.
An interface for custom-drawn main screen UI elements.
A base class for all main screen UI.
Manages internal element sizes for a BaseUI-derived object.
DatabaseCore provides a set of commonly used Singletons and namespaces that handle important, but mundane aspects of game management, such as available player colors, configuration options, image maniplulation, file paths, and playing sounds.
RulesCore is the HOSS of Cities3D.