public sealed class ListDrawerA list or an array: a foldout of element rows, with add, remove and reorder.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Doc 20 calls a browser that cannot rename worse than no browser, and the same applies here: a list drawn as System.Collections.Generic.List`1[Vixen.Core.AssetId] — which is what the last resort produces — is a promise the inspector breaks the first time somebody needs a material slot.
⚠ Every change is copy-on-write, and that is what makes undo work at all. A list is a reference type, so mutating the one the object holds leaves the undo command recording that same reference as its "before" — and the step would undo to the value it had just been changed to. So the drawer copies on the way in, edits the copy, and writes a fresh copy back through the outer member.
⚠ A mixed selection is refused rather than merged. Two objects hold two different list objects, so there is no shared row three — and an inspector that showed the first one's would let an edit to it silently resize the others.
Owed: drag to reorder. The arrows are complete and a drag is better; it needs the row to be a drop target, which is a control-level change rather than a drawer one.
Fields and properties (1)
public DrawerRegistry? Drawers
Methods (3)
public bool CanDraw(InspectorMember member)Whether this drawer can edit a member.
public UiElement Build(InspectorField field, UiElement parent)Makes the controls, once.
public void Show(InspectorField field, UiElement editor)Puts the current value into controls that already exist.
Used by (2)
- CompositeTestsVixen.Editor.Inspector.Tests
- DrawerRegistryVixen.Editor.Inspector