Refactor XCUI editor module layout
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Fields/UIEditorTextFieldInteraction.h>
|
||||
|
||||
#include <XCEngine/UI/Types.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorInlineRenameSessionState {
|
||||
bool active = false;
|
||||
std::string itemId = {};
|
||||
Widgets::UIEditorTextFieldSpec textFieldSpec = {};
|
||||
UIEditorTextFieldInteractionState textFieldInteraction = {};
|
||||
};
|
||||
|
||||
struct UIEditorInlineRenameSessionRequest {
|
||||
bool beginSession = false;
|
||||
std::string itemId = {};
|
||||
std::string initialText = {};
|
||||
::XCEngine::UI::UIRect bounds = {};
|
||||
};
|
||||
|
||||
struct UIEditorInlineRenameSessionResult {
|
||||
bool consumed = false;
|
||||
bool sessionStarted = false;
|
||||
bool sessionCommitted = false;
|
||||
bool sessionCanceled = false;
|
||||
bool valueChanged = false;
|
||||
bool active = false;
|
||||
std::string itemId = {};
|
||||
std::string valueBefore = {};
|
||||
std::string valueAfter = {};
|
||||
UIEditorTextFieldInteractionResult textFieldResult = {};
|
||||
};
|
||||
|
||||
struct UIEditorInlineRenameSessionFrame {
|
||||
Widgets::UIEditorTextFieldLayout layout = {};
|
||||
UIEditorInlineRenameSessionResult result = {};
|
||||
};
|
||||
|
||||
Widgets::UIEditorTextFieldMetrics BuildUIEditorInlineRenameTextFieldMetrics(
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const Widgets::UIEditorTextFieldMetrics& metrics = {});
|
||||
|
||||
UIEditorInlineRenameSessionFrame UpdateUIEditorInlineRenameSession(
|
||||
UIEditorInlineRenameSessionState& state,
|
||||
const UIEditorInlineRenameSessionRequest& request,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
const Widgets::UIEditorTextFieldMetrics& metrics = {});
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user