#pragma once #include #include #include namespace XCEngine::UI::Editor { struct UIEditorScrollViewInteractionState { Widgets::UIEditorScrollViewState scrollViewState = {}; ::XCEngine::UI::UIPoint pointerPosition = {}; float thumbDragStartPointerY = 0.0f; float thumbDragStartOffset = 0.0f; bool hasPointerPosition = false; }; struct UIEditorScrollViewInteractionResult { bool consumed = false; bool offsetChanged = false; bool focusChanged = false; bool startedThumbDrag = false; bool endedThumbDrag = false; Widgets::UIEditorScrollViewHitTarget hitTarget = {}; float verticalOffset = 0.0f; }; struct UIEditorScrollViewInteractionFrame { Widgets::UIEditorScrollViewLayout layout = {}; UIEditorScrollViewInteractionResult result = {}; }; UIEditorScrollViewInteractionFrame UpdateUIEditorScrollViewInteraction( UIEditorScrollViewInteractionState& state, float& verticalOffset, const ::XCEngine::UI::UIRect& bounds, float contentHeight, const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents, const Widgets::UIEditorScrollViewMetrics& metrics = {}); } // namespace XCEngine::UI::Editor