Unravel Engine C++ Reference
Loading...
Searching...
No Matches
panel.h
Go to the documentation of this file.
1#pragma once
2
3#include <base/basetypes.hpp>
4#include <context/context.hpp>
5#include <graphics/texture.h>
6
7#include "panel_base.h"
8#include "layout_manager.h"
10#include "mcp_panel/mcp_panel.h"
14#include "dockspace.h"
27
28namespace unravel
29{
30
32{
33public:
36
37 void init(rtti::context& ctx);
38 void deinit(rtti::context& ctx);
39
44
49 auto get_game_panel() -> game_panel&;
54 auto get_mcp_panel() -> mcp_panel&;
56 auto get_dockspace() -> dockspace&;
57 void set_external_drop_in_progress(bool in_progress);
58
59 auto get_external_drop_in_progress() const -> bool;
60
61 void set_external_drop_position(ImVec2 pos);
62
63 auto get_external_drop_position() const -> const ImVec2&;
64
65 void add_external_drop_file(const std::string& file);
66
68
69 auto get_external_drop_files() const -> const std::vector<std::string>&;
70
73
75 auto gpu_profiler_enabled() -> bool& { return gpu_profiler_enabled_; }
76
77private:
78
79 panel_base* full_screen_panel_{};
80 panel_base* last_focused_panel_{};
81 std::shared_ptr<console_log_panel> console_log_panel_;
82 std::unique_ptr<content_browser_panel> content_browser_panel_;
83 std::unique_ptr<hierarchy_panel> hierarchy_panel_;
84 std::unique_ptr<inspector_panel> inspector_panel_;
85 std::unique_ptr<scene_panel> scene_panel_;
86 std::unique_ptr<game_panel> game_panel_;
87 std::unique_ptr<profiler_timeline_panel> profiler_timeline_panel_;
88 std::unique_ptr<header_panel> header_panel_;
89 std::unique_ptr<footer_panel> footer_panel_;
90 std::unique_ptr<deploy_panel> deploy_panel_;
91 std::unique_ptr<project_settings_panel> project_settings_panel_;
92 std::unique_ptr<editor_settings_panel> editor_settings_panel_;
93 std::unique_ptr<style_panel> style_panel_;
94 std::unique_ptr<undo_redo_panel> undo_redo_panel_;
95
96 std::unique_ptr<animation_panel> animation_panel_;
97 std::unique_ptr<mcp_panel> mcp_panel_;
98
99 std::unique_ptr<dockspace> cenral_dockspace_;
100 layout_manager layout_manager_;
101 std::unique_ptr<layout_panel> layout_panel_;
102
103 struct external_drop_data
104 {
105 bool drop_in_progress{};
106 ImVec2 drop_position{};
107 std::vector<std::string> drop_files{};
108 } external_drop_data_;
109
110 bool gpu_profiler_enabled_{false};
111};
112} // namespace unravel
auto get_profiler_timeline_panel() -> profiler_timeline_panel &
Definition panel.cpp:236
void set_external_drop_in_progress(bool in_progress)
Definition panel.cpp:246
void add_external_drop_file(const std::string &file)
Definition panel.cpp:266
void on_frame_ui_render(rtti::context &ctx)
Definition panel.cpp:92
auto get_project_settings_panel() -> project_settings_panel &
Definition panel.cpp:191
auto get_external_drop_position() const -> const ImVec2 &
Definition panel.cpp:261
auto get_scene_panel() -> scene_panel &
Definition panel.cpp:201
void on_frame_update(rtti::context &ctx, delta_t dt)
Definition panel.cpp:74
void on_frame_render(rtti::context &ctx, delta_t dt)
Definition panel.cpp:86
auto get_game_panel() -> game_panel &
Definition panel.cpp:206
auto get_dockspace() -> dockspace &
Definition panel.cpp:221
void on_frame_before_render(rtti::context &ctx, delta_t dt)
Definition panel.cpp:80
void clear_external_drop_files()
Definition panel.cpp:271
auto get_deploy_panel() -> deploy_panel &
Definition panel.cpp:186
auto get_console_log_panel() -> console_log_panel &
Definition panel.cpp:211
auto get_external_drop_files() const -> const std::vector< std::string > &
Definition panel.cpp:276
auto get_external_drop_in_progress() const -> bool
Definition panel.cpp:251
void deinit(rtti::context &ctx)
Definition panel.cpp:64
auto get_editor_settings_panel() -> editor_settings_panel &
Definition panel.cpp:196
auto get_layout_panel() -> layout_panel &
Definition panel.cpp:286
auto get_style_panel() -> style_panel &
Definition panel.cpp:216
void set_external_drop_position(ImVec2 pos)
Definition panel.cpp:256
auto get_animation_panel() -> animation_panel &
Definition panel.cpp:226
auto get_layout_manager() -> layout_manager &
Definition panel.cpp:281
void init(rtti::context &ctx)
Definition panel.cpp:48
auto get_mcp_panel() -> mcp_panel &
Definition panel.cpp:231
auto gpu_profiler_enabled() -> bool &
Shared with profiler_timeline_panel for gfx view/encoder timing (Render Passes section).
Definition panel.h:75
auto get_undo_redo_panel() -> undo_redo_panel &
Definition panel.cpp:241
std::chrono::duration< float > delta_t