#pragma once #include #include #include #include namespace XCEngine::UI::Editor { struct UIEditorTextFieldInteractionState { UIEditorEditableFieldSession session = {}; Widgets::UIEditorTextFieldState textFieldState = {}; }; struct UIEditorTextFieldInteractionResult { bool consumed = false; bool focusChanged = false; bool valueChanged = false; bool editStarted = false; bool editCommitted = false; bool editCanceled = false; Widgets::UIEditorTextFieldHitTarget hitTarget = {}; std::string valueBefore = {}; std::string valueAfter = {}; std::string committedText = {}; }; struct UIEditorTextFieldInteractionFrame { Widgets::UIEditorTextFieldLayout layout = {}; UIEditorTextFieldInteractionResult result = {}; }; UIEditorTextFieldInteractionFrame UpdateUIEditorTextFieldInteraction( UIEditorTextFieldInteractionState& state, Widgets::UIEditorTextFieldSpec& spec, const ::XCEngine::UI::UIRect& bounds, const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents, const Widgets::UIEditorTextFieldMetrics& metrics = {}); } // namespace XCEngine::UI::Editor