///////////////////////////////////////////////////////////// // Simplest possible ViewKit application ///////////////////////////////////////////////////////////// #include#include void main ( int argc, char **argv ) { VkApp *app = new VkApp("Generic", &argc, argv); VkWindow *win = new VkWindow("generic"); win->show(); // Display the window app->run(); // Run the application }
The generic application instantiates an application object (VkApp), and a simple top-level window object (VkWindow). After displaying the window, the application runs. Figure 5 shows how the ViewKit generic application appears on the screen.
Figure 5. The ViewKit generic application.
The ViewKit generic application automatically supports on-line context-sensitive help, has ready-to-use services such as busy cursors and standard dialogs is integrated with the SGI desktop, and includes support for audio. The developer has only to add those elements that are application specific. The ViewKit framework also makes it easy to extend the generic application to meet application-specific needs.
___________________________________________________________________