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
ToModifyGeoVectorPropertyProperty to modify
basePointGeoPointA 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
ToModifyGeoVectorPropertyProperty to modify
basePointGeoPointThe start point of the vector in model coordinates; the vector is the (snapped) mouse position minus this point
ignoreSnapIGeoObjectObject not to snap to, may be null
Fields
UserData
UserData to differentiate between multiple GeneralGeoVectorActions.
public UserData UserData
Field Value
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
OnEnter()
This method will be called when the user presses the enter key. The default implementation does nothing.
public override bool OnEnter()
Returns
OnEscape()
This method will be called when the user presses the escape key. The default implementation does nothing.
public override bool OnEscape()
Returns
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
NewActiveActionActionthe action that will become active
RemovingActionbooltrue: 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
eMouseEventArgsMouseEventArgs of the call
vwIViewthe 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
eMouseEventArgsMouseEventArgs of the call
vwIViewthe 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