Refactor editor windowing and update renderer regression
This commit is contained in:
@@ -4,73 +4,14 @@
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#include "Windowing/Host/EditorWindowTypes.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
enum class EditorWindowLifecycleState : std::uint8_t {
|
||||
PendingNativeCreate = 0,
|
||||
NativeAttached,
|
||||
Initializing,
|
||||
Running,
|
||||
Closing,
|
||||
Destroyed,
|
||||
};
|
||||
|
||||
enum class EditorWindowCategory : std::uint8_t {
|
||||
Workspace = 0,
|
||||
Utility,
|
||||
};
|
||||
|
||||
inline std::string_view GetEditorWindowCategoryName(
|
||||
EditorWindowCategory category) {
|
||||
switch (category) {
|
||||
case EditorWindowCategory::Workspace:
|
||||
return "Workspace";
|
||||
case EditorWindowCategory::Utility:
|
||||
return "Utility";
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
struct EditorWindowChromePolicy {
|
||||
bool allowDetachedTitleBarTabStrip = true;
|
||||
bool showFrameStats = true;
|
||||
bool showTopmostButton = false;
|
||||
bool topmostByDefault = false;
|
||||
};
|
||||
|
||||
struct EditorWindowNativeStylePolicy {
|
||||
DWORD extendedWindowStyle = WS_EX_APPWINDOW;
|
||||
DWORD windowStyle = 0;
|
||||
bool useHostWindowStyle = true;
|
||||
};
|
||||
|
||||
inline std::string_view GetEditorWindowLifecycleStateName(
|
||||
EditorWindowLifecycleState state) {
|
||||
switch (state) {
|
||||
case EditorWindowLifecycleState::PendingNativeCreate:
|
||||
return "PendingNativeCreate";
|
||||
case EditorWindowLifecycleState::NativeAttached:
|
||||
return "NativeAttached";
|
||||
case EditorWindowLifecycleState::Initializing:
|
||||
return "Initializing";
|
||||
case EditorWindowLifecycleState::Running:
|
||||
return "Running";
|
||||
case EditorWindowLifecycleState::Closing:
|
||||
return "Closing";
|
||||
case EditorWindowLifecycleState::Destroyed:
|
||||
return "Destroyed";
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
struct EditorWindowWindowState {
|
||||
HWND hwnd = nullptr;
|
||||
std::string windowId = {};
|
||||
|
||||
Reference in New Issue
Block a user