Reorderable List Control for Unity
GenericListAdaptorT Class |
Reorderable list adaptor for generic list.
Inheritance Hierarchy
SystemObject Rotorz.ReorderableListGenericListAdaptorT
Namespace: Rotorz.ReorderableList
Assembly: Editor.ReorderableList (in Editor.ReorderableList.dll) Version: 0.0.0.0 (0.3.0.0)
Syntax
public class GenericListAdaptor<T> : IReorderableListAdaptor
public class GenericListAdaptor.<T> implements IReorderableListAdaptor
Type Parameters
- T
- Type of list element.
The GenericListAdaptorT type exposes the following members.
Constructors
Name | Description | |
---|---|---|
GenericListAdaptorT |
Initializes a new instance of GenericListAdaptorT.
|
Methods
Name | Description | |
---|---|---|
Add |
Add new element at end of list.
| |
BeginGUI |
Occurs before any list items are drawn.
| |
CanDrag |
Determines whether an item can be reordered by dragging mouse.
| |
CanRemove |
Determines whether an item can be removed from list.
| |
Clear |
Clear all elements from list.
| |
DrawItem |
Draws main interface for a list item.
| |
DrawItemBackground |
Draws background of a list item.
| |
Duplicate |
Duplicate existing element.
| |
EndGUI |
Occurs after all list items have been drawn.
| |
GetItemHeight |
Gets height of list item in pixels.
| |
Insert |
Insert new element at specified index.
| |
Move |
Move element from source index to destination index.
| |
Remove |
Remove element at specified index.
|
Fields
Name | Description | |
---|---|---|
FixedItemHeight |
Fixed height of each list item.
|
Properties
Name | Description | |
---|---|---|
Count |
Gets count of elements in list.
| |
Item |
Gets element from list.
| |
List |
Gets the underlying list data structure.
|
Remarks
This adaptor can be subclassed to add special logic to item height calculation. You may want to implement a custom adaptor class where specialised functionality is needed.
List elements which implement the ICloneable interface are cloned using that interface upon duplication; otherwise the item value or reference is simply copied.
See Also