FunctionArguments

References
[IoId("00000000-f527-49d9-8caf-a632c5555bfb")] public sealed class FunctionArguments : IStorable
Collection of all function arguments.

Constructors

FunctionArguments

#
public FunctionArguments()

FunctionArguments

#
public FunctionArguments(IReader reader)
reader (IReader)

Properties

All

#
public IEnumerable<Argument> All { get; }
Enumerate over all defined parameters.

AllScalars

#
public IEnumerable<ScalarArgument> AllScalars { get; }
Enumerate over all defined scalar parameters.

AllSelectedVectors

#
public IEnumerable<VectorArgument> AllSelectedVectors { get; }
Enumerate over all selected vector parameters.

AllVectors

#
public IEnumerable<VectorArgument> AllVectors { get; }
Enumerate over all defined vector parameters.

Count

#
public int Count { get; }
Gets the number of parameters.

ScalarCount

#
public int ScalarCount { get; }
Gets the number of scalar parameters.

VectorCount

#
public int VectorCount { get; }
Gets the number of vector parameters.

Visible

#
public bool Visible { get; set; }
Gets or sets whether the arguments are visible in the function editor.

Indexers

this[]

#
public Argument this[Guid id] { get; }
Get the parameter with the specified identifier.
id (Guid)

this[]

#
public Argument this[int index] { get; }
Get the parameter with the specified index.
index (int)

Methods

AddReferent

#
public ScalarArgument AddReferent(int index, int parentIndex, Nomen nomen, UiNumber initial, Function referent)
Add a referenced scalar to this collection.
index (int)
parentIndex (int)
nomen (Nomen)
initial (UiNumber)
referent (Function)

AddScalar

#
public ScalarArgument AddScalar(int index, int parentIndex, Nomen nomen, UiNumber initial)
Add a scalar to this collection.
index (int)
parentIndex (int)
nomen (Nomen)
initial (UiNumber)

AddVector

#
public VectorArgument AddVector(int index, int parentIndex, Nomen nomen, Point2d initial, GripShape shape = GripShape.OpenDisc, GripFlourish flourish = GripFlourish.None)
Add a vector to this collection.
index (int)
parentIndex (int)
nomen (Nomen)
initial (Point2d)
shape (GripShape = GripShape.OpenDisc)
flourish (GripFlourish = GripFlourish.None)

AddVector

#
public VectorArgument AddVector(int index, Nomen nomen, Point2d initial)
Add a vector to this collection.
index (int)
nomen (Nomen)
initial (Point2d)

AdjustReferent

#
public void AdjustReferent(int index, Function function, Guid source)
Adjust an operand based on new linking data.
index (int)
function (Function)
source (Guid)

AdjustReferent

#
public void AdjustReferent(int index, FunctionUi source)
Adjust an operand based on new linking data.
index (int)
source (FunctionUi)

AdjustScalar

#
public void AdjustScalar(int index, double value)
Adjust a scalar based on its origin value and a given offset.
index (int)Index of scalar to move.
value (double)New value.

AdjustVectors

#
public void AdjustVectors(Vector2d dxdy, int[] filter)
Adjust all specified vectors by some motion. The vectors are moved from their origin points, not their current points.
dxdy (Vector2d)Horizontal and vertical movement in graph coordinates.
filter (int[])List of vector indices to affect.

AdjustVectors

#
public void AdjustVectors(Vector2d dxdy)
Adjust all selected vectors by some motion. The vectors are moved from their origin points, not their current points.
dxdy (Vector2d)Horizontal and vertical movement in graph coordinates.

Clear

#
public void Clear()
Delete all arguments.

Contains

#
public bool Contains(Argument parameter)
Tests whether a certain scalar is defined in this collection.
parameter (Argument)

Contains

#
public bool Contains(int index)
Tests whether a certain scalar index is defined in this collection.
index (int)

Delete

#
public void Delete(int index, bool includeChildren)
Delete a specific operand.
index (int)
includeChildren (bool)

DeselectAll

#
public void DeselectAll()
Deselect all vector grips.

FindScalar

#
public ScalarArgument FindScalar(int index)
Find the scalar with the given index.
index (int)

FindScalar

#
public ScalarArgument FindScalar(PointF point)
Find the scalar with the given index.
point (PointF)

FindVector

#
public VectorArgument FindVector(int index)
Find the vector with the given index.
index (int)

FindVector

#
public VectorArgument FindVector(PointF point)
Find the vector at the given point.
point (PointF)

LowestUnusedIndex

#
public int LowestUnusedIndex()
Gets the lowest, non-negative unused argument index.

OnArgumentsAdded

#
public void OnArgumentsAdded(params int[] parameters)
parameters (params int[])

OnArgumentsChanged

#
public void OnArgumentsChanged(params int[] parameters)
parameters (params int[])

OnArgumentsRemoved

#
public void OnArgumentsRemoved(params int[] parameters)
parameters (params int[])

PickSelect

#
public void PickSelect(CircleF region, SelectionMode mode)
Perform a vector grip pick selection in graph coordinates.
region (CircleF)
mode (SelectionMode)

RevertToSavedStates

#
public void RevertToSavedStates()
Revert all vectors and scalars in this collection to their original values.

SelectAll

#
public void SelectAll()
Select all vector grips.

Store

#
public void Store(IWriter writer)
writer (IWriter)
Store

UpdateReferents

#
public void UpdateReferents(FunctionUi ui)
Update all referents that link to the given ui with the new UI function.
ui (FunctionUi)

UpdateSavedStates

#
public void UpdateSavedStates()
Set all vector and scalar origins to their current values.

VectorAt

#
public VectorArgument VectorAt(Point2d point, double radius)
Find the vector grip closest to a given coordinate.
point (Point2d)Search point.
radius (double)Search radius.
Vector at or near point, if any.

VectorBounds

#
public bool VectorBounds(out double x0, out double x1, out double y0, out double y1)
Gets the boundingbox of all the vector arguments.
x0 (out double)
x1 (out double)
y0 (out double)
y1 (out double)
True if there's a valid bounding box, otherwise false.

WindowSelect

#
public void WindowSelect(BoundingBox window, SelectionMode mode)
Perform a vector grip window selection in graph coordinates.
window (BoundingBox)
mode (SelectionMode)

Events

ArgumentsAdded

#
public event EventHandler<ArgumentEventArgs> ArgumentsAdded
Raised whenever one or more arguments are added.

ArgumentsChanged

#
public event EventHandler<ArgumentEventArgs> ArgumentsChanged
Raised whenever one or more arguments are changed.

ArgumentsRemoved

#
public event EventHandler<ArgumentEventArgs> ArgumentsRemoved
Raised whenever one or more arguments are removed.