yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
layout_coordinator.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_LAYOUT_LAYOUT_COORDINATOR_H_
2#define YAZE_APP_EDITOR_LAYOUT_LAYOUT_COORDINATOR_H_
3
4#include <functional>
5#include <memory>
6#include <string>
7
8#include "app/editor/editor.h"
11#include "imgui/imgui.h"
12
13namespace yaze {
14namespace editor {
15
16// Forward declarations
17class PanelManager;
18class UICoordinator;
19class ToastManager;
20class StatusBar;
21class RightPanelManager;
22
37 public:
50
51 LayoutCoordinator() = default;
52 ~LayoutCoordinator() = default;
53
58 void Initialize(const Dependencies& deps);
59
60 // ==========================================================================
61 // Layout Offset Calculations
62 // ==========================================================================
63
68 float GetLeftLayoutOffset() const;
69
74 float GetRightLayoutOffset() const;
75
80 float GetBottomLayoutOffset() const;
81
82 // ==========================================================================
83 // Layout Operations
84 // ==========================================================================
85
93
99 void ApplyLayoutPreset(const std::string& preset_name, size_t session_id);
100
106 void ResetCurrentEditorLayout(EditorType editor_type, size_t session_id);
107
108 // ==========================================================================
109 // Layout Rebuild Handling
110 // ==========================================================================
111
121 void ProcessLayoutRebuild(EditorType current_editor_type,
122 bool is_emulator_visible);
123
132
140 void QueueDeferredAction(std::function<void()> action);
141
148
149 // ==========================================================================
150 // Accessors
151 // ==========================================================================
152
155
156 bool IsInitialized() const { return layout_manager_ != nullptr; }
157
158 private:
159 // Dependencies (injected)
166
167 // Deferred action queue
168 std::vector<std::function<void()>> deferred_actions_;
169};
170
171} // namespace editor
172} // namespace yaze
173
174#endif // YAZE_APP_EDITOR_LAYOUT_LAYOUT_COORDINATOR_H_
175
Facade class that coordinates all layout-related operations.
std::vector< std::function< void()> > deferred_actions_
void QueueDeferredAction(std::function< void()> action)
Queue an action to be executed on the next frame.
void ProcessDeferredActions()
Process all queued deferred actions.
float GetBottomLayoutOffset() const
Get the bottom margin needed for status bar.
void ResetWorkspaceLayout()
Reset the workspace layout to defaults.
void ProcessLayoutRebuild(EditorType current_editor_type, bool is_emulator_visible)
Process pending layout rebuild requests.
void InitializeEditorLayout(EditorType type)
Initialize layout for an editor type on first activation.
float GetRightLayoutOffset() const
Get the right margin needed for panels.
void ResetCurrentEditorLayout(EditorType editor_type, size_t session_id)
Reset current editor layout to its default configuration.
void ApplyLayoutPreset(const std::string &preset_name, size_t session_id)
Apply a named layout preset.
void Initialize(const Dependencies &deps)
Initialize with all dependencies.
const LayoutManager * layout_manager() const
float GetLeftLayoutOffset() const
Get the left margin needed for sidebar (Activity Bar + Side Panel)
Manages ImGui DockBuilder layouts for each editor type.
Central registry for all editor cards with session awareness and dependency injection.
Manages right-side sliding panels for agent chat, proposals, settings.
A session-aware status bar displayed at the bottom of the application.
Definition status_bar.h:38
Handles all UI drawing operations and state management.
All dependencies required by LayoutCoordinator.