Class ConstructAction.GeoVectorInput
Defines an input object for an action derived from ConstructAction. This input object extpects the input of a vector. The vector may be either entered on the keyboard or by moving the mouse. The calculation of a vector 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 GeoVectorInput : ConstructAction.InputObject, ConstructAction.IInputObject
Constructors
| Improve this Doc View SourceGeoVectorInput(String)
Constructs a LengthInput object.
Declaration
public GeoVectorInput(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. |
GeoVectorInput(String, GeoVector)
Constructs a LengthInput object with an initial value
Declaration
public GeoVectorInput(string resourceId, GeoVector 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. |
| GeoVector | StartValue | the initial value |
Properties
| Improve this Doc View SourceDefaultGeoVector
Sets a DefaultGeoVector, which should be a static value, that carries the last input value of this vector to the next instantiation of the action.
Declaration
public ConstructAction.DefaultGeoVector DefaultGeoVector { set; }
Property Value
| Type | Description |
|---|---|
| ConstructAction.DefaultGeoVector |
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 |
IsAngle
Declaration
public bool IsAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The vector should be interpreted as an angle (IsAngle==true) or as a direction (IsAngle==false). For an angle there is no vector length, i.e. the length will always be 1 (unit vector). The PropertyDisplay will only display a single value (the angle in the drawing plane), the subentries will contain two angles: drawingplane angle and elevation from drawing plane |
PlaneForAngle
Defines the plane in which the angle should be computed. The input point will be projected into this plane and the Angle to the x-axis will be used as the input
Declaration
public Plane PlaneForAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| Plane |
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(GeoVector)
Forces the input object to the specified value. The input filed is updated accordingly.
Declaration
public void ForceValue(GeoVector val)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoVector | val | the value to set |
SetVectorFromPoint(GeoPoint)
Sets the point as a basis for the calculation of the vector. The calculated vector is the vector from this point to the mouseposition.
Declaration
public void SetVectorFromPoint(GeoPoint basePoint)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint | basePoint | the point |
Events
| Improve this Doc View SourceCalculateGeoVectorEvent
Provide a method here, if you want to calculate the vector yourself, i.e. if vector from point, line or plane is not appropriate to your needs.
Declaration
public event ConstructAction.GeoVectorInput.CalculateGeoVectorDelegate CalculateGeoVectorEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.GeoVectorInput.CalculateGeoVectorDelegate |
GetGeoVectorEvent
Provide a method here, if the vector not only depends from this input, but is also modified by other means.
Declaration
public event ConstructAction.GeoVectorInput.GetGeoVectorDelegate GetGeoVectorEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.GeoVectorInput.GetGeoVectorDelegate |
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 |
SetGeoVectorEvent
Provide a method here to get the result of this input (and modify your object)
Declaration
public event ConstructAction.GeoVectorInput.SetGeoVectorDelegate SetGeoVectorEvent
Event Type
| Type | Description |
|---|---|
| ConstructAction.GeoVectorInput.SetGeoVectorDelegate |