public sealed class ShownContentWhat the content browser is looking at and how: a folder or a collection, a search, a kind, tiles or a tree.
Remarks
⚠ The browser's durable state, held by the service rather than by the panel — doc 50 § D2's rule for the parked fields. A panel's factory runs again on every reopen, so the folder somebody walked into and the search they typed lived in fields of a view that was thrown away with it: closing the Project tab and opening it again put them back at Assets with an empty search box. The panel reads this on build and writes through it.
⚠ Two halves with two lifetimes. The folder, the collection, the search and the kind are where somebody is standing, and are not carried across a restart. The grid toggle and the tile size are how somebody likes to browse, so the editor builds this over the user's preferences and they are read from and written to there — the panel only ever reads and writes them here, which is what used to be two events out of the panel and a restore into it on every reopen.
Fields and properties (6)
public string FolderThe folder being shown, by project-relative path.
public string? CollectionThe collection being shown instead of the folder, or .
public string SearchWhat is in the search box.
public string KindThe importer tag the kind dropdown is on, or empty for every kind.
public bool GridWhether the browser shows tiles rather than the tree.
public string TileSizeHow big the tiles are, by the name the size dropdown shows; empty is the grid's own default.
Methods (2)
public ShownContent()A model whose view lives only as long as it does: tiles, at the grid's default size.
public ShownContent(Func<bool> grid, Func<string> tileSize, Action<bool, string> keep)A model whose view is kept somewhere that outlives it — the editor's preferences.
Used by (7)
- BrowserShownTestsVixen.Editor.App.Tests
- ContentBrowsingVixen.Editor.App
- ContentLibraryVixen.Editor.App
- EditorApplicationVixen.Editor.App
- IContentLibraryVixen.Editor.Assets
- LibraryQuestionsVixen.Editor.App
- ProjectBrowserVixen.Editor.App