#pragma once #include #include #include #include #include #include #include namespace XCEngine::UI::Editor { struct UIEditorTreeViewInteractionState { Widgets::UIEditorTreeViewState treeViewState = {}; ::XCEngine::UI::Widgets::UIKeyboardNavigationModel keyboardNavigation = {}; std::string selectionAnchorId = {}; ::XCEngine::UI::UIPoint pointerPosition = {}; bool hasPointerPosition = false; }; struct UIEditorTreeViewInteractionResult { bool consumed = false; bool selectionChanged = false; bool expansionChanged = false; bool keyboardNavigated = false; bool secondaryClicked = false; bool renameRequested = false; Widgets::UIEditorTreeViewHitTarget hitTarget = {}; std::string selectedItemId = {}; std::string renameItemId = {}; std::string toggledItemId = {}; std::size_t selectedVisibleIndex = Widgets::UIEditorTreeViewInvalidIndex; }; struct UIEditorTreeViewInteractionFrame { Widgets::UIEditorTreeViewLayout layout = {}; UIEditorTreeViewInteractionResult result = {}; }; UIEditorTreeViewInteractionFrame UpdateUIEditorTreeViewInteraction( UIEditorTreeViewInteractionState& state, ::XCEngine::UI::Widgets::UISelectionModel& selectionModel, ::XCEngine::UI::Widgets::UIExpansionModel& expansionModel, const ::XCEngine::UI::UIRect& bounds, const std::vector& items, const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents, const Widgets::UIEditorTreeViewMetrics& metrics = {}); } // namespace XCEngine::UI::Editor