Class ConstructAction.LengthInput
Defines an input object for an action derived from ConstructAction. This input object extpects the input of a length or distance. The length may be either entered on the keyboard or by moving the mouse. The calculation of a length from the mouse position depends on various settings. 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 LengthInput : ConstructAction.InputObject, ConstructAction.IInputObject
Constructors
| Improve this Doc View SourceLengthInput(String)
Constructs a LengthInput object.
Declaration
public LengthInput(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. |
LengthInput(String, Double)
Constructs a LengthInput object with a start value
Declaration
public LengthInput(string resourceId, double StartValue)
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. |
| System.Double | StartValue | the initial value |
Properties
| Improve this Doc View SourceDefaultLength
Sets a DefaultLength, which should be a static value, that carries the last input value of this length to the next instantiation of the action.
Declaration
public ConstructAction.DefaultLength DefaultLength { set; }
Property Value
| Type | Description |
|---|---|
| ConstructAction.DefaultLength |
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 |
Length
Declaration
public double Length { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
ReadOnly
true: this input field does not accept user input, false: normal input field that requires user input
Declaration
public override bool ReadOnly { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Methods
| Improve this Doc View SourceAdjustHighlight()
Declaration
protected override void AdjustHighlight()
Overrides
| Improve this Doc View SourceForceValue(Double)
Forces the input object to the specified value. The input filed is updated accordingly.
Declaration
public void ForceValue(double val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | val | the value to set |
SetDistanceFromLine(GeoPoint, GeoPoint)
Sets the line as a basis for the calculation of the distance or length. The calculated length is the distance of the mouseposition from this line
Declaration
public void SetDistanceFromLine(GeoPoint startPoint, GeoPoint endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint | startPoint | startpoint of the line |
| GeoPoint | endPoint | endpoint of the line |
SetDistanceFromPlane(Plane)
Sets the given plane as a basis for the calculation of the distance or length. The calculated length is the distance of the mouseposition from this plane.
Declaration
public void SetDistanceFromPlane(Plane p)
Parameters
| Type | Name | Description |
|---|---|---|
| Plane | p | the plane |
SetDistanceFromPoint(GeoPoint)
Sets the point as a basis for the calculation of the distance or length. The calculated length is the distance of the mouseposition from this point.
Declaration
public void SetDistanceFromPoint(GeoPoint basePoint)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint | basePoint | the point |
Events
| Improve this Doc View SourceCalculateLengthEvent
Provide a method here, if you want to calculate the length yourself, i.e. if distance from point, line or plane is not appropriate to your needs.
Declaration
public event ConstructAction.LengthInput.CalculateLengthDelegate CalculateLengthEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.LengthInput.CalculateLengthDelegate |
GetLengthEvent
Provide a method here, if the length not only depends from this input, but is also modified by other means.
Declaration
public event ConstructAction.LengthInput.GetLengthDelegate GetLengthEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.LengthInput.GetLengthDelegate |
MouseClickEvent
Event that is fired when a mousclick happens and this input has the focus.
Declaration
public event ConstructAction.MouseClickDelegate MouseClickEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.MouseClickDelegate |
SetLengthEvent
Provide a method here to get the result of this input (and modify your object)
Declaration
public event ConstructAction.LengthInput.SetLengthDelegate SetLengthEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.LengthInput.SetLengthDelegate |