Class ListElementNode<TContainer, TList, TElement, TEditor>
Describes a node in the structure that points to an element in the list.
Inherited Members
Namespace: NanoByte.StructureEditor
Assembly: NanoByte.StructureEditor.dll
Syntax
public class ListElementNode<TContainer, TList, TElement, TEditor> : Node where TContainer : class where TElement : class, TList where TEditor : INodeEditor<TElement>, new()
Type Parameters
Name | Description |
---|---|
TContainer | The type of the container containing the list. |
TList | The type of elements in the list. |
TElement | The type of a specific element type in the list. |
TEditor | An editor for modifying the content of the element. |
Constructors
ListElementNode(String, TContainer, IList<TList>, TElement)
Creates a new list element node.
Declaration
public ListElementNode(string name, TContainer container, IList<TList> list, TElement element)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the element type. |
TContainer | container | The container containing the |
IList<TList> | list | The list containing the |
TElement | element | The element in the list. |
Methods
GetEditorControl(ICommandExecutor)
Gets a GUI control for editing the node's target.
Declaration
public override INodeEditor GetEditorControl(ICommandExecutor executor)
Parameters
Type | Name | Description |
---|---|---|
ICommandExecutor | executor | Used to perform undo/redo operations. |
Returns
Type | Description |
---|---|
INodeEditor |
Overrides
GetRemoveCommand()
Gets a command for removing the node's target from the structure.
Declaration
public override IUndoCommand GetRemoveCommand()
Returns
Type | Description |
---|---|
IUndoCommand |
Overrides
GetSerialized()
Returns a serialized representation of the Target.
Declaration
public override string GetSerialized()
Returns
Type | Description |
---|---|
String |
Overrides
GetUpdateCommand(String)
Gets a command for updating the node's target with a new value.
Declaration
public override IValueCommand GetUpdateCommand(string serializedValue)
Parameters
Type | Name | Description |
---|---|---|
String | serializedValue | A serialized representation of the new value. |
Returns
Type | Description |
---|---|
IValueCommand |