20#include "inputsmanager.h"
24#if defined(__has_include)
25 #if __has_include(<SDL3/SDL_syswm.h>)
26 #include <SDL3/SDL_syswm.h>
27 #define HAVE_SDL_SYSWM 1
50 name =
"PanelManager";
79 wc.cbSize =
sizeof(
wc);
85 wc.lpszClassName =
TEXT(
"OlympePanelClass");
97 kv.second.hwnd =
nullptr;
98 kv.second.hwndChild =
nullptr;
99 if (
kv.second.hMenu) {
101 kv.second.hMenu =
nullptr;
127 HWND parent =
nullptr;
137 if (
id ==
"log_window")
149 else if (
id ==
"inputs_inspector")
161 std::string text =
"(initializing)\r\n";
181 HWND hwnd =
it->second.hwnd;
183 if (
it->second.hwndChild)
195 CreatePanel(
"object_inspector",
"Object Inspector");
210 HWND hwnd =
it->second.hwnd;
246 it->second.visible =
true;
257 it->second.visible =
false;
268 return it->second.visible;
280 std::string
s = text +
"\r\n";
325 SYSTEM_LOG <<
"Menu: File->New selected (not implemented)\n";
328 SYSTEM_LOG <<
"Menu: File->Load selected (not implemented)\n";
331 SYSTEM_LOG <<
"Menu: File->Save selected (not implemented)\n";
352 switch (
msg.msg_type)
428 std::lock_guard<std::mutex>
lock(
mgr.m_mutex_);
431 if (
kv.second.hwnd == hwnd)
462 CreatePanel(
"inputs_inspector",
"Inputs Inspector");
467 HWND hwnd =
it->second.hwnd;
470 if (
it->second.hwndChild)
488 if (!
it->second.hwndChild)
return;
ComponentTypeID GetComponentTypeID_Static()
void Register(void *owner, EventType type, Listener callback)
static EventManager & Get()
void ShowPanel(const std::string &id)
static int LogPanelHeight
void CreateMainMenuWindow()
void UpdateInputsInspectorList()
static int TreeViewPanelPosX
void AppendLog(const std::string &text)
static int InspectorPanelHeight
void CreateInputsInspectorWindow()
void HidePanel(const std::string &id)
void CreateObjectInspectorWindow()
std::unordered_map< std::string, Panel > m_panels_
bool IsPanelVisible(const std::string &id) const
static int InspectorPanelWidth
static int InspectorPanelPosY
void CreateTreeViewWindow()
static int TreeViewPanelPosY
void CreatePanel(const std::string &id, const std::string &title)
void AttachToSDLWindow(SDL_Window *sdlWindow)
static PanelManager & GetInstance()
void HandleEvent(const SDL_Event *ev)
virtual void OnEvent(const Message &msg)
static int InspectorPanelPosX
static int TreeViewPanelHeight
static int TreeViewPanelWidth
void AppendToLogWindow(const std::string &text)
@ Olympe_EventType_Keyboard_Connected
@ Olympe_EventType_Keyboard_Disconnected
@ Olympe_EventType_Joystick_Connected
@ Olympe_EventType_Mouse_Connected
@ Olympe_EventType_Joystick_Disconnected
@ Olympe_EventType_Mouse_Disconnected