ModularList

References
public sealed class ModularList
An array of input or output parameters of a ModularComponent which maintains the hidden/shown states of the optional parameters.

Constructors

ModularList

#
public ModularList(
component,
input
)

Properties

AllParameters

#
Enumerate over all parameters.
public IEnumerable<IParameter> AllParameters { get; }

Categories

#
Enumerate over all parameter categories. Parameters are grouped if they're optional and share the same __Category custom value.
public IEnumerable<IParameter[]> Categories { get; }

Count

#
The total number of parameters.
public int Count { get; }

HiddenParameters

#
Enumerate over only hidden parameters.
public IEnumerable<IParameter> HiddenParameters { get; }

OptionalParameters

#
Enumerate over all optional parameters. An optional parameter must have a TRUE value in the CustomValues stored under ModularComponent.__Optional.
public IEnumerable<IParameter> OptionalParameters { get; }

VisibleCount

#
The number of visible parameters.
public int VisibleCount { get; }

VisibleParameters

#
Enumerate over only visible parameters.
public IEnumerable<IParameter> VisibleParameters { get; }

Indexers

this[]

#
Gets or sets whether the parameter with the given index is visible.
public IParameter this[
index
] { get; }

Methods

Hide

#
Hide the parameter at the given index. This is only possible if the parameter is optional. Any wires currently connected to the parameter are severed (with the disconnections added to the undo list) and the connection data is cached in the parameter's CustomValues so that the wires can be reinstated when the parameter is shown again.
public void Hide(
index,
Index of the parameter to hide.
undo = null
Optional undo list. Wire disconnection actions and the visibility/cache state change action are added here.
)

IndexOf

#
public int IndexOf(
parameter
)

IsOptional

#
public static bool IsOptional(
parameter
)

IsVisible

#
Gets whether the parameter with the given index is visible.
public bool IsVisible(
index
)

ResolveCategory

#
public static bool ResolveCategory(
parameter,
out string
category
)

ResolveColour

#
public static bool ResolveColour(
parameter,
out Color
colour
)

ResolveIcon

#
public static bool ResolveIcon(
parameter,
targetType,
out IIcon
icon
)

ResolveName

#
public static bool ResolveName(
parameter,
out string
name
)

Restore

#
public bool Restore(
reader
)

Show

#
Show the parameter at the given index. If the parameter has a cached list of wires recorded from a previous hide operation, those wires are reinstated where possible. Any wires successfully reconnected are appended to the undo list.
public void Show(
index,
Index of the parameter to show.
undo = null
Optional undo list. Wire reconnection actions and the visibility/cache state change action are added here.
)

Store

#
public void Store(
writer
)

Events

Hidden

#
Events raised when a modular parameter is hidden.

Shown

#
Events raised when a modular parameter is shown.