InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CToolCursorProvider Class Reference

#include <CToolCursorProvider.h>

Inheritance diagram for CToolCursorProvider:
CCursorProviderICursorProviderIPMUnknownSnapCursorProvider

Public Member Functions

 CToolCursorProvider (IPMUnknown *boss)
 
bool16 HasLockedState () const
 
virtual CursorSpec GetCursor (IControlView *viewUnderMouse, const SysPoint globalMouse, ICursorMgr::eCursorModifierState modifiers) const
 
virtual bool16 ModifiersAffectCursor (SysRgn cursorRgn) const
 
- Public Member Functions inherited from CCursorProvider
 CCursorProvider (IPMUnknown *boss)
 
virtual bool16 LocationAffectsCursor (SysRgn cursorRgn) const
 
virtual void SetSingleCursor (const CursorSpec &)
 

Static Public Member Functions

static CursorSpec GetSelectionCursor (IControlView *viewUnderMouse, const SysPoint globalLocation, ICursorMgr::eCursorModifierState modifiers)
 
static CursorSpec GetDirectSelectionCursor (IControlView *viewUnderMouse, const SysPoint globalLocation, ICursorMgr::eCursorModifierState modifiers)
 

Protected Member Functions

virtual SnapType SnapCursor (const SysPoint globalLocation, ICursorMgr::eCursorModifierState modifiers, IControlView *layoutView, SnapFlags snapFlags=ISnapTo::kSnapAllPageMarks) const
 

Additional Inherited Members

- Public Types inherited from ICursorProvider
enum  { kDefaultIID = IID_ICURSORPROVIDER }
 

Detailed Description

Basic implementation of a cursor provider used by a toolbox tool. CToolCursorProvider provides the default behavior for handling special keys in the toolbox and giving the apperance of changing tools. Tool implementors can derive their tool cursor providers either from this or from ICursorProvider.

See Also
ICursorProvider

Member Function Documentation

virtual CursorSpec CToolCursorProvider::GetCursor (IControlViewviewUnderMouse,
const SysPoint globalMouse,
ICursorMgr::eCursorModifierState modifiers 
) const
virtual

Default behavior: handles zoom cursor, open hand cursor, pointer tool toggling, and dynamic selection cursors.

Reimplemented from CCursorProvider.

Reimplemented in SnapCursorProvider.

static CursorSpec CToolCursorProvider::GetDirectSelectionCursor (IControlViewviewUnderMouse,
const SysPoint globalLocation,
ICursorMgr::eCursorModifierState modifiers 
)
static

Dynamic cursor support for the direct selection cursor.

static CursorSpec CToolCursorProvider::GetSelectionCursor (IControlViewviewUnderMouse,
const SysPoint globalLocation,
ICursorMgr::eCursorModifierState modifiers 
)
static

Dynamic cursor support for the selection cursor.

bool16 CToolCursorProvider::HasLockedState () const
virtual

Default behavior: Returns kTrue unless modifiers for zoom cursor or open hand cursor are down.

Reimplemented from CCursorProvider.

virtual bool16 CToolCursorProvider::ModifiersAffectCursor (SysRgn cursorRgn) const
virtual

Default behavior: returns kTrue

Reimplemented from CCursorProvider.

virtual SnapType CToolCursorProvider::SnapCursor (const SysPoint globalLocation,
ICursorMgr::eCursorModifierState modifiers,
IControlViewlayoutView,
SnapFlags snapFlags = ISnapTo::kSnapAllPageMarks 
) const
protectedvirtual

Default behavior: basic tool cursor snapping. Called from certain tool trackers to do a snap to on the global mouse point. Will use the view provided to find the ISnapTo interface, and will use the SnapFlags. Used from the creation tool cursor providers and the place tool cursor providers to give better feedback to the user before the mouse is pressed. The type of snapping performed is returned, and may be used to change the cursor.

Parameters
globalLocationIN global mouse point
modifiersIN event modifiers
layoutViewIN active layoutView
snapFlagsIN what sort of snapping to perform
Returns
what type of snapping (none, X, Y, both).