Class ConstructAction.CurveInput
Defines an input object for an action derived from ConstructAction. This input object extpects the user to click on a curve (IGeoObject that also implements ICurve. Pressing enter or TAB or clicking the mouse proceeds to the next input object.
Inherited Members
Namespace: CADability.Actions
Assembly: CADability.dll
Syntax
public class CurveInput : ConstructAction.InputObject, ConstructAction.IInputObject
Constructors
| Improve this Doc View SourceCurveInput(String)
Creates a Curveinput object.
Declaration
public CurveInput(string resourceId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | resourceId | the resource id to specify a string from the StringTable. ResourceId+".Label": the Label left of the edit box. ResourceId+".ShortInfo": a short tooltip text ResourceId+"DetailedInfo": a longer tooltip text. |
Fields
| Improve this Doc View SourceModifiableOnly
true: only curves that may be modified are yielded false: any kind of curves curves are yielded
Declaration
public bool ModifiableOnly
Field Value
| Type | Description |
|---|---|
| System.Boolean |
PreferPath
Prefer path objects instead of single curves (when available)
Declaration
public bool PreferPath
Field Value
| Type | Description |
|---|---|
| System.Boolean |
Properties
| Improve this Doc View SourceDecomposed
true: only decomposed curves are yielded, false: also path objects, that consist of several subcurves are yielded
Declaration
public bool Decomposed { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
FailCursor
Sets the cursor that will be displayed when no curve is hit
Declaration
public string FailCursor { set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ForwardMouseInputTo
Mouse input should be forwarded to another input object and only processed by this input, when the other input object is fixed.
Declaration
public object ForwardMouseInputTo { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object |
HitCursor
Sets the cursor that will be displayed when a curve is hit
Declaration
public string HitCursor { set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceAdjustHighlight()
Declaration
protected override void AdjustHighlight()
Overrides
| Improve this Doc View SourceGetCurves()
Gets the currently selected curves.
Declaration
public ICurve[] GetCurves()
Returns
| Type | Description |
|---|---|
| ICurve[] |
GetSelectedCurve()
Declaration
public ICurve GetSelectedCurve()
Returns
| Type | Description |
|---|---|
| ICurve |
SetContextMenu(String, ICommandHandler)
Declaration
public void SetContextMenu(string menuId, ICommandHandler handler)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | menuId | |
| ICommandHandler | handler |
SetCurves(ICurve[], ICurve)
Forces the given curves to be displayed
Declaration
public void SetCurves(ICurve[] curves, ICurve selectedCurve)
Parameters
| Type | Name | Description |
|---|---|---|
| ICurve[] | curves | array of curves |
| ICurve | selectedCurve | currently selected curve |
SetSelectedCurve(ICurve)
Set the selected curve
Declaration
public void SetSelectedCurve(ICurve curve)
Parameters
| Type | Name | Description |
|---|---|---|
| ICurve | curve | this curve should be selected |
SplitAtMousePosition(ICurve)
Returns two curves (Path), that represent the given curve, splitted at the vertex which is closest to the mouse position. The endpoint of the first curve is the startpoint of the second curve. If the curve is not closed and the startpoint or endpoint is closest to the mouse position, en empty array will be returned.
Declaration
public ICurve[] SplitAtMousePosition(ICurve composedCurve)
Parameters
| Type | Name | Description |
|---|---|---|
| ICurve | composedCurve |
Returns
| Type | Description |
|---|---|
| ICurve[] |
Events
| Improve this Doc View SourceCurveSelectionChangedEvent
Provide a method here to react on the user selecting a different curve
Declaration
public event ConstructAction.CurveInput.CurveSelectionChangedDelegate CurveSelectionChangedEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.CurveInput.CurveSelectionChangedDelegate |
MouseOverCurvesEvent
Provide a method here to react on the user moving the cursor over curves.
Declaration
public event ConstructAction.CurveInput.MouseOverCurvesDelegate MouseOverCurvesEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.CurveInput.MouseOverCurvesDelegate |