Table of Contents

Class ConstructAction.AngleInput

Namespace
CADability.Actions
Assembly
CADability.dll

Input object for the ConstructAction that yields an Angle. See SetInput(params object[])

public class ConstructAction.AngleInput : ConstructAction.InputObject
Inheritance
ConstructAction.AngleInput
Inherited Members

Constructors

AngleInput(string)

Constructs an AngleInput.

public AngleInput(string resourceId)

Parameters

resourceId string

resource id for the label

AngleInput(string, Angle)

Constructs an AngleInput.

public AngleInput(string resourceId, Angle StartValue)

Parameters

resourceId string

resource id for the label

StartValue Angle

start value for the angle

Properties

Angle

The current value of this input (see Angle). It is updated by mouse and keyboard input and by ForceValue(Angle); each change raises InputValueChangedEvent. It cannot be set directly, use ForceValue(Angle).

public Angle Angle { get; }

Property Value

Angle

DefaultAngle

Sets a DefaultAngle, which should be a static value, that carries the last input value of this length to the next instantiation of the action.

public ConstructAction.DefaultAngle DefaultAngle { set; }

Property Value

ConstructAction.DefaultAngle

ForwardMouseInputTo

Mouse input should be forwarded to another input object and only processed by this input, when the other input object is fixed.

public object ForwardMouseInputTo { get; set; }

Property Value

object

ReadOnly

true: this input field does not accept user input, false: normal input field that requires user input

public override bool ReadOnly { get; set; }

Property Value

bool

Methods

AdjustHighlight()

Called whenever ReadOnly, Optional or Fixed changes, so that the input can update the highlight of its entry in the property page: an input is highlighted while it still expects a value, i.e. while it is neither optional, fixed nor read-only. The default implementation does nothing; the concrete input objects override it.

protected override void AdjustHighlight()

ForceValue(Angle)

Forces the input object to the specified value. The input filed is updated accordingly.

public void ForceValue(Angle val)

Parameters

val Angle

the value to set

SetAngleFromLine(GeoPoint, GeoPoint)

Sets the line as a basis for the calculation of the angle. The calculated angle is the angle of line from the startPoint to the mouseposition with the line from the startPoint to the endPoint.

public void SetAngleFromLine(GeoPoint startPoint, GeoPoint endPoint)

Parameters

startPoint GeoPoint

startpoint of the line

endPoint GeoPoint

endpoint of the line

SetAngleFromPlane(Plane)

Sets the given plane as a basis for the calculation of the angle. The calculated angle is the angle of the mouseposition relative to the X-axis of this plane.

public void SetAngleFromPlane(Plane p)

Parameters

p Plane

the plane

SetError(string)

Shows errorMessage as an error on the entry of this input in the property page, e.g. when the value entered by the user is not acceptable for the action. The default implementation does nothing; inputs with an edit field forward the message to their property entry, inputs without one ignore it.

public override void SetError(string errorMessage)

Parameters

errorMessage string

The text to display, or an empty string to clear the error

Events

CalculateAngleEvent

Provide a method here, if you want to calculate the angle yourself, i.e. if distance from point, line or plane is not appropriate to your needs.

public event ConstructAction.AngleInput.CalculateAngleDelegate CalculateAngleEvent

Event Type

ConstructAction.AngleInput.CalculateAngleDelegate

GetAngleEvent

Provide a method here, if the angle not only depends from this input, but is also modified by other means.

public event ConstructAction.AngleInput.GetAngleDelegate GetAngleEvent

Event Type

ConstructAction.AngleInput.GetAngleDelegate

InputValueChangedEvent

Event will be rasied if the Angle property changed

public event ConstructAction.AngleInput.InputValueChangedDelegate InputValueChangedEvent

Event Type

ConstructAction.AngleInput.InputValueChangedDelegate

MouseClickEvent

Event that is fired when a mousclick happens and this AngleInput has the focus.

public event ConstructAction.MouseClickDelegate MouseClickEvent

Event Type

ConstructAction.MouseClickDelegate

SetAngleEvent

Provide a method here to get the result of this input (and modify your object)

public event ConstructAction.AngleInput.SetAngleDelegate SetAngleEvent

Event Type

ConstructAction.AngleInput.SetAngleDelegate