Class ConstructAction.GeoPointInput
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
Defines an input object for an action derived from ConstructAction. This input object extpects the input of a point. This point may be either entered on the keyboard or by moving the mouse. Pressing enter or TAB or clicking the mouse proceeds to the next input object.
public class ConstructAction.GeoPointInput : ConstructAction.InputObject
- Inheritance
-
ConstructAction.GeoPointInput
- Inherited Members
Constructors
GeoPointInput(string)
Constructs a GeoPointInput object.
public GeoPointInput(string resourceId)
Parameters
resourceIdstringthe 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.
GeoPointInput(string, GeoPoint)
Constructs a GeoPointInput object with an inital value.
public GeoPointInput(string resourceId, GeoPoint StartValue)
Parameters
resourceIdstringthe 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.
StartValueGeoPointthe initial value
Fields
DefinesBasePoint
If set to true this point is the basepoint for snapping.
public bool DefinesBasePoint
Field Value
DefinesHotSpot
true: the point is displayed as hotspot (small sqaure). The user can drag this hotspot with the mouse to modify this input.
public bool DefinesHotSpot
Field Value
HotSpotSource
The icon for the hotspot, for example "Hotspots.png:3"
public string HotSpotSource
Field Value
Properties
DefaultGeoPoint
Sets a DefaultGeoPoint, which should be a static value, that carries the last input value of this point to the next instantiation of the action.
public ConstructAction.DefaultGeoPoint DefaultGeoPoint { set; }
Property Value
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
Point
The current point of this input in model coordinates. It is updated by mouse and keyboard input and by ForceValue(GeoPoint); each change raises InputValueChangedEvent. It cannot be set directly, use ForceValue(GeoPoint).
public GeoPoint Point { get; }
Property Value
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
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(GeoPoint)
Forces the input object to the specified value. The input filed is updated accordingly.
public void ForceValue(GeoPoint p)
Parameters
pGeoPointthe point to set
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
errorMessagestringThe text to display, or an empty string to clear the error
Events
GetGeoPointEvent
This event is used by the display to show the current value of the point. This is necessary if this point is also modified by other means, not only by this input field.
public event ConstructAction.GeoPointInput.GetGeoPointDelegate GetGeoPointEvent
Event Type
InputValueChangedEvent
This event will be raised if the Point property was changed
public event ConstructAction.GeoPointInput.InputValueChangedDelegate InputValueChangedEvent
Event Type
MouseClickEvent
Event that is fired when a mousclick happens and this input has the focus.
public event ConstructAction.MouseClickDelegate MouseClickEvent
Event Type
SetGeoPointEvent
Provide a method for this event to receive the value of the point as it is defined by either keyboard or mouse input.
public event ConstructAction.GeoPointInput.SetGeoPointDelegate SetGeoPointEvent
Event Type
SetGeoPointExEvent
Provide a method for this event to receive the value of the point as it is defined by either keyboard or mouse input.
public event ConstructAction.GeoPointInput.SetGeoPointExDelegate SetGeoPointExEvent