ViewKit

The Object Oriented Framework for Motif and CDE Developers

ViewKit is a C++ application framework designed to simplify the task of developing UNIX applications, particularly those based on the OSF/Motif user interface toolkit.

The ViewKit framework promotes consistency by providing a common architecture for applications and improves programmer productivity by providing high-level, and in many cases automatic, support for commonly-needed operations. In addition to providing facilities normally associated with a graphical user interface, the framework serves as a central integration platform for other facilities applications typically need. These include support for inter-application communication, process control, and automatic on-line context-sensitive help.

ViewKit implements the Doug Young Method of using OSF/Motif, a C-based object system, with C++. The essence of this method lies in the mechanics of maintaining the C++ this pointer when going to and from the Motif widgets, and in the philosophy of building high-level UI objects from Motif before creating any C++ classes. Doug describes this method in detail in his book, Object-Oriented Programming with C++ and OSF/Motif (Prentice Hall, 1995, 2nd Ed. ISBN 0-13- 209255-7).

Mature Application Framework

Merriam-Webster defines framework as:

a: a basic conceptional structure (as of ideas)
b: a skeletal, openwork, or structural frame

ViewKit ObjectPak is just that - a combination of application design philosophy and basic software building blocks. Initially developed four years ago at Silicon Graphics, Inc., ViewKit is a well-planned, mature system which addresses a number of C++ programming issues including software reuse, programmer productivity, GUI implementation with Motif, and application usability. ViewKit builds and extends on the Doug Young method of using C++ together with Motif. Furthermore, it encompasses the notion of a generic application-- your starting point for development.

Components

The ViewKit framework encourages an object-oriented approach to application development that results in cleaner architectural design and more easily maintainable code. The ViewKit architecture is based on the concept of a component. A component is simply a C++ class that encapsulates related elements along with the semantics of those elements. Nearly everything in the ViewKit library is a component, including the application class, VkApp, the top-level window class, VkWindow, and the various menu classes such as the VkSubMenu class. Components can be nested, and a single logical user interface component often consists of collections of smaller user interface components.

Programmers are encouraged to develop their own components and to base the architecture of their applications on collections of objects, which may include pre-defined ViewKit components, custom components, as well as other classes and objects.

ViewKit classes fall into several general categories:

  • Base level/generic application classes
  • Menu system classes
  • Preference system classes
  • Dialog system classes
  • ToolTalk classes
  • UNIX process control classes
  • Miscellaneous user interface classes

ViewKit contains roughly 95 classes to help you with your development projects.