Show / Hide Table of Contents

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.

Inheritance
System.Object
ConstructAction.InputObject
ConstructAction.LengthInput
Inherited Members
ConstructAction.InputObject.Optional
ConstructAction.InputObject.Fixed
ConstructAction.InputObject.ResourceId
ConstructAction.InputObject.constructAction
ConstructAction.InputObject.ShowProperty
ConstructAction.InputObject.Init(ConstructAction)
ConstructAction.InputObject.Refresh()
ConstructAction.InputObject.BuildShowProperty()
ConstructAction.InputObject.AcceptInput(Boolean)
ConstructAction.InputObject.MouseLeft()
ConstructAction.InputObject.OnActionDone()
ConstructAction.InputObject.HasHotspot
ConstructAction.InputObject.HotspotPosition
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()
Namespace: CADability.Actions
Assembly: CADability.dll
Syntax
public class LengthInput : ConstructAction.InputObject, ConstructAction.IInputObject

Constructors

| Improve this Doc View Source

LengthInput(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.

| Improve this Doc View Source

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 Source

DefaultLength

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
| Improve this Doc View Source

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
| Improve this Doc View Source

Length

Declaration
public double Length { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

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
ConstructAction.InputObject.ReadOnly

Methods

| Improve this Doc View Source

AdjustHighlight()

Declaration
protected override void AdjustHighlight()
Overrides
ConstructAction.InputObject.AdjustHighlight()
| Improve this Doc View Source

ForceValue(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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 Source

CalculateLengthEvent

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX