57 lines
1.7 KiB
C++
57 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "Platform/Win32/Windowing/EditorWindowState.h"
|
|
#include "Platform/Win32/Windowing/EditorWindowTransferRequests.h"
|
|
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
class EditorWindowSession final {
|
|
public:
|
|
EditorWindowSession(
|
|
std::string windowId,
|
|
std::wstring title,
|
|
EditorWindowCategory category,
|
|
EditorWindowChromePolicy chromePolicy,
|
|
bool primary);
|
|
|
|
std::string_view GetWindowId() const;
|
|
HWND GetHwnd() const;
|
|
bool HasHwnd() const;
|
|
EditorWindowCategory GetCategory() const;
|
|
const EditorWindowChromePolicy& GetChromePolicy() const;
|
|
EditorWindowLifecycleState GetLifecycleState() const;
|
|
bool IsPrimary() const;
|
|
bool IsWorkspaceWindow() const;
|
|
bool IsUtilityWindow() const;
|
|
bool IsClosing() const;
|
|
bool IsDestroyed() const;
|
|
const std::wstring& GetTitle() const;
|
|
std::string_view GetCachedTitleText() const;
|
|
|
|
void AttachHwnd(HWND hwnd);
|
|
void MarkNativeAttached();
|
|
void MarkInitializing();
|
|
void MarkRunning();
|
|
void MarkDestroyed();
|
|
void MarkClosing();
|
|
void SetPrimary(bool primary);
|
|
void SetTitle(std::wstring title);
|
|
|
|
void QueueCompletedImmediateFrame(
|
|
EditorWindowFrameTransferRequests transferRequests);
|
|
bool HasQueuedCompletedImmediateFrame() const;
|
|
EditorWindowFrameTransferRequests ConsumeQueuedCompletedImmediateFrameTransferRequests();
|
|
|
|
private:
|
|
void UpdateCachedTitleText();
|
|
|
|
EditorWindowState m_state = {};
|
|
EditorWindowFrameTransferRequests m_queuedImmediateFrameTransferRequests = {};
|
|
bool m_hasQueuedCompletedImmediateFrame = false;
|
|
};
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|