Table of Contents

Class ConstructAction.IntInput

Namespace
CADability.Actions
Assembly
CADability.dll

Defines an input object for an action derived from ConstructAction. This input object extpects the user to enter a integer value in a edit field. Pressing enter or TAB or clicking the mouse proceeds to the next input object.

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

Constructors

IntInput(string)

Creates a IntInput field with no initial value

public IntInput(string resourceId)

Parameters

resourceId string

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.

IntInput(string, int)

Creates a IntInput field with an initial value

public IntInput(string resourceId, int StartValue)

Parameters

resourceId string

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.

StartValue int

initial value

Properties

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

IntValue

The current value of this input. Setting it refreshes the edit field and raises InputValueChangedEvent, but does not raise SetIntEvent and does not fix the input.

public int IntValue { get; set; }

Property Value

int

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(int)

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

public void ForceValue(int val)

Parameters

val int

the value 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

errorMessage string

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

SetMinMax(int, int, bool)

Sets the limits for the input ad determins whether an up/down control is displayed

public void SetMinMax(int min, int max, bool showupdown)

Parameters

min int

minimum input value

max int

maximum input value

showupdown bool

true: show up/down control

Events

CalculateIntEvent

Provide a method here, if you want to calculate the int from a mouse position.

public event ConstructAction.IntInput.CalculateIntDelegate CalculateIntEvent

Event Type

ConstructAction.IntInput.CalculateIntDelegate

GetIntEvent

Provide a handler here when the integer value is modified by other means than simple user input (e.g. by mouse movement)

public event ConstructAction.IntInput.GetIntDelegate GetIntEvent

Event Type

ConstructAction.IntInput.GetIntDelegate

InputValueChangedEvent

Event will be rasied if the Angle property changed

public event ConstructAction.IntInput.InputValueChangedDelegate InputValueChangedEvent

Event Type

ConstructAction.IntInput.InputValueChangedDelegate

SetIntEvent

Provide a handler here to be able to react on input changes

public event ConstructAction.IntInput.SetIntDelegate SetIntEvent

Event Type

ConstructAction.IntInput.SetIntDelegate