Refactor XCUI editor module layout
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Fields/UIEditorPropertyGrid.h>
|
||||
|
||||
#include <XCEngine/UI/Text/UITextInputController.h>
|
||||
#include <XCEngine/UI/Types.h>
|
||||
#include <XCEngine/UI/Widgets/UIExpansionModel.h>
|
||||
#include <XCEngine/UI/Widgets/UIKeyboardNavigationModel.h>
|
||||
#include <XCEngine/UI/Widgets/UIPropertyEditModel.h>
|
||||
#include <XCEngine/UI/Widgets/UISelectionModel.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorPropertyGridInteractionState {
|
||||
Widgets::UIEditorPropertyGridState propertyGridState = {};
|
||||
::XCEngine::UI::Widgets::UIKeyboardNavigationModel keyboardNavigation = {};
|
||||
::XCEngine::UI::Text::UITextInputState textInputState = {};
|
||||
::XCEngine::UI::UIPoint pointerPosition = {};
|
||||
std::size_t pressedPopupIndex = Widgets::UIEditorPropertyGridInvalidIndex;
|
||||
bool hasPointerPosition = false;
|
||||
};
|
||||
|
||||
struct UIEditorPropertyGridInteractionResult {
|
||||
bool consumed = false;
|
||||
bool sectionToggled = false;
|
||||
bool selectionChanged = false;
|
||||
bool keyboardNavigated = false;
|
||||
bool editStarted = false;
|
||||
bool editValueChanged = false;
|
||||
bool editCommitted = false;
|
||||
bool editCommitRejected = false;
|
||||
bool editCanceled = false;
|
||||
bool popupOpened = false;
|
||||
bool popupClosed = false;
|
||||
bool fieldValueChanged = false;
|
||||
bool secondaryClicked = false;
|
||||
Widgets::UIEditorPropertyGridHitTarget hitTarget = {};
|
||||
std::string toggledSectionId = {};
|
||||
std::string selectedFieldId = {};
|
||||
std::string activeFieldId = {};
|
||||
std::string committedFieldId = {};
|
||||
std::string committedValue = {};
|
||||
std::string changedFieldId = {};
|
||||
std::string changedValue = {};
|
||||
};
|
||||
|
||||
struct UIEditorPropertyGridInteractionFrame {
|
||||
Widgets::UIEditorPropertyGridLayout layout = {};
|
||||
UIEditorPropertyGridInteractionResult result = {};
|
||||
};
|
||||
|
||||
UIEditorPropertyGridInteractionFrame UpdateUIEditorPropertyGridInteraction(
|
||||
UIEditorPropertyGridInteractionState& state,
|
||||
::XCEngine::UI::Widgets::UISelectionModel& selectionModel,
|
||||
::XCEngine::UI::Widgets::UIExpansionModel& expansionModel,
|
||||
::XCEngine::UI::Widgets::UIPropertyEditModel& propertyEditModel,
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
std::vector<Widgets::UIEditorPropertyGridSection>& sections,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
const Widgets::UIEditorPropertyGridMetrics& metrics = {},
|
||||
const Widgets::UIEditorMenuPopupMetrics& popupMetrics = {});
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user