Implementing your own visual parts presents a problem that implementing nonvisual parts does not. Nonvisual parts are represented on the free-form surface by icons, so only a part interface specification is needed to enable the part to be used in theComposition Editor. However, most visual parts on the free-form surface are real-time class instances, so VisualAge must have access to a DLL from which to instantiate each visual part. These custom visual parts include the following:
Deriving from a class that uses or contains template-based classes is possible with certain restrictions. To preserve the template implementation, you must define the part interface using a .vbe file; you cannot specify it properly through the Part Interface Editor. (If you do use the Part Interface Editor, VisualAge will issue an error message when it generates code for the part.) The alternative to using an interface file is deriving the part from an instance of the template-based class. These template restrictions apply to the following classes:
If the part is itself a class template, you must define any notification IDs in a separate IDs class. When used, these notification IDs must be scoped to the class in which they are implemented. (For example, to specify the itemChanged event in a notifyObservers call, use IVBContainerControlIds::itemChangedId. To specify the event associated with the selectedCnrElement attribute, use IContainerControl::selectId.) For examples of an IDs class, see the ivbids.hpp header file.
Deriving from certain other classes (mostly Composer parts) is possible only with restrictions. For more information, see reference information for the parts you want to use as base classes.
Part Design Guidelines
Naming Guidelines for Parts and
Their Features
About Implementing Nonvisual
Parts
Generating User
Interface Source
Deriving from Visual
Classes
VisualAge User Interface
Parts
