Add shell definition contract
This commit is contained in:
@@ -14,6 +14,12 @@
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorShellInteractionDefinition {
|
||||
UIEditorMenuModel menuModel = {};
|
||||
std::vector<Widgets::UIEditorStatusBarSegment> statusSegments = {};
|
||||
std::vector<UIEditorWorkspacePanelPresentationModel> workspacePresentations = {};
|
||||
};
|
||||
|
||||
struct UIEditorShellInteractionModel {
|
||||
UIEditorResolvedMenuModel resolvedMenuModel = {};
|
||||
std::vector<Widgets::UIEditorStatusBarSegment> statusSegments = {};
|
||||
@@ -41,6 +47,7 @@ struct UIEditorShellInteractionPalette {
|
||||
|
||||
struct UIEditorShellInteractionServices {
|
||||
const UIEditorCommandDispatcher* commandDispatcher = nullptr;
|
||||
const UIEditorShortcutManager* shortcutManager = nullptr;
|
||||
};
|
||||
|
||||
struct UIEditorShellInteractionMenuButtonRequest {
|
||||
@@ -112,6 +119,7 @@ struct UIEditorShellInteractionPopupFrame {
|
||||
};
|
||||
|
||||
struct UIEditorShellInteractionFrame {
|
||||
UIEditorShellInteractionModel model = {};
|
||||
UIEditorShellInteractionRequest request = {};
|
||||
UIEditorShellComposeFrame shellFrame = {};
|
||||
UIEditorWorkspaceInteractionFrame workspaceInteractionFrame = {};
|
||||
@@ -124,6 +132,11 @@ struct UIEditorShellInteractionFrame {
|
||||
bool focused = false;
|
||||
};
|
||||
|
||||
UIEditorShellInteractionModel ResolveUIEditorShellInteractionModel(
|
||||
const UIEditorWorkspaceController& controller,
|
||||
const UIEditorShellInteractionDefinition& definition,
|
||||
const UIEditorShellInteractionServices& services = {});
|
||||
|
||||
UIEditorShellInteractionRequest ResolveUIEditorShellInteractionRequest(
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const UIEditorWorkspaceController& controller,
|
||||
@@ -141,6 +154,23 @@ UIEditorShellInteractionFrame UpdateUIEditorShellInteraction(
|
||||
const UIEditorShellInteractionServices& services = {},
|
||||
const UIEditorShellInteractionMetrics& metrics = {});
|
||||
|
||||
UIEditorShellInteractionRequest ResolveUIEditorShellInteractionRequest(
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const UIEditorWorkspaceController& controller,
|
||||
const UIEditorShellInteractionDefinition& definition,
|
||||
const UIEditorShellInteractionState& state = {},
|
||||
const UIEditorShellInteractionMetrics& metrics = {},
|
||||
const UIEditorShellInteractionServices& services = {});
|
||||
|
||||
UIEditorShellInteractionFrame UpdateUIEditorShellInteraction(
|
||||
UIEditorShellInteractionState& state,
|
||||
UIEditorWorkspaceController& controller,
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const UIEditorShellInteractionDefinition& definition,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
const UIEditorShellInteractionServices& services = {},
|
||||
const UIEditorShellInteractionMetrics& metrics = {});
|
||||
|
||||
void AppendUIEditorShellInteraction(
|
||||
::XCEngine::UI::UIDrawList& drawList,
|
||||
const UIEditorShellInteractionFrame& frame,
|
||||
@@ -149,4 +179,11 @@ void AppendUIEditorShellInteraction(
|
||||
const UIEditorShellInteractionPalette& palette = {},
|
||||
const UIEditorShellInteractionMetrics& metrics = {});
|
||||
|
||||
void AppendUIEditorShellInteraction(
|
||||
::XCEngine::UI::UIDrawList& drawList,
|
||||
const UIEditorShellInteractionFrame& frame,
|
||||
const UIEditorShellInteractionState& state,
|
||||
const UIEditorShellInteractionPalette& palette = {},
|
||||
const UIEditorShellInteractionMetrics& metrics = {});
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
|
||||
Reference in New Issue
Block a user