载入中...
搜索中...
未找到
EditorShell.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4#include "ui/Widget.h"
5
6#include <string>
7
8namespace eve::ui {
9
10class UIHost;
11
22public:
24 EditorShell() = default;
27 EditorShell(const EditorShell&) = delete;
29
36 void open(UIHostHandle inspector, UIHostHandle database, UIHostHandle scene);
38 void close();
40 bool isOpen() const;
42 [[nodiscard]] UIHostHandle host() const noexcept { return host_; }
43
49 bool selectPanel(const std::string& name);
50
52 bool togglePanel(const std::string& name);
53
55 WidgetDesc build();
56
57private:
58 void relayout();
59
60 UIHostHandle host_{};
61 UIHostHandle inspector_{};
62 UIHostHandle database_{};
63 UIHostHandle scene_{};
64 float toolbarHeight_ = 52.f;
65};
66
67} // namespace eve::ui
#define EVENGINE_API_WORLD
Definition Export.h:109
std::string name
std::weak_ptr< PrimitiveScene > scene
DevTools editor shell (main menu bar + docked panel layout).
Definition EditorShell.h:21
EditorShell(const EditorShell &)=delete
EditorShell & operator=(const EditorShell &)=delete
UIHostHandle host() const noexcept
Returns the menu-bar host handle, or an empty handle until open().
Definition EditorShell.h:42
EditorShell()=default
Editor shell.
ecs::EntityHandle UIHostHandle
Definition UIHost.h:16
Declarative widget description (build once / on dirty → flatten into UIHost::Tree).
Definition Widget.h:15