Table of Contents

Class ZoomAction

Namespace
CADability.Actions
Assembly
CADability.dll

The interactive zoom action ("zoom window"): the user clicks the first corner of a rectangle in a view (a cross hair follows the mouse) and then the opposite corner (the rectangle is drawn while the mouse moves); the view is zoomed so that the rectangle fills it. Only the view in which the first point was set is zoomed. Id: "Zoom[LeaveSelectProperties]".

public class ZoomAction : Action, ICommandHandler, IIntermediateConstruction
Inheritance
ZoomAction
Implements
Inherited Members

Constructors

ZoomAction()

Creates the zoom action in its inactive state. Start it with SetAction(Action).

public ZoomAction()

Methods

GetID()

Must be implemented by derived class. Returns an identification string. All CADability actions return the unique strings like "Draw.Line.TwoPoints" or "Zoom"

public override string GetID()

Returns

string

the identification of the action

OnActivate(Action, bool)

Implements OnActivate(Action, bool). If you override this method don't forget to call the bas implementation.

public override void OnActivate(Action OldActiveAction, bool SettingAction)

Parameters

OldActiveAction Action
SettingAction bool

OnEscape()

This method will be called when the user presses the escape key. The default implementation does nothing.

public override bool OnEscape()

Returns

bool

OnInactivate(Action, bool)

Implements OnInactivate(Action, bool). If you override this method don't forget to call the bas implementation.

public override void OnInactivate(Action NewActiveAction, bool RemovingAction)

Parameters

NewActiveAction Action

the action that will become active

RemovingAction bool

true: if called because the action is removed, false: if called when a new action is set on top of this action

OnMouseDown(MouseEventArgs, IView)

Implements OnMouseDown(MouseEventArgs, IView). If you override this method don't forget to call the bas implementation.

public override void OnMouseDown(MouseEventArgs e, IView vw)

Parameters

e MouseEventArgs

MouseEventArgs of the call

vw IView

the IView which contains the mouse

OnMouseMove(MouseEventArgs, IView)

Implements OnMouseMove(MouseEventArgs, IView). If you override this method don't forget to call the bas implementation.

public override void OnMouseMove(MouseEventArgs e, IView vw)

Parameters

e MouseEventArgs

MouseEventArgs of the call

vw IView

the IView which contains the mouse

OnMouseUp(MouseEventArgs, IView)

Override this method to react on the MouseUp event.

public override void OnMouseUp(MouseEventArgs e, IView vw)

Parameters

e MouseEventArgs

MouseEventArgs of the call

vw IView

the IView which contains the mouse

OnRemoveAction()

Last event that is called when the action is removed from the action stack.

public override void OnRemoveAction()

OnSetAction()

Implements OnSetAction(). If you override this method don't forget to call the bas implementation.

public override void OnSetAction()