Table of Contents

Class GeneralGeoVectorAction

Namespace
CADability.Actions
Assembly
CADability.dll

Simple Action to modify a GeoVector. This action doesn't set up an own ControlCenter entry but assumes there is a GeoVectorProperty entry active in the ControlCenter.

public class GeneralGeoVectorAction : Action, ICommandHandler
Inheritance
GeneralGeoVectorAction
Implements
Inherited Members

Constructors

GeneralGeoVectorAction(GeoVectorProperty, GeoPoint)

Constructs a GeneralGeoVectorAction to modify the provided GeoVectorProperty

public GeneralGeoVectorAction(GeoVectorProperty ToModify, GeoPoint basePoint)

Parameters

ToModify GeoVectorProperty

Property to modify

basePoint GeoPoint

A basePoint for the modification

GeneralGeoVectorAction(GeoVectorProperty, GeoPoint, IGeoObject)

Constructs a GeneralGeoVectorAction to modify the provided GeoVectorProperty and excludes ignoreSnap from the snapping, which is usually the object that is being modified.

public GeneralGeoVectorAction(GeoVectorProperty ToModify, GeoPoint basePoint, IGeoObject ignoreSnap)

Parameters

ToModify GeoVectorProperty

Property to modify

basePoint GeoPoint

The start point of the vector in model coordinates; the vector is the (snapped) mouse position minus this point

ignoreSnap IGeoObject

Object not to snap to, may be null

Fields

UserData

UserData to differentiate between multiple GeneralGeoVectorActions.

public UserData UserData

Field Value

UserData

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

OnEnter()

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

public override bool OnEnter()

Returns

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

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)

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

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()

Events

SetGeoVectorEvent

Event beeing called when the property changes. You don't need to specify a handler here because GeoVectorProperty.SetGeoVector is beeing called.

public event GeneralGeoVectorAction.SetGeoVectorDelegate SetGeoVectorEvent

Event Type

GeneralGeoVectorAction.SetGeoVectorDelegate