Class ConstructAction.GeoObjectInput
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
Defines an input object for an action derived from ConstructAction. This input object extpects the user to click on a curve (IGeoObject that also implements ICurve. Pressing enter or TAB or clicking the mouse proceeds to the next input object.
public class ConstructAction.GeoObjectInput : ConstructAction.InputObject
- Inheritance
-
ConstructAction.GeoObjectInput
- Inherited Members
Constructors
GeoObjectInput(string)
Creates a GeoObjectInput object.
public GeoObjectInput(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.
Fields
EdgesOnly
If true, only edges of faces, shells and solids are picked (singleEdge), e.g. for a fillet. May be combined with FacesOnly. Default: false.
public bool EdgesOnly
Field Value
FacesOnly
If true, only faces are picked (singleFace). May be combined with EdgesOnly. Default: false.
public bool FacesOnly
Field Value
ModifiableOnly
true: only curves that may be modified are yielded false: any kind of curves curves are yielded
public bool ModifiableOnly
Field Value
MultipleInput
If true, the input is not fixed by an accepted click, so the user can go on picking further objects (the MouseOverGeoObjectsEvent handler collects them) until the action is finished explicitly. If false (the default), the first accepted click fixes the input and the action proceeds to the next one.
public bool MultipleInput
Field Value
Points
If true and the mouse snaps to a point, that snap point is offered to the MouseOverGeoObjectsEvent as an additional Point object, so that the user can also pick a point, e.g. a vertex. Default: false.
public bool Points
Field Value
currentMousePoint
The mouse position (in pixels of the view) of the last mouse event this input processed. Internal state that a MouseOverGeoObjectsEvent handler may use to pick additional objects at that position.
public Point currentMousePoint
Field Value
Properties
Decomposed
true: only decomposed curves are yielded, false: also path objects, that consist of several subcurves are yielded
public bool Decomposed { get; set; }
Property Value
FailCursor
Sets the cursor that will be displayed when no curve is hit
public string FailCursor { 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
HitCursor
Sets the cursor that will be displayed when a curve is hit
public string HitCursor { 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()
GetGeoObjects()
Gets the currently selected curves.
public IGeoObject[] GetGeoObjects()
Returns
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
SetGeoObject(IGeoObject[], IGeoObject)
Forces the given geoObjects to be displayed
public void SetGeoObject(IGeoObject[] GeoObjects, IGeoObject selectedGeoObject)
Parameters
GeoObjectsIGeoObject[]array of GeoObjects
selectedGeoObjectIGeoObjectcurrently selected GeoObject
SetSelectedGeoObject(IGeoObject)
Set the selected GeoObject
public void SetSelectedGeoObject(IGeoObject geoObject)
Parameters
geoObjectIGeoObjectthis GeoObject should be selected
Events
GeoObjectSelectionChangedEvent
Provide a method here to react on the user selecting a different curve
public event ConstructAction.GeoObjectInput.GeoObjectSelectionChangedDelegate GeoObjectSelectionChangedEvent
Event Type
MouseOverGeoObjectsEvent
Provide a method here to react on the user moving the cursor over GeoObjects.
public event ConstructAction.GeoObjectInput.MouseOverGeoObjectsDelegate MouseOverGeoObjectsEvent