CADability dotNET
The Action type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Action |
Creates a new Action and sets some default.
|
Methods
Name | Description | |
---|---|---|
AutoRepeat |
Defines, whether this Action should be repeated after it was removed. The default
implementation returns false, override it if you want a different behaviour.
| |
AutoRepeated |
Called before OnSetAction()()()() is called, if the action is created by the "autorepeat" machanism.
| |
CurveHitTest |
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.
| |
GetID |
Must be implemented by derived class. Returns an identification string. All CADability actions
return the unique strings like "Draw.Line.TwoPoints" or "Zoom"
| |
GetObjectsUnderCursor |
Returns a list of IGeoObjects that are close to the mouse point
with respect to the current view.
| |
OnActivate |
The action has been activated. From now on it will receive calls of the mouse event methods
like OnMouseMove(MouseEventArgs, IView).
| |
OnCommand |
Override if you want to process menu commands with your action.
Default implementation always returns false.
| |
OnDelete()()()() |
This method will be called when the user presses the delete key. The default
implementation does nothing.
| |
OnDelete(Object) |
This method will be called when the user presses the delete key. The default
implementation does nothing.
| |
OnDisplayChanged |
Zooming or scrolling changed the visible aspect of the current view.
| |
OnEnter()()()() |
This method will be called when the user presses the enter key. The default
implementation does nothing.
| |
OnEnter(Object) |
This method will be called when the user presses the enter key. The default
implementation does nothing.
| |
OnEscape()()()() |
This method will be called when the user presses the escape key. The default
implementation does nothing.
| |
OnEscape(Object) |
This method will be called when the user presses the escape key. The default
implementation does nothing.
| |
OnInactivate |
The action has been inactivated. No more calls to the mouse events will appear.
| |
OnMouseDown |
Override this method to react on the MouseDown event.
| |
OnMouseEnter |
Override this method to react on the MouseEnter event.
| |
OnMouseHover |
Override this method to react on the MouseHover event.
| |
OnMouseLeave |
Override this method to react on the MouseLeave event.
| |
OnMouseMove |
Override this method to react on the MouseMove event.
| |
OnMouseUp |
Override this method to react on the MouseUp event.
| |
OnMouseWheel |
Override this method to react on the MouseWheel event.
| |
OnRemoveAction |
Last event that is called when the action is removed from the action stack.
| |
OnSetAction |
First event that is called when the action is set via SetAction(Action) | |
OnUpdateCommand |
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
| |
OnViewsChanged |
Will be called if new views (LayoutView or ModelView) are created
or removed from the project. Default implementation does nothing.
| |
RemoveThisAction |
Removes this action from the action stack if this action is on top of the action stack
| |
SetCursor(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) | |
SetCursor(SnapPointFinder..::..DidSnapModes, String) |
Sets the cursor name for different snap situation. The CursorTable
contains the resources of the named cursors.
| |
SnapPoint(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.
| |
SnapPoint(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.
| |
WorldDirection |
Returns a 3D vector in the world coordinate system corresponding to the given angle
in the active drawing plane.
| |
WorldLength |
Coverts the given length in pixel (screen) coordinates to w length in the model
coordinate system of the active view
| |
WorldPoint(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
| |
WorldPoint(GeoPoint2D) |
Returns a 3D point in the world coordinate system corresponding to the given 2D point
in the active drawing plane.
| |
WorldPoint(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
Name | Description | |
---|---|---|
CurrentMouseView |
The view from which the last OnMouseMove/Up/Down was evoked
| |
IgnoreForSnap |
a list of objects that are not considered when snapping is resolved. Usually the
object currently under construction (if any) is in this list.
| |
MenuId |
Contains the menu id of the command that invoked this action. used in OnUpdateCommand(String, CommandState).
| |
OnlyThisModel |
If OnlyThisModel is not null, only those mouseevents are forwarded which come from a view
that presents this model.
| |
OnlyThisView |
If OnlyThisView is not null, only those mouseevents are forwarded which come from this view.
| |
UseFilter |
Use the active filter objects of the project for adjusting the mouse position (snap etc.)
| |
ViewType |
If ViewType is not null, only those mouseevents are forwarded which come from a view
of that type.
|
Properties
Name | Description | |
---|---|---|
ActiveDrawingPlane |
Returns the active drawing plane, that is the drawing plane of the active view.
| |
AutoCursor |
true: this class takes responsibility for setting the cursor,
false: the derived class manages the cursor.
| |
ChangeTabInControlCenter |
true: this class may change the selection in the control center
false: this class may not change the selection in the control center
| |
CurrentMousePosition |
Returns the current mouse position.
| |
FeedBack |
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.
| |
Frame |
Returns the frame (IFrame) of the context of this action. The frame also gives
access to the project.
| |
IsActive |
Checks, whether this action is the currently active action
| |
WorksOnLayoutView |
Determins, wether this action can work on a LayoutView. Default implementation
returns false. Override, if your Action can work on a LayoutView.
|