wGui provides an application framework to simplify the development of gui applications. At the core of this framework is the CApplication class. The application object provides several key bits of functionality. The application is responsible for initializing and cleaning up SDL, translating SDL events into wGui messages, and managing the main message loop. The application also manages a collection of Font Engines, and the global configuration.
The application object has no onscreen representation. To actually create an onscreen window, a View object is required. The CView class creates an SDL window. Unfortunately due to the limitiations of SDL, an application can only have one view. Therefore the CView is implemented as a singleton, and only allows one instance of it. If a second instance is instantiated, it will throw an exception from the constructor. Hopefully this will be changed in SDL sometime in the future, and this restriction can be removed.