Public Member Functions | |
virtual MCErr MCCOMAPI | QueryInterface (const MCIID &riid, void **ppvObj) |
virtual uint32 MCCOMAPI | AddRef () |
virtual uint32 MCCOMAPI | Release ()=0 |
virtual MCCOMErr MCCOMAPI | Do () |
virtual MCCOMErr MCCOMAPI | Undo () |
virtual MCCOMErr MCCOMAPI | Redo () |
virtual boolean MCCOMAPI | WillCauseChange () |
virtual boolean MCCOMAPI | CanUndo () |
virtual MCCOMErr MCCOMAPI | GetName (TMCString &name) |
virtual void MCCOMAPI | Track (IMCGraphicContext *gc, int16 stage, TMCPoint &first, TMCPoint &prev, TMCPoint &cur, boolean moved, IShMouseAction **nextAction) |
virtual void MCCOMAPI | TrackEx (IMCGraphicContext *gc, int16 stage, const TMFTabletMouseSample &first, const TMFTabletMouseSample &prev, const TMFTabletMouseSample &cur, boolean moved, IShMouseAction **nextAction) |
virtual MCCOMErr MCCOMAPI | Feedback (IMCGraphicContext *gc, int16 stage, const TMCPoint &first, const TMCPoint &prev, const TMCPoint &cur, boolean moved, boolean show) |
virtual void MCCOMAPI | GetPartToRedraw (IMFPart **outPart, int32 stage) |
virtual MCCOMErr MCCOMAPI | Constrain (IMCGraphicContext *gc, int16 stage, const TMCPoint &first, const TMCPoint &prev, TMCPoint &cur, boolean moved) |
virtual boolean MCCOMAPI | NeedsToPrepareMenus (void) |
virtual boolean MCCOMAPI | ConstrainedToView (void) |
virtual boolean MCCOMAPI | IsPerpetualMouseAction (void) |
virtual boolean MCCOMAPI | ShouldHideCursor (void) |
virtual boolean MCCOMAPI | ShouldAutoScroll (void) |
virtual boolean MCCOMAPI | KeepTracking () |
virtual boolean MCCOMAPI | WantsTabletTracking () |
Basic Mouse Action class. Derive from this for a default implementation of an IShMouseAction
virtual uint32 MCCOMAPI TBasicMouseAction::AddRef | ( | ) | [inline, virtual] |
Increments the reference count of the object
Reimplemented from TBasicUnknown.
virtual boolean MCCOMAPI TBasicMouseAction::CanUndo | ( | ) | [virtual] |
Returns true if the action is undoable. If CanUndo() returns false, Undo() and Redo() should return MC_E_NOTIMPL and do nothing.
Implements IShMouseAction.
virtual MCCOMErr MCCOMAPI TBasicMouseAction::Constrain | ( | IMCGraphicContext * | gc, | |
int16 | stage, | |||
const TMCPoint & | first, | |||
const TMCPoint & | prev, | |||
TMCPoint & | cur, | |||
boolean | moved | |||
) | [virtual] |
Use this method to constrain the 'cur' position to a value, before Track() is called
gc | Graphic context for the mouse action | |
stage | kShBeginTracking, kShContinueTracking, or kShEndTracking. Tells the function what stage of tracking we're in. | |
first | Initial mouse position when this action started tracking | |
prev | Previous mouse position from the previous call of Track() | |
cur | Current mouse position - also returns constrained current mouse position | |
moved | Pass true here if the mouse has moved since the last call to Track() |
Implements IShMouseAction.
virtual boolean MCCOMAPI TBasicMouseAction::ConstrainedToView | ( | void | ) | [virtual] |
Implements IShMouseAction.
virtual MCCOMErr MCCOMAPI TBasicMouseAction::Do | ( | ) | [virtual] |
Function called to actually perform the action.
Implements IShMouseAction.
virtual MCCOMErr MCCOMAPI TBasicMouseAction::Feedback | ( | IMCGraphicContext * | gc, | |
int16 | stage, | |||
const TMCPoint & | first, | |||
const TMCPoint & | prev, | |||
const TMCPoint & | cur, | |||
boolean | moved, | |||
boolean | show | |||
) | [virtual] |
Allows the action to draw things related to the tracking. Feedback() is called for the first time right before the first call of Track(kShBeginTracking), and then Feedback() is called right after each call to Track().
gc | Graphic context for the mouse action | |
stage | kShBeginTracking, kShContinueTracking, or kShEndTracking. Tells the function what stage of tracking we're in. | |
first | Initial mouse position when this action started tracking | |
prev | Previous mouse position from the previous call of Track() | |
cur | Current mouse position | |
moved | Pass true here if the mouse has moved since the last call to Track() | |
show | Pass false here to bypass any drawing, or true to enable drawing. |
Implements IShMouseAction.
Return the name to display in the undo/redo list.
name | The name of the action |
Implements IShMouseAction.
virtual void MCCOMAPI TBasicMouseAction::GetPartToRedraw | ( | IMFPart ** | outPart, | |
int32 | stage | |||
) | [virtual] |
Gives the action the opportunity to tell the Shell that the returned part should be redrawn after Do/Undo/Redo. Return NULL in outPart if no redraw is needed.
outPart | Returns a pointer to the part that needs to be redrawn after the action runs. | |
stage | Allows you to specify what stage to query for part redraw. kShDoAction, kShUndoAction, kShRedoAction |
Implements IShMouseAction.
virtual boolean MCCOMAPI TBasicMouseAction::IsPerpetualMouseAction | ( | void | ) | [virtual] |
Implements IShMouseAction.
virtual boolean MCCOMAPI TBasicMouseAction::KeepTracking | ( | ) | [virtual] |
Returns false if you do not want the mouse action to perform any tracking. This is useful if you just want to do something on the click.
Implements IShMouseAction.
virtual boolean MCCOMAPI TBasicMouseAction::NeedsToPrepareMenus | ( | void | ) | [virtual] |
Implements IShMouseAction.
virtual MCErr MCCOMAPI TBasicMouseAction::QueryInterface | ( | const MCIID & | riid, | |
void ** | ppvObj | |||
) | [virtual] |
Check if the object supports a given interface and returns a pointer to that interface if it does. Note that QueryInterface will increment the reference count of the object by one if the interface is found.
riid | GUID of the interface | |
ppvObj | A pointer to the pointer being returned. |
Reimplemented from TBasicUnknown.
virtual MCCOMErr MCCOMAPI TBasicMouseAction::Redo | ( | ) | [virtual] |
Called to Redo the action. This can often simply call Do().
Implements IShMouseAction.
virtual uint32 MCCOMAPI TBasicMouseAction::Release | ( | ) | [pure virtual] |
Decrements the reference count of the object. If the reference count reaches zero, the object is destroyed.
Implements IMCUnknown.
virtual boolean MCCOMAPI TBasicMouseAction::ShouldAutoScroll | ( | void | ) | [virtual] |
Implements IShMouseAction.
virtual boolean MCCOMAPI TBasicMouseAction::ShouldHideCursor | ( | void | ) | [virtual] |
Implements IShMouseAction.
virtual void MCCOMAPI TBasicMouseAction::Track | ( | IMCGraphicContext * | gc, | |
int16 | stage, | |||
TMCPoint & | first, | |||
TMCPoint & | prev, | |||
TMCPoint & | cur, | |||
boolean | moved, | |||
IShMouseAction ** | nextAction | |||
) | [virtual] |
Called each time the mouse moves. At least, Track() is called three times (even if the mouse does not move).
gc | Graphic context for the mouse action | |
stage | kShBeginTracking, kShContinueTracking, or kShEndTracking. Tells the function what stage of tracking we're in. | |
first | Initial mouse position when this action started tracking | |
prev | Previous mouse position from the previous call of Track() | |
cur | Current mouse position | |
moved | Pass true here if the mouse has moved since the last call to Track() | |
nextAction | Returns a pointer to the next action whose Track() to call. See note in function description. |
Implements IShMouseAction.
Reimplemented in TSimpleMouseAction.
virtual void MCCOMAPI TBasicMouseAction::TrackEx | ( | IMCGraphicContext * | gc, | |
int16 | stage, | |||
const TMFTabletMouseSample & | first, | |||
const TMFTabletMouseSample & | prev, | |||
const TMFTabletMouseSample & | cur, | |||
boolean | moved, | |||
IShMouseAction ** | nextAction | |||
) | [virtual] |
Called each time the mouse moves when the mouse action is in tablet mode. At least, TrackEx() is called three times (even if the mouse does not move).
gc | Graphic context for the mouse action | |
stage | kShBeginTracking, kShContinueTracking, or kShEndTracking. Tells the function what stage of tracking we're in. | |
first | Initial mouse position when this action started tracking | |
prev | Previous mouse position from the previous call of Track() | |
cur | Current mouse position | |
moved | Pass true here if the mouse has moved since the last call to Track() | |
nextAction | Returns a pointer to the next action whose Track() to call. See note in function description. |
Implements IShMouseAction.
virtual MCCOMErr MCCOMAPI TBasicMouseAction::Undo | ( | ) | [virtual] |
Called to undo the action.
Implements IShMouseAction.
virtual boolean MCCOMAPI TBasicMouseAction::WantsTabletTracking | ( | ) | [virtual] |
Returns true if the mouse action wants to use the tablet tracking.
Implements IShMouseAction.
virtual boolean MCCOMAPI TBasicMouseAction::WillCauseChange | ( | ) | [virtual] |
Implements IShMouseAction.