Table of Contents

Class ConstructAction.InputObject

Namespace
CADability.Actions
Assembly
CADability.dll

Common base class for input objects for the ConstructAction (see SetInput(params object[])

public abstract class ConstructAction.InputObject
Inheritance
ConstructAction.InputObject
Derived
Inherited Members

Constructors

InputObject(string)

Constructor to set the resourceId for that input field

protected InputObject(string resourceId)

Parameters

resourceId string

Fields

ResourceId

The string id for several text strings: ResourceId+".Label": the Label left of the edit box. ResourceId+".ShortInfo": a short tooltip text ResourceId+"DetailedInfo": a longer tooltip text.

public string ResourceId

Field Value

string

constructAction

Back reference to the ConstructAction this input is used for.

protected ConstructAction constructAction

Field Value

ConstructAction

Properties

Fixed

If true, there already was an input either from the keyboard or by a mouse click.

public bool Fixed { get; set; }

Property Value

bool

HasHotspot

Internal!

protected virtual bool HasHotspot { get; }

Property Value

bool

HotspotPosition

Internal!

protected virtual GeoPoint HotspotPosition { get; }

Property Value

GeoPoint

Optional

If set to true, the user cannot modify this intput with the mouse. Default: false;

public virtual bool Optional { get; set; }

Property Value

bool

ReadOnly

If set to true, the user cannot type in a value for this input. Default: false;

public virtual bool ReadOnly { get; set; }

Property Value

bool

Methods

AcceptInput(bool)

Internal!

protected virtual bool AcceptInput(bool acceptOptional)

Parameters

acceptOptional bool

Returns

bool

Internal!

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 virtual void AdjustHighlight()

Init(ConstructAction)

Internal!

protected virtual void Init(ConstructAction a)

Parameters

a ConstructAction

a

MouseLeft()

Internal!

protected virtual void MouseLeft()

OnActionDone()

Internal!

protected virtual void OnActionDone()

Refresh()

Internal!

protected virtual void Refresh()

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 virtual void SetError(string errorMessage)

Parameters

errorMessage string

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