light/modules/ui/public/ui.hpp

46 lines
831 B
C++
Raw Normal View History

2022-03-08 21:19:19 +03:30
#pragma once
#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;
class UserInterface
2022-03-08 21:19:19 +03:30
{
public:
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;
void init(memory::Ref<SharedContext> sharedContext);
2022-03-08 21:19:19 +03:30
virtual void platform_implementation(memory::Ref<SharedContext> sharedContext) = 0;
2022-03-08 21:19:19 +03:30
virtual void begin() = 0;
2025-07-05 16:07:51 +03:30
virtual void end() = 0;
2022-03-08 21:19:19 +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;
void set_dark_theme_colors();
2022-03-08 21:19:19 +03:30
};
2025-07-11 00:05:48 +03:30
} // namespace lt