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

#include <AcquireModalCursor.h>

Inheritance diagram for AcquireModalDialogCursor:
BaseAcquireModalCursor

Public Member Functions

 AcquireModalDialogCursor (const CursorSpec &newspec, int16 restoreCursor=ICursorMgr::kRestorePreviousCursor)
 
 AcquireModalDialogCursor (int16 restoreCursor=ICursorMgr::kRestorePreviousCursor)
 
virtual ~AcquireModalDialogCursor ()
 
virtual void ChangeCursor (const CursorSpec &newspec)
 

Protected Attributes

ModalCursorTicket fTicket
 
ICursorMgrfCursorMgr
 

Detailed Description

Helper object used to acquire, manipulate, and release the cursor for Modal Dialogs.

The only difference between this class and AcquireModalCursor above, it that this one will override an existing AcquireWaitCursor.

Since if a modal dialog appears in the middle of a long running command, it needs to be able to set it's cursor over that of say

a progress bar.



This helper can be either stack or heap allocated depending on how far flung the two ends of the cursor modality are. 

If it all happens within the body of a single function or single function call chain, then stack based is preferred. 

If the start and end are in separate functions, then heap based should be used.

Constructor & Destructor Documentation

AcquireModalDialogCursor::AcquireModalDialogCursor (const CursorSpecnewspec,
int16 restoreCursor = ICursorMgr::kRestorePreviousCursor 
)

Installs the modal cursor - superceding an active busy cursor if necessary.

AcquireModalDialogCursor::AcquireModalDialogCursor (int16 restoreCursor = ICursorMgr::kRestorePreviousCursor)

Installs a modal arrow cursor - superceding an active busy cursor if necessary.

virtual AcquireModalDialogCursor::~AcquireModalDialogCursor ()
virtual

Removes the modal cursor, and restores the previous cursor or recomputes a new one.

Member Function Documentation

virtual void AcquireModalDialogCursor::ChangeCursor (const CursorSpecnewspec)
virtual

Sets the cursor

Implements BaseAcquireModalCursor.