In many cases, the Property Inspector API provides ATL-based template classes that implement its COM interfaces. A template implementation may implement IDispatch as well as several Properties palette COM interfaces, or it may implement a single, specialized object. Some template classes implement all methods of their interfaces, whereas others leave part of the implementation to you. In most cases, though, deriving from a template class requires far less coding than directly implementing the underlying interfaces.
Property Inspector template classes are defined in the axtempl.h file. The template classes and the interfaces they implement, either wholly or in part, are shown in the following table.
Property Inspector Template Classes |
|
---|---|
Template Class |
Implemented Interfaces |
IAcadBaseObjectImpl |
IAcadBaseObject, IConnectionPointContainer |
IAcadBaseObject2Impl |
IAcadBaseObject2, IAcadBaseObject, IConnectionPointContainer |
IAcadObjectDispatchImpl |
IDispatch, IAcadBaseObject, IAcadBaseObject2, IRetrieveApplication, IUnknown, IConnectionPointContainer |
IAcadEntityDispatchImpl |
IDispatch, IAcadBaseObject, IAcadBaseObject2, IRetrieveApplication, IUnknown, IConnectionPointContainer |
IAcPiPropCommandButtonsImpl |
IAcPiPropCommandButtons |
IAcPiPropertyDisplayImpl |
IAcPiPropertyDisplay |
IAcPiCategorizePropertiesImpl |
IAcPiCategorizeProperties |
Some of these templates work with mapping macros. Mapping macros let you specify custom information in a list format, with no need to implement the underlying pure virtual interfaces. This mechanism simplifies the process of coding Properties palette applications. Mapping macros for the following template classes are declared in the opmimp.h file:
IAcPiCategorizePropertiesImpl uses two maps: one for categories based on IAcPiCategorizeProperties, and another for per-category command buttons.