CADability dotNET

The Action type exposes the following members.

Constructors

  NameDescription
Protected methodAction
Creates a new Action and sets some default.

Methods

  NameDescription
Public methodAutoRepeat
Defines, whether this Action should be repeated after it was removed. The default implementation returns false, override it if you want a different behaviour.
Public methodAutoRepeated
Called before OnSetAction()()()() is called, if the action is created by the "autorepeat" machanism.
Public methodCurveHitTest
Detects whether a given curve (ICurve) is touched by the cursor position given in mousePoint in respect to the active view. The setting "Select.Pick" gives the maximum pixel distance for the test.
Public methodGetID
Must be implemented by derived class. Returns an identification string. All CADability actions return the unique strings like "Draw.Line.TwoPoints" or "Zoom"
Public methodGetObjectsUnderCursor
Returns a list of IGeoObjects that are close to the mouse point with respect to the current view.
Public methodOnActivate
The action has been activated. From now on it will receive calls of the mouse event methods like OnMouseMove(MouseEventArgs, IView).
Public methodOnCommand
Override if you want to process menu commands with your action. Default implementation always returns false.
Public methodOnDelete()()()()
This method will be called when the user presses the delete key. The default implementation does nothing.
Public methodOnDelete(Object)
This method will be called when the user presses the delete key. The default implementation does nothing.
Public methodOnDisplayChanged
Zooming or scrolling changed the visible aspect of the current view.
Public methodOnEnter()()()()
This method will be called when the user presses the enter key. The default implementation does nothing.
Public methodOnEnter(Object)
This method will be called when the user presses the enter key. The default implementation does nothing.
Public methodOnEscape()()()()
This method will be called when the user presses the escape key. The default implementation does nothing.
Public methodOnEscape(Object)
This method will be called when the user presses the escape key. The default implementation does nothing.
Public methodOnInactivate
The action has been inactivated. No more calls to the mouse events will appear.
Public methodOnMouseDown
Override this method to react on the MouseDown event.
Public methodOnMouseEnter
Override this method to react on the MouseEnter event.
Public methodOnMouseHover
Override this method to react on the MouseHover event.
Public methodOnMouseLeave
Override this method to react on the MouseLeave event.
Public methodOnMouseMove
Override this method to react on the MouseMove event.
Public methodOnMouseUp
Override this method to react on the MouseUp event.
Public methodOnMouseWheel
Override this method to react on the MouseWheel event.
Public methodOnRemoveAction
Last event that is called when the action is removed from the action stack.
Public methodOnSetAction
First event that is called when the action is set via SetAction(Action)
Public methodOnUpdateCommand
Override if you also override OnCommand(String) to manipulate the appearance of the corresponding menu item or the state of the toolbar button. The default implementation checks whether the MenuId from the parameter corresponds to the menuId member variable and checks the item if appropriate
Public methodOnViewsChanged
Will be called if new views (LayoutView or ModelView) are created or removed from the project. Default implementation does nothing.
Public methodRemoveThisAction
Removes this action from the action stack if this action is on top of the action stack
Protected methodSetCursor(SnapPointFinder..::..DidSnapModes, IView)
Sets the cursor int hte provided view according to the provided snap mode. The cursors may be redefined by calling SetCursor(SnapPointFinder..::..DidSnapModes, String)
Public methodSetCursor(SnapPointFinder..::..DidSnapModes, String)
Sets the cursor name for different snap situation. The CursorTable contains the resources of the named cursors.
Public methodSnapPoint(MouseEventArgs, IView, SnapPointFinder..::..DidSnapModes%)
Returns a snap point according to the current snap settings in the given IView. Sets the cursor if AutoCursor is true.
Public methodSnapPoint(MouseEventArgs, GeoPoint, IView, SnapPointFinder..::..DidSnapModes%)
Returns a snap point according to the current snap settings in the given IView with respect to a basepoint. Sets the cursor if AutoCursor is true.
Public methodWorldDirection
Returns a 3D vector in the world coordinate system corresponding to the given angle in the active drawing plane.
Public methodWorldLength
Coverts the given length in pixel (screen) coordinates to w length in the model coordinate system of the active view
Public methodWorldPoint(Point)
Returns a GeoPoint in the model coordinate system that corresponds to the Client point. No snapping is performed. The drawing plane of the projection is used
Public methodWorldPoint(GeoPoint2D)
Returns a 3D point in the world coordinate system corresponding to the given 2D point in the active drawing plane.
Public methodWorldPoint(MouseEventArgs, IView)
Returns a GeoPoint in the model coordinate system that corresponds to the MouseEventArgs point. No snapping is performed. The drawing plane of the projection is used

Fields

  NameDescription
Protected fieldCurrentMouseView
The view from which the last OnMouseMove/Up/Down was evoked
Protected fieldIgnoreForSnap
a list of objects that are not considered when snapping is resolved. Usually the object currently under construction (if any) is in this list.
Protected fieldMenuId
Contains the menu id of the command that invoked this action. used in OnUpdateCommand(String, CommandState).
Protected fieldOnlyThisModel
If OnlyThisModel is not null, only those mouseevents are forwarded which come from a view that presents this model.
Protected fieldOnlyThisView
If OnlyThisView is not null, only those mouseevents are forwarded which come from this view.
Public fieldUseFilter
Use the active filter objects of the project for adjusting the mouse position (snap etc.)
Protected fieldViewType
If ViewType is not null, only those mouseevents are forwarded which come from a view of that type.

Properties

  NameDescription
Public propertyActiveDrawingPlane
Returns the active drawing plane, that is the drawing plane of the active view.
Public propertyAutoCursor
true: this class takes responsibility for setting the cursor, false: the derived class manages the cursor.
Public propertyChangeTabInControlCenter
true: this class may change the selection in the control center false: this class may not change the selection in the control center
Public propertyCurrentMousePosition
Returns the current mouse position.
Public propertyFeedBack
Provides access to the "feedback" object, which is used to define visual feedback of the action. When objects in a model are modified, you will immediately see the feedback (if this model is visible in a ModelView). But sometimes you need more feedback, like arrows or imtermediate objects that change while the mousinput (or controlcenter input or some other conditions) change. Add those objects to the feedback and they will be displayed immediately.
Public propertyFrame
Returns the frame (IFrame) of the context of this action. The frame also gives access to the project.
Protected propertyIsActive
Checks, whether this action is the currently active action
Public propertyWorksOnLayoutView
Determins, wether this action can work on a LayoutView. Default implementation returns false. Override, if your Action can work on a LayoutView.

See Also