Unify new editor tree filter host

This commit is contained in:
2026-04-23 01:12:36 +08:00
parent 03e0b362f7
commit d52eefe2ff
7 changed files with 856 additions and 53 deletions

View File

@@ -4,6 +4,7 @@
#include "ProjectBrowserModel.h"
#include "Commands/EditorEditCommandRoute.h"
#include <XCEditor/Collections/UIEditorFilterableTreeHost.h>
#include <XCEditor/Collections/UIEditorGridDragDrop.h>
#include <XCEditor/Collections/UIEditorInlineRenameSession.h>
#include <XCEditor/Collections/UIEditorScrollViewInteraction.h>
@@ -169,6 +170,8 @@ private:
const BrowserModel& GetBrowserModel() const;
void RebuildWindowTreeItems();
const std::vector<Widgets::UIEditorTreeViewItem>& GetWindowTreeItems() const;
const std::vector<Widgets::UIEditorTreeViewItem>& GetPresentedWindowTreeItems() const;
const ::XCEngine::UI::Widgets::UIExpansionModel& GetPresentedWindowTreeExpansionModel() const;
const FolderEntry* FindFolderEntry(std::string_view itemId) const;
const AssetEntry* FindAssetEntry(std::string_view itemId) const;
AssetCommandTarget ResolveAssetCommandTarget(
@@ -181,6 +184,10 @@ private:
const ::XCEngine::UI::UIRect& bounds,
const ::XCEngine::UI::UIRect& browserContentRect,
float browserVerticalOffset) const;
void ApplyBrowserLayout(
const ::XCEngine::UI::UIRect& bounds,
const ::XCEngine::UI::UIRect& browserContentRect,
float browserVerticalOffset);
std::size_t HitTestBreadcrumbItem(const ::XCEngine::UI::UIPoint& point) const;
std::size_t HitTestAssetTile(const ::XCEngine::UI::UIPoint& point) const;
std::string ResolveAssetDropTargetItemId(
@@ -208,7 +215,8 @@ private:
void SyncSelectionsFromRuntime();
void SyncAssetSelectionFromRuntime();
Widgets::UIEditorTreeViewMetrics RebuildPanelLayout(
const ::XCEngine::UI::UIRect& bounds);
const ::XCEngine::UI::UIRect& bounds,
const std::vector<::XCEngine::UI::UIInputEvent>& treeHostInputEvents = {});
void QueueRenameSession(
std::string_view itemId,
RenameSurface surface);
@@ -254,6 +262,8 @@ private:
::XCEngine::UI::Widgets::UISelectionModel m_assetSelection = {};
Collections::GridDragDrop::State m_assetDragState = {};
Collections::TreeDragDrop::State m_treeDragState = {};
UIEditorFilterableTreeHostState m_treeFilterHostState = {};
UIEditorFilterableTreeHostFrame m_treeFilterHostFrame = {};
UIEditorScrollViewInteractionState m_browserScrollInteractionState = {};
UIEditorScrollViewInteractionFrame m_browserScrollFrame = {};
float m_browserVerticalOffset = 0.0f;