1#ifndef YAZE_APP_EDITOR_MENU_RIGHT_DRAWER_MANAGER_H_
2#define YAZE_APP_EDITOR_MENU_RIGHT_DRAWER_MANAGER_H_
7#include <unordered_map>
11#include "imgui/imgui.h"
32class SelectionPropertiesPanel;
33class ProjectManagementPanel;
101 void SetToolOutput(std::string title, std::string query, std::string content,
102 ToolOutputActions actions = {});
127 [[deprecated(
"Use ToggleDrawer() instead.")]]
137 [[deprecated(
"Use OpenDrawer() instead.")]]
146 [[deprecated(
"Use CloseDrawer() instead.")]]
158 [[deprecated(
"Use CycleDrawer() instead.")]]
162 [[deprecated(
"Use CycleToNextDrawer() instead.")]]
166 [[deprecated(
"Use CycleToPreviousDrawer() instead.")]]
183 [[deprecated(
"Use IsDrawerExpanded() instead.")]]
192 [[deprecated(
"Use GetActiveDrawer() instead.")]]
201 [[deprecated(
"Use IsDrawerActive() instead.")]]
214 [[deprecated(
"Use GetDrawerWidth() instead.")]]
228 [[deprecated(
"Use SetDrawerWidth() instead.")]]
237 [[deprecated(
"Use ResetDrawerWidths() instead.")]]
250 [[deprecated(
"Use GetDefaultDrawerWidth() instead.")]]
278 const std::unordered_map<std::string, float>& widths);
279 [[deprecated(
"Use SerializeDrawerWidths() instead.")]]
283 [[deprecated(
"Use RestoreDrawerWidths() instead.")]]
285 const std::unordered_map<std::string, float>& widths) {
290 std::function<
void(
DrawerType,
float)> callback) {
293 [[deprecated(
"Use SetDrawerWidthChangedCallback() instead.")]]
295 std::function<
void(
PanelType,
float)> callback) {
317 [[deprecated(
"Use DrawDrawerToggleButtons() instead.")]]
356 bool default_open =
true);
363 const std::string& fallback)
const;
364 void DrawShortcutRow(
const std::string& action,
const char* description,
365 const std::string& fallback);
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Unified Agent Chat Component.
Panel for managing project settings, ROM versions, and snapshots.
ImGui drawer for displaying and managing agent proposals.
Manages right-side sliding drawers for agent chat, proposals, settings.
RightDrawerManager & operator=(const RightDrawerManager &)=delete
void CycleDrawer(int direction)
Cycle to the next/previous right drawer in header order.
void SetToastManager(ToastManager *manager)
bool DrawDrawerToggleButtons()
Draw drawer toggle buttons for the status cluster.
void DrawPanelDescription(const char *text)
void DrawEditorContextHeader()
static std::string PanelTypeKey(PanelType type)
const std::string & tool_output_query() const
void NotifyPanelWidthChanged(PanelType type, float width)
EditorType active_editor_type_
void SetDrawerWidthChangedCallback(std::function< void(DrawerType, float)> callback)
void RestorePanelWidths(const std::unordered_map< std::string, float > &widths)
void TogglePanel(PanelType type)
void SetActiveEditor(EditorType type)
Set the active editor for context-aware help content.
void DrawEditorSpecificShortcuts()
void DrawShortcutRow(const std::string &action, const char *description, const std::string &fallback)
std::string GetShortcutLabel(const std::string &action, const std::string &fallback) const
float GetClampedPanelWidth(PanelType type, float viewport_width) const
void OpenDrawer(DrawerType type)
Open a specific drawer.
void SetDrawerWidth(DrawerType type, float width)
Set drawer width for a specific drawer type.
void SetPanelWidth(PanelType type, float width)
RightDrawerManager(const RightDrawerManager &)=delete
void SetToolOutput(std::string title, std::string query, std::string content, ToolOutputActions actions={})
float GetPanelWidth() const
static float GetDefaultPanelWidth(PanelType type, EditorType editor=EditorType::kUnknown)
ToolOutputActions tool_output_actions_
void DrawPanelValue(const char *label, const char *value)
void Draw()
Draw the drawer and its contents.
void SetAgentChat(AgentChat *chat)
static constexpr float GetCollapsedWidth()
Get the width of the collapsed panel strip (toggle buttons)
std::function< void(PanelType, float)> on_panel_width_changed_
PanelType GetActivePanel() const
void DrawGlobalShortcuts()
ProjectManagementPanel * project_panel() const
void ResetDrawerWidths()
Reset all drawer widths to their defaults.
void SetProjectManagementPanel(ProjectManagementPanel *panel)
void DrawPanelHeader(const char *title, const char *icon)
void DrawEditorSpecificHelp()
bool DrawPanelToggleButtons()
SelectionPropertiesPanel * properties_panel_
bool BeginPanelSection(const char *label, const char *icon=nullptr, bool default_open=true)
void ToggleDrawer(DrawerType type)
Toggle a specific drawer on/off.
SelectionPropertiesPanel * properties_panel() const
float notifications_width_
void DrawProposalsPanel()
void SetSettingsPanel(SettingsPanel *panel)
void SetDrawerSizeLimits(DrawerType type, const PanelSizeLimits &limits)
AgentChat * agent_chat() const
bool IsPanelExpanded() const
static float GetDefaultDrawerWidth(DrawerType type, EditorType editor=EditorType::kUnknown)
Get the default width for a specific drawer type.
void OpenPanel(PanelType type)
ShortcutManager * shortcut_manager_
const std::string & tool_output_content() const
void SetPanelWidthChangedCallback(std::function< void(PanelType, float)> callback)
const std::string & tool_output_title() const
std::string tool_output_title_
float GetConfiguredPanelWidth(PanelType type) const
void DrawQuickActionButtons()
ProposalDrawer * proposal_drawer() const
std::unordered_map< std::string, PanelSizeLimits > panel_size_limits_
void DrawPropertiesPanel()
RightDrawerManager()=default
void DrawAgentChatPanel()
SettingsPanel * settings_panel_
void SetProposalDrawer(ProposalDrawer *drawer)
bool IsPanelActive(PanelType type) const
void DrawNotificationsPanel()
ToastManager * toast_manager_
DrawerType GetActiveDrawer() const
Get the currently active drawer type.
PanelSizeLimits GetDrawerSizeLimits(DrawerType type) const
bool IsDrawerActive(DrawerType type) const
Check if a specific drawer is active.
bool IsDrawerExpanded() const
Check if any drawer is currently expanded (or animating closed)
float GetDrawerWidth() const
Get the width of the drawer when expanded.
std::string tool_output_content_
void OnHostVisibilityChanged(bool visible)
Snap transient animations when host visibility changes.
void DrawPanelLabel(const char *label)
bool DrawAgentQuickActions()
void CloseDrawer()
Close the currently active drawer.
void RestoreDrawerWidths(const std::unordered_map< std::string, float > &widths)
void CycleToPreviousPanel()
std::unordered_map< std::string, float > SerializeDrawerWidths() const
Persist/restore per-drawer widths for user settings.
std::unordered_map< std::string, float > SerializePanelWidths() const
SettingsPanel * settings_panel() const
void CyclePanel(int direction)
ProposalDrawer * proposal_drawer_
std::string tool_output_query_
void CycleToPreviousDrawer()
ProjectManagementPanel * project_panel_
void DrawToolOutputPanel()
void SetPropertiesPanel(SelectionPropertiesPanel *panel)
PanelSizeLimits GetPanelSizeLimits(PanelType type) const
void SetShortcutManager(ShortcutManager *manager)
~RightDrawerManager()=default
void SetPanelSizeLimits(PanelType type, const PanelSizeLimits &limits)
Set sizing constraints for an individual right panel.
Full-editing properties panel for selected entities.
Manages the settings UI displayed in the right sidebar.
const char * GetDrawerTypeName(RightDrawerManager::DrawerType type)
const char * GetPanelTypeName(RightDrawerManager::PanelType type)
Get the name of a panel type.
const char * GetDrawerTypeIcon(RightDrawerManager::DrawerType type)
const char * GetPanelTypeIcon(RightDrawerManager::PanelType type)
Get the icon for a panel type.
static constexpr float kPanelWidthSettings
static constexpr float kPanelWidthHelp
static constexpr float kPanelWidthNotifications
static constexpr float kMaxPanelWidthRatio
static constexpr float kPanelWidthProject
static constexpr float kPanelWidthProposals
static constexpr float kPanelWidthProperties
static constexpr float kPanelWidthAgentChat