2022-03-08 21:19:19 +03:30
|
|
|
#pragma once
|
|
|
|
|
|
2025-10-05 10:07:36 +03:30
|
|
|
#include <memory/reference.hpp>
|
|
|
|
|
#include <memory/scope.hpp>
|
|
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
namespace lt {
|
2022-03-08 21:19:19 +03:30
|
|
|
|
|
|
|
|
class Event;
|
|
|
|
|
class SharedContext;
|
|
|
|
|
|
2025-07-10 13:29:03 +03:30
|
|
|
class UserInterface
|
2022-03-08 21:19:19 +03:30
|
|
|
{
|
|
|
|
|
public:
|
2025-10-16 11:57:09 +03:30
|
|
|
static auto create(memory::Ref<SharedContext> sharedContext) -> memory::Scope<UserInterface>;
|
2025-07-06 14:02:50 +03:30
|
|
|
|
|
|
|
|
static void dockspace_begin();
|
|
|
|
|
|
|
|
|
|
static void dockspace_end();
|
2022-03-08 21:19:19 +03:30
|
|
|
|
2025-07-05 13:28:41 +03:30
|
|
|
UserInterface(const UserInterface &) = delete;
|
2025-07-05 16:07:51 +03:30
|
|
|
|
2025-07-06 14:02:50 +03:30
|
|
|
auto operator=(const UserInterface &) -> UserInterface & = delete;
|
2022-03-08 21:19:19 +03:30
|
|
|
|
|
|
|
|
virtual ~UserInterface() = default;
|
|
|
|
|
|
2025-10-05 10:07:36 +03:30
|
|
|
void init(memory::Ref<SharedContext> sharedContext);
|
2022-03-08 21:19:19 +03:30
|
|
|
|
2025-10-05 10:07:36 +03:30
|
|
|
virtual void platform_implementation(memory::Ref<SharedContext> sharedContext) = 0;
|
2022-03-08 21:19:19 +03:30
|
|
|
|
2025-07-05 15:36:53 +03:30
|
|
|
virtual void begin() = 0;
|
2025-07-05 16:07:51 +03:30
|
|
|
|
2025-07-05 15:36:53 +03:30
|
|
|
virtual void end() = 0;
|
2022-03-08 21:19:19 +03:30
|
|
|
|
2025-07-05 15:36:53 +03:30
|
|
|
virtual void log_debug_data() = 0;
|
2022-03-08 21:19:19 +03:30
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
UserInterface();
|
|
|
|
|
|
|
|
|
|
private:
|
2025-07-05 16:07:51 +03:30
|
|
|
static UserInterface *s_context;
|
|
|
|
|
|
2025-07-05 15:36:53 +03:30
|
|
|
void set_dark_theme_colors();
|
2022-03-08 21:19:19 +03:30
|
|
|
};
|
|
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
} // namespace lt
|