NanoByte Structure Editor
Public Member Functions | Protected Member Functions | Properties | List of all members
NanoByte.StructureEditor.WinForms.StructureEditor< T > Class Template Reference

An editor for hierarchical structures. More...

Inheritance diagram for NanoByte.StructureEditor.WinForms.StructureEditor< T >:
NanoByte.StructureEditor.IStructureEditor< T >

Public Member Functions

IContainerDescription< TContainer > Describe< TContainer > ()
 Adds a ContainerDescription<TContainer> used to describe the structure of the data being editing. More...
 
IContainerDescription< T > DescribeRoot< TEditor > (string name)
 Set up handling for the root element with a custom editor. More...
 
IContainerDescription< T > DescribeRoot (string name)
 Set up handling for the root element with a generic editor. More...
 
void Open ([NotNull] ICommandManager< T > commandManager)
 Opens an object for editing using the specified ICommandManager<T>. More...
 
void Undo ()
 Undoes the last action. More...
 
void Redo ()
 Redoes the last action. More...
 
void Remove ()
 Removes the currently selected entry; More...
 

Protected Member Functions

virtual string GetSerialized ()
 Returns the serialized representation of the SelectedNode. More...
 

Properties

ICommandManager< T > CommandManager = new CommandManager<T>(new T()) [get]
 Holds the object being editing and manages undo/redo operations on it. More...
 

Detailed Description

An editor for hierarchical structures.

Derive and call DescribeRoot or DescribeRoot<TEditor> as well as Describe<TContainer> in the constructor.

Template Parameters
TThe type of object to edit.
Type Constraints
T :class 
T :IEquatable<T> 
T :new() 

Member Function Documentation

◆ Describe< TContainer >()

IContainerDescription<TContainer> NanoByte.StructureEditor.WinForms.StructureEditor< T >.Describe< TContainer > ( )
inline

Adds a ContainerDescription<TContainer> used to describe the structure of the data being editing.

Template Parameters
TContainerThe type of the container to describe.
Returns
The ContainerDescription<TContainer> for use in a "Fluent API" style.

Implements NanoByte.StructureEditor.IStructureEditor< T >.

Type Constraints
TContainer :class 

◆ DescribeRoot()

Set up handling for the root element with a generic editor.

Parameters
nameThe name of the root element.
Returns
The ContainerDescription<TContainer> for use in a "Fluent API" style.

Implements NanoByte.StructureEditor.IStructureEditor< T >.

◆ DescribeRoot< TEditor >()

Set up handling for the root element with a custom editor.

Template Parameters
TEditorAn editor for modifying the content of the root.
Parameters
nameThe name of the root element.
Returns
The ContainerDescription<TContainer> for use in a "Fluent API" style.

Implements NanoByte.StructureEditor.IStructureEditor< T >.

Type Constraints
TEditor :INodeEditor<T> 
TEditor :new() 

◆ GetSerialized()

virtual string NanoByte.StructureEditor.WinForms.StructureEditor< T >.GetSerialized ( )
protectedvirtual

Returns the serialized representation of the SelectedNode.

◆ Open()

void NanoByte.StructureEditor.WinForms.StructureEditor< T >.Open ( [NotNull] ICommandManager< T >  commandManager)
inline

Opens an object for editing using the specified ICommandManager<T>.

Parameters
commandManagerHolds the object being editing and manages undo/redo operations on it.

◆ Redo()

Redoes the last action.

◆ Remove()

Removes the currently selected entry;

◆ Undo()

Undoes the last action.

Property Documentation

◆ CommandManager

Holds the object being editing and manages undo/redo operations on it.


The documentation for this class was generated from the following file: