Class ConstructAction
Base class for construct actions.
Inheritance
System.Object
ConstructAction
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
public abstract class ConstructAction : Action, ICommandHandler, IPropertyEntry
Constructors
|
Improve this Doc
View Source
ConstructAction()
Initializes some properties. Set the properties you need in your constructor.
Declaration
protected ConstructAction()
Fields
|
Improve this Doc
View Source
CurrentMousePoint
The current mouse position for this action
Declaration
public Point CurrentMousePoint
Field Value
| Type |
Description |
| System.Drawing.Point |
|
|
Improve this Doc
View Source
MultiSolution
The ConstructAction may have several solutions. If set to true, the PgUp/PgDown
key will call OnDifferentSolution and the context menue will have appropriate entries.
Declaration
public bool MultiSolution
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
MultiSolutionCount
TheConstruction may have several solutions. If set to a value !=0 the ContextMenu will have
that number of entries and OnSolution() will be called if the user selects one of these
Declaration
public int MultiSolutionCount
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
ShowAttributes
Display the attributes of the active object.
Declaration
public bool ShowAttributes
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TitleId
The title id (resource id) for the title of the action in the control center
Declaration
Field Value
| Type |
Description |
| System.String |
|
Properties
|
Improve this Doc
View Source
ActiveObject
Dieses Objekt wird über der Zeichnung dargestellt. Kann auch auf null gesetzt werden
um kein Objekt (mehr) darzustallen. Mehrere Objekte können nur als Block dargestellt
werden.
Declaration
public IGeoObject ActiveObject { get; set; }
Property Value
|
Improve this Doc
View Source
BasePoint
Sets the BasePoint. This point is needed for some snap modes like the orthogonal snap mode or snap to tangent point. As long as this
point is not set, these snap modes don't work.
Declaration
public GeoPoint BasePoint { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
protected object CurrentInput { get; }
Property Value
| Type |
Description |
| System.Object |
|
|
Improve this Doc
View Source
CurrentMousePosition
returns the last mouse position in model coordinates.
Declaration
public GeoPoint CurrentMousePosition { get; }
Property Value
|
Improve this Doc
View Source
DisassembleBlock
Declaration
public bool DisassembleBlock { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
FeedBack
Gets the container that handles feedback objects (see ActionFeedBack).
Declaration
public ActionFeedBack FeedBack { get; }
Property Value
|
Improve this Doc
View Source
IsBackgroundTaskActive
Declaration
protected bool IsBackgroundTaskActive { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
LastSnapMode
Returns the last snap mode, i.e. the reason why the snap took place. E.g. did snap to an endpoint or did snap to
the surface of a face.
Declaration
public SnapPointFinder.DidSnapModes LastSnapMode { get; }
Property Value
|
Improve this Doc
View Source
LastSnapObject
Returns the GeoObject which was involved in the last snap operation. May be null;
Declaration
public IGeoObject LastSnapObject { get; }
Property Value
|
Improve this Doc
View Source
ShowActiveObject
Declaration
public bool ShowActiveObject { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
|
Improve this Doc
View Source
AutoRepeat()
Detremins whether this action supports autorepeat. Autorepeat is enabled
in the GlobalSettings.
Declaration
public override bool AutoRepeat()
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
CancelBackgroundTask()
Declaration
protected void CancelBackgroundTask()
|
Improve this Doc
View Source
ClearBasePoint()
Declaration
public void ClearBasePoint()
|
Improve this Doc
View Source
FindShape(GeoPoint, Plane)
Tries to find a CompoundShape that encloses the point p on the plane plane.
Declaration
public CompoundShape FindShape(GeoPoint p, Plane plane)
Parameters
| Type |
Name |
Description |
| GeoPoint |
p |
Point in the inside of the requested shape
|
| Plane |
plane |
Plane in which the search should happen
|
Returns
|
Improve this Doc
View Source
FindTangentialPoint(MouseEventArgs, IView, out GeoPoint)
Additional posibility for the derived action to specify a tangential point
besides the tangential point from the base point
Declaration
protected virtual bool FindTangentialPoint(MouseEventArgs e, IView vw, out GeoPoint found)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Finish()
Explicitly finish this action. OnDone will be called.
Declaration
|
Improve this Doc
View Source
KeepAsLastStyle(IGeoObject)
Sets the Styleof the provided GeoObject go as the last style.
If new objects are created with construct method and last style is used, this style will be used.
Declaration
protected virtual void KeepAsLastStyle(IGeoObject go)
Parameters
| Type |
Name |
Description |
| IGeoObject |
go |
Object to get the style from
|
|
Improve this Doc
View Source
MayFinish()
Declaration
protected virtual bool MayFinish()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
OnActivate(Action, Boolean)
Declaration
public override void OnActivate(Action OldActiveAction, bool SettingAction)
Parameters
| Type |
Name |
Description |
| Action |
OldActiveAction |
|
| System.Boolean |
SettingAction |
|
Overrides
|
Improve this Doc
View Source
OnCommand(String)
Handles a few context menu commands. Don't forget to call the base implementation
if you override this method. See ICommandHandler.
Declaration
public override bool OnCommand(string MenuId)
Parameters
| Type |
Name |
Description |
| System.String |
MenuId |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
OnDifferentSolution(Boolean)
Will be called when MultiSolution is true and the user presses the PgUp/PgDown key
or selects the appropriate entries of the context menu. Override this
method to implement a multi-solution construction. Default implementation
is empty.
Declaration
public virtual void OnDifferentSolution(bool next)
Parameters
| Type |
Name |
Description |
| System.Boolean |
next |
true: forward, false: backward
|
|
Improve this Doc
View Source
OnDone()
Called, when the ConstructAction is done, i.e. all non-optional inputs
have been fixed. The default implementation adds the active object (if it exists)
to the active model and removes this action. Override this method if you need
a different behaviour.
Declaration
public virtual void OnDone()
|
Improve this Doc
View Source
OnEnter()
Declaration
public override bool OnEnter()
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
OnEnter(Object)
Overrides OnEnter(). Usually you don't override this
method, but handle the appropriate events of the input objects.
Declaration
public override bool OnEnter(object sender)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
OnEscape()
Declaration
public override bool OnEscape()
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
OnEscape(Object)
Overrides OnEscape(). Usually you don't override this
method, but handle the appropriate events of the input objects.
Declaration
public override bool OnEscape(object sender)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
OnInactivate(Action, Boolean)
Declaration
public override void OnInactivate(Action NewActiveAction, bool RemovingAction)
Parameters
| Type |
Name |
Description |
| Action |
NewActiveAction |
Action.OnInactivate.NewActiveAction.OnInactivate.NewActiveAction
|
| System.Boolean |
RemovingAction |
Action.OnInactivate.RemovingAction.OnInactivate.RemovingAction
|
Overrides
|
Improve this Doc
View Source
OnMouseDown(MouseEventArgs, IView)
Declaration
public override void OnMouseDown(MouseEventArgs e, IView vw)
Parameters
| Type |
Name |
Description |
| MouseEventArgs |
e |
Action.OnMouseDown.e.OnMouseDown.e
|
| IView |
vw |
Action.OnMouseDown.vw.OnMouseDown.vw
|
Overrides
|
Improve this Doc
View Source
OnMouseLeave(EventArgs, IView)
Declaration
public override void OnMouseLeave(EventArgs e, IView vw)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
|
| IView |
vw |
|
Overrides
|
Improve this Doc
View Source
OnMouseMove(MouseEventArgs, IView)
Declaration
public override void OnMouseMove(MouseEventArgs e, IView vw)
Parameters
| Type |
Name |
Description |
| MouseEventArgs |
e |
Action.OnMouseMove.e.OnMouseMove.e
|
| IView |
vw |
Action.OnMouseMove.vw.OnMouseMove.vw
|
Overrides
|
Improve this Doc
View Source
OnMouseUp(MouseEventArgs, IView)
Declaration
public override void OnMouseUp(MouseEventArgs e, IView vw)
Parameters
| Type |
Name |
Description |
| MouseEventArgs |
e |
Action.OnMouseUp.e.OnMouseUp.e
|
| IView |
vw |
Action.OnMouseUp.vw.OnMouseUp.vw
|
Overrides
|
Improve this Doc
View Source
OnRemoveAction()
Implements OnRemoveAction(). If you override this method
don't forget to call the bas implementation.
Declaration
public override void OnRemoveAction()
Overrides
|
Improve this Doc
View Source
OnSetAction()
Implements OnSetAction(). If you override this method
don't forget to call the base implementation.
Declaration
public override void OnSetAction()
Overrides
|
Improve this Doc
View Source
OnSolution(Int32)
Will be called when MultiSolution is true and the user presses the PgUp/PgDown key
or selects the appropriate entries of the context menu. Override this
method to implement a multi-solution construction. Default implementation
is empty.
Declaration
public virtual void OnSolution(int solutionNumber)
Parameters
| Type |
Name |
Description |
| System.Int32 |
solutionNumber |
the 0-based number of solution
|
|
Improve this Doc
View Source
OnTab(Object)
The tab key was pressed: select the next input field, also accept optional fields
Declaration
public override bool OnTab(object sender)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
OnUpdateCommand(String, CommandState)
Declaration
public override bool OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
| Type |
Name |
Description |
| System.String |
MenuId |
|
| CommandState |
CommandState |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
OnViewsChanged()
Declaration
public override void OnViewsChanged()
Overrides
|
Improve this Doc
View Source
SetFocus(Object, Boolean)
Sets the input focus to the given input object. The input object must be one of those
given in the SetInput(Object[]) method.
Declaration
public void SetFocus(object InputObject, bool ActivateMouse)
Parameters
| Type |
Name |
Description |
| System.Object |
InputObject |
Input object which should become active
|
| System.Boolean |
ActivateMouse |
Mouse actions also apply to this input object
|
|
Improve this Doc
View Source
Declaration
public void SetInput(params object[] TheInput)
Parameters
| Type |
Name |
Description |
| System.Object[] |
TheInput |
Objects specifying the input parameters of this action
|
|
Improve this Doc
View Source
SnapPoint(MouseEventArgs, GeoPoint, IView, out SnapPointFinder.DidSnapModes)
Declaration
public virtual GeoPoint SnapPoint(MouseEventArgs e, GeoPoint basePoint, IView vw, out SnapPointFinder.DidSnapModes DidSnap)
Parameters
Returns
|
Improve this Doc
View Source
SnapPoint(MouseEventArgs, IView, out SnapPointFinder.DidSnapModes)
Gets a point from the MouseEventArgs and the view. The point will be in the appropriate
model and will be snapped according to the views snap setting.
Declaration
public virtual GeoPoint SnapPoint(MouseEventArgs e, IView vw, out SnapPointFinder.DidSnapModes DidSnap)
Parameters
Returns
| Type |
Description |
| GeoPoint |
point in model space
|
|
Improve this Doc
View Source
StartBackgroundTask(Delegate, Delegate, Object[])
Declaration
protected void StartBackgroundTask(Delegate MethodToInvoke, Delegate CallbackOnDone, params object[] invokeParameters)
Parameters
| Type |
Name |
Description |
| System.Delegate |
MethodToInvoke |
|
| System.Delegate |
CallbackOnDone |
|
| System.Object[] |
invokeParameters |
|
|
Improve this Doc
View Source
WaitForBackgroundTask()
Declaration
protected void WaitForBackgroundTask()
Events
|
Improve this Doc
View Source
ActionDoneEvent
Event that is fired when this action is done. If your class is derived from ConstructAction you
better override OnDone().
Declaration
public event ConstructAction.ActionDoneDelegate ActionDoneEvent
Event Type
|
Improve this Doc
View Source
StateChangedEvent
Declaration
public event PropertyEntryChangedStateDelegate StateChangedEvent
Event Type
Explicit Interface Implementations
|
Improve this Doc
View Source
IPropertyEntry.Added(IPropertyPage)
Declaration
void IPropertyEntry.Added(IPropertyPage pp)
Parameters
|
Improve this Doc
View Source
IPropertyEntry.ButtonClicked(PropertyEntryButton)
Declaration
void IPropertyEntry.ButtonClicked(PropertyEntryButton button)
Parameters
|
Improve this Doc
View Source
Declaration
MenuWithHandler[] IPropertyEntry.ContextMenu { get; }
Returns
|
Improve this Doc
View Source
IPropertyEntry.DeferUpdate
Declaration
bool IPropertyEntry.DeferUpdate { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IPropertyEntry.EditTextChanged(String)
Declaration
bool IPropertyEntry.EditTextChanged(string newValue)
Parameters
| Type |
Name |
Description |
| System.String |
newValue |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IPropertyEntry.EndEdit(Boolean, Boolean, String)
Declaration
void IPropertyEntry.EndEdit(bool aborted, bool modified, string newValue)
Parameters
| Type |
Name |
Description |
| System.Boolean |
aborted |
|
| System.Boolean |
modified |
|
| System.String |
newValue |
|
|
Improve this Doc
View Source
IPropertyEntry.Flags
Declaration
PropertyEntryType IPropertyEntry.Flags { get; }
Returns
|
Improve this Doc
View Source
IPropertyEntry.GetDropDownList()
Declaration
string[] IPropertyEntry.GetDropDownList()
Returns
| Type |
Description |
| System.String[] |
|
|
Improve this Doc
View Source
IPropertyEntry.IndentLevel
Declaration
int IPropertyEntry.IndentLevel { get; set; }
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
IPropertyEntry.Index
Declaration
int IPropertyEntry.Index { get; set; }
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
IPropertyEntry.IsOpen
Declaration
bool IPropertyEntry.IsOpen { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IPropertyEntry.Label
Declaration
string IPropertyEntry.Label { get; }
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
IPropertyEntry.ListBoxSelected(Int32)
Declaration
void IPropertyEntry.ListBoxSelected(int selectedIndex)
Parameters
| Type |
Name |
Description |
| System.Int32 |
selectedIndex |
|
|
Improve this Doc
View Source
IPropertyEntry.Opened(Boolean)
Declaration
void IPropertyEntry.Opened(bool isOpen)
Parameters
| Type |
Name |
Description |
| System.Boolean |
isOpen |
|
|
Improve this Doc
View Source
IPropertyEntry.OpenOrCloseSubEntries()
Declaration
int IPropertyEntry.OpenOrCloseSubEntries()
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
IPropertyEntry.Parent
Declaration
object IPropertyEntry.Parent { get; set; }
Returns
| Type |
Description |
| System.Object |
|
|
Improve this Doc
View Source
IPropertyEntry.PropertyEntryChangedStateEvent
Declaration
event PropertyEntryChangedStateDelegate IPropertyEntry.PropertyEntryChangedStateEvent
Returns
|
Improve this Doc
View Source
IPropertyEntry.ReadOnly
Declaration
bool IPropertyEntry.ReadOnly { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IPropertyEntry.Removed(IPropertyPage)
Declaration
void IPropertyEntry.Removed(IPropertyPage pp)
Parameters
|
Improve this Doc
View Source
IPropertyEntry.ResourceId
Declaration
string IPropertyEntry.ResourceId { get; }
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
IPropertyEntry.Select()
Declaration
void IPropertyEntry.Select()
|
Improve this Doc
View Source
IPropertyEntry.Selected(IPropertyEntry)
Declaration
void IPropertyEntry.Selected(IPropertyEntry previousSelected)
Parameters
|
Improve this Doc
View Source
IPropertyEntry.StartEdit(Boolean)
Declaration
void IPropertyEntry.StartEdit(bool editValue)
Parameters
| Type |
Name |
Description |
| System.Boolean |
editValue |
|
|
Improve this Doc
View Source
IPropertyEntry.SubItems
Declaration
IPropertyEntry[] IPropertyEntry.SubItems { get; }
Returns
|
Improve this Doc
View Source
IPropertyEntry.UnSelected(IPropertyEntry)
Declaration
void IPropertyEntry.UnSelected(IPropertyEntry nowSelected)
Parameters
|
Improve this Doc
View Source
IPropertyEntry.Value
Declaration
string IPropertyEntry.Value { get; }
Returns
| Type |
Description |
| System.String |
|
Implements