#include <ILayoutControlViewHelper.h>
|
| enum | { kDefaultIID = IID_ILAYOUTCONTROLVIEWHELPER } |
| |
Helper routines for performing page item hit-testing. This interface is installed on kLayoutWidgetBoss and kTextEditorBoss.
| virtual IPMUnknown* ILayoutControlViewHelper::QueryHitTestPageItemNew | ( | const PBPMPoint & | where, | | | const ClassID | handlerClass, | | | const PMIID & | interfaceID = IID_IGEOMETRY, | | | int16 | tolerance = kHitTestTolerance | | ) | | |
| pure virtual |
Traverse the current spread's page items in z-order using the Visitor scheme until a successful hit test is found for a page item. Return that item. The Visitor scheme is capable of traversing non-hierarchically related items (such as inlines).
- Parameters
| where | [IN] Hit test location in pasteboard coordinates |
| handlerClass | [IN] Handler class ID to use for hittesting. The handler boss establishes a particular type of behavior for what to do at each type of page item encountered. |
| interfaceID | [IN] Interface ID to check the found item for, defaults to IID_IGEOMETRY. |
| tolerance | [IN] The tolerance for how close 'where' must be to be considered a hit. Defaults to kHitTestTolerance. |
- Returns
- IPMUnknown* Return an interface from the hit item. Nil if no item hit or the found item does not support interfaceID. The reference count is incremented. The caller is responsible for calling Release() or embedding the return value in an appropriate InterfacePtr construct.
- See Also
- GenericID for various kXXXHitTestHandlerBoss definitions
- HitTestDragConstants.h for kHitTestTolerance
| virtual IPMUnknown* ILayoutControlViewHelper::QueryHitTestPageItemOnVisibleSpreadsNew | ( | const PBPMPoint & | where, | | | const ClassID | handlerClass, | | | const PMIID & | interfaceID = IID_IGEOMETRY, | | | int16 | tolerance = kHitTestTolerance | | ) | | |
| pure virtual |
Traverse the page items (in z-order) of each visible spread using the Visitor scheme until a successful hit test is found for a page item. Return that item. The Visitor scheme is capable of traversing non-hierarchically related items (such as inlines).
- Parameters
| where | [IN] Hit test location in pasteboard coordinates |
| handlerClass | [IN] Handler class ID to use for hittesting. The handler boss establishes a particular type of behavior for what to do at each type of page item encountered. |
| interfaceID | [IN] Interface ID to check the found item for, defaults to IID_IGEOMETRY. |
| tolerance | [IN] The tolerance for how close 'where' must be to be considered a hit. Defaults to kHitTestTolerance. |
- Returns
- IPMUnknown* Return an interface from the hit item. Nil if no item hit or the found item does not support interfaceID. The reference count is incremented. The caller is responsible for calling Release() or embedding the return value in an appropriate InterfacePtr construct.
- See Also
- GenericID for various kXXXHitTestHandlerBoss definitions
- HitTestDragConstants.h for kHitTestTolerance