new_editor: support between-row hierarchy drag drop

This commit is contained in:
2026-04-23 14:09:28 +08:00
parent e63457c72b
commit 5c0a878aa0
63 changed files with 596 additions and 12 deletions

View File

@@ -164,6 +164,14 @@ void AppendUIEditorTreeView(
namespace XCEngine::UI::Editor {
enum class UIEditorTreeViewDropPreviewPlacement : std::uint8_t {
None = 0,
OnItem,
BeforeItem,
AfterItem,
Root
};
bool HasUIEditorTreeViewValidBounds(
const ::XCEngine::UI::UIRect& bounds);
@@ -200,6 +208,17 @@ void UpdateUIEditorTreeViewInlineRenameSession(
const ::XCEngine::UI::UIRect& bounds,
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents);
void AppendUIEditorTreeViewDropPreview(
::XCEngine::UI::UIDrawList& drawList,
const Widgets::UIEditorTreeViewLayout& layout,
const std::vector<Widgets::UIEditorTreeViewItem>& items,
bool active,
UIEditorTreeViewDropPreviewPlacement placement,
std::string_view dropTargetItemId,
const ::XCEngine::UI::UIColor& previewColor,
float borderThickness = 1.0f,
float cornerRounding = 0.0f);
void AppendUIEditorTreeViewDropPreview(
::XCEngine::UI::UIDrawList& drawList,
const Widgets::UIEditorTreeViewLayout& layout,