InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICursorProvider Class Referenceabstract

#include <ICursorProvider.h>

Inheritance diagram for ICursorProvider:
IPMUnknownCCursorProviderCToolCursorProviderSnapCursorProvider

Public Types

enum  { kDefaultIID = IID_ICURSORPROVIDER }
 

Public Member Functions

virtual CursorSpec GetCursor (IControlView *viewUnderMouse, const SysPoint globalLocation, ICursorMgr::eCursorModifierState modifiers) const =0
 
virtual bool16 LocationAffectsCursor (SysRgn cursorRgn) const =0
 
virtual bool16 ModifiersAffectCursor (SysRgn cursorRgn) const =0
 
virtual bool16 HasLockedState () const =0
 
virtual void SetSingleCursor (const CursorSpec &)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Provides an interface for obtaining cursors while tracking the mouse. Used by the application, to figure out how to set the mouse cursor, and used by the windows, views, and tools to provide the cursors that should be used for different areas of the screen.

See Also
also ICursorMgr, ICursorRegion

Member Function Documentation

virtual CursorSpec ICursorProvider::GetCursor (IControlViewviewUnderMouse,
const SysPoint globalLocation,
ICursorMgr::eCursorModifierState modifiers 
) const
pure virtual

Called when mouse enters a region assigned to this provider, returns the CursorSpec describing the cursor to be displayed. This method is also called periodically if the provider requests additional control by returning kTrue from either of the methods below.

Parameters
viewUnderMouseIN view the cursor is currently over
globalLocationIN current location of mouse
modifiersIN state of keyboard modifiers
Returns
CursorSpec describing the cursor to be displayed

Implemented in CToolCursorProvider, SnapCursorProvider, and CCursorProvider.

virtual bool16 ICursorProvider::HasLockedState () const
pure virtual

Called to determine if this provider can be affected by the tool lock state, used for read-only or locked pubs. Most tools can be locked, however, some like the zoom tool cannot.

Returns
kTrue if this provider can be affected by the tool lock state, kFalse otherwise

Implemented in CCursorProvider, and CToolCursorProvider.

virtual bool16 ICursorProvider::LocationAffectsCursor (SysRgn cursorRgn) const
pure virtual

Called to determine if cursor can be affected by mouse location when in the given region. If true, GetCursor will be called whenever the mouse moves while inside the region assigned to this provider.

Parameters
cursorRgnIN
Returns
kTrue if cursor can be affected by mouse location, kFalse otherwise

Implemented in CCursorProvider.

virtual bool16 ICursorProvider::ModifiersAffectCursor (SysRgn cursorRgn) const
pure virtual

Called to determine if cursor can be affected by modifier keys when in the given region. If true, GetCursor will be called periodically whenever the modifiers change while the mouse is inside the region assigned to this provider.

Parameters
cursorRgnIN
Returns
kTrue if cursor can be affected by modifier keys when in the given region, kFalse otherwise

Implemented in CToolCursorProvider, and CCursorProvider.

virtual void ICursorProvider::SetSingleCursor (const CursorSpec)
pure virtual

Called to set the single cursor that the simplest type of cursor providers return This call will assert if used on non-simple providers, know your provider!

Parameters
cursorIN the sursor spec to be used

Implemented in CCursorProvider.