Application Programming Interface (API)
Views is organized as a set of C++ class libraries accompanied by several auxiliary editing tools to help you design your interfaces.
Header Files
Header files for Views can be found in the installation directory, under the include directory. To compile a source file that includes Views, you need to add this directory to the include path.
Views also provides a header file for each macro or type that is defined in the product. These header files are located in the directory include/ilv, and are named after the artifact itself.
For example, if you want to use the type 'IlvType', use the following directive:
#include <ilv/IlvType>
Libraries
The Views libraries provide the API needed to implement the programmable portions of your applications. As a true object-oriented C++ library, Views emphasizes code reuse through inheritance. Each derived class specializes its base class, adding to or modifying inherited structure and behavior. This means that if a particular class does not have a feature you are looking for, you should also check its base class to see if the feature is inherited. When deriving your own classes, you can use the existing class features and write only the new code you need, thus reducing development and maintenance costs.
The Views API is written in C++, a superset of C, from which you can call your C routines if necessary. Because C++ is flexible and resource efficient, it has become the most widely used and preferred object-oriented language.
The object-oriented capabilities provided by C++ allow code reuse and thus saves coding time. With a class hierarchy, a library of C++ classes is more flexible, extensible, and dependable than a procedure-oriented library.
Object-oriented programming suits graphics-oriented applications particularly well, because graphic objects often have similar operations performed on them. For example, a button is a specialized type of rectangle, and can thus inherit all the features of a rectangle without recoding. This hierarchical nature provides for easier, timesaving development and maintenance procedures.
Object-oriented code allows you to extend or specialize Views objects for your own application (or library) without knowing the details of the Views implementation. Similarly, your customers can specialize your objects without knowing details of your implementation. In addition, you can create your own library for your applications on top of the Views library by creating subclasses.
Class Hierarchy
The organization of Views class hierarchy makes it easy for you to find what you need. For example, using the classes in the diagram below, you can easily create sophisticated interfaces with minimum coding.
Partial Class Hierarchy of Views Graphic Objects