Handles the selection of a Odin Menu Tree with support for multi selection.

namespace Sirenix.OdinInspector.Editor
public class OdinMenuTreeSelection : IList<OdinMenuItem>, ICollection<OdinMenuItem>, IEnumerable<OdinMenuItem>


Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector

See Also


Definition Description
OdinMenuTreeSelection(bool) Initializes a new instance of the OdinMenuTreeSelection class.


Definition Description
OnSelectionChanged Occurs whenever the selection has changed.
SelectionChanged Occurs whenever the selection has changed.
SelectionConfirmed Usually occurs whenever the user hits return, or double click a menu item.


Return Type Definition Description
int Count Gets the count.
OdinMenuItem Item Gets the OdinMenuItem at the specified index.
bool SupportsMultiSelect Gets or sets a value indicating whether multi selection is supported.


Return Type Definition Description
void Add(OdinMenuItem) Adds a menu item to the selection. If the menu item is already selected, then the item is pushed to the bottom of the selection list. If multi selection is off, then the previous selected menu item is removed first. Adding a item to the selection triggers SelectionChanged.
void Clear() Clears the selection and triggers OnSelectionChanged.
void ConfirmSelection() Triggers OnSelectionConfirmed.
bool Contains(OdinMenuItem) Determines whether an OdinMenuItem is selected.
void CopyTo(OdinMenuItem[], int) Copies all the elements of the current array to the specified array starting at the specified destination array index.
IEnumerator<OdinMenuItem> GetEnumerator() Gets the enumerator.
int IndexOf(OdinMenuItem) Searches for the specified menu item and returns the index location.
bool Remove(OdinMenuItem) Removes the specified menu item and triggers SelectionChanged.
void RemoveAt(int) Removes the menu item at the specified index and triggers SelectionChanged.