new_editor: stabilize resize lifecycle groundwork
This commit is contained in:
@@ -6,17 +6,48 @@
|
||||
|
||||
#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,
|
||||
};
|
||||
|
||||
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 = {};
|
||||
std::wstring title = {};
|
||||
std::string titleText = {};
|
||||
bool primary = false;
|
||||
bool closing = false;
|
||||
EditorWindowLifecycleState lifecycle = EditorWindowLifecycleState::PendingNativeCreate;
|
||||
};
|
||||
|
||||
struct EditorWindowState {
|
||||
|
||||
Reference in New Issue
Block a user