Manages right-side sliding panels for agent chat, proposals, settings. More...
#include <right_panel_manager.h>
Public Types | |
| enum class | PanelType { kNone = 0 , kAgentChat , kProposals , kSettings , kHelp , kNotifications , kProperties , kProject } |
Public Member Functions | |
| RightPanelManager ()=default | |
| ~RightPanelManager ()=default | |
| RightPanelManager (const RightPanelManager &)=delete | |
| RightPanelManager & | operator= (const RightPanelManager &)=delete |
| void | SetAgentChat (AgentChat *chat) |
| void | SetProposalDrawer (ProposalDrawer *drawer) |
| void | SetSettingsPanel (SettingsPanel *panel) |
| void | SetPropertiesPanel (SelectionPropertiesPanel *panel) |
| void | SetProjectManagementPanel (ProjectManagementPanel *panel) |
| void | SetToastManager (ToastManager *manager) |
| void | SetRom (Rom *rom) |
| void | SetActiveEditor (EditorType type) |
| Set the active editor for context-aware help content. | |
| void | TogglePanel (PanelType type) |
| Toggle a specific panel on/off. | |
| void | OpenPanel (PanelType type) |
| Open a specific panel. | |
| void | ClosePanel () |
| Close the currently active panel. | |
| bool | IsPanelExpanded () const |
| Check if any panel is currently expanded. | |
| PanelType | GetActivePanel () const |
| Get the currently active panel type. | |
| bool | IsPanelActive (PanelType type) const |
| Check if a specific panel is active. | |
| float | GetPanelWidth () const |
| Get the width of the panel when expanded. | |
| void | SetPanelWidth (PanelType type, float width) |
| Set panel width for a specific panel type. | |
| void | Draw () |
| Draw the panel and its contents. | |
| bool | DrawPanelToggleButtons () |
| Draw toggle buttons for the status cluster. | |
| AgentChat * | agent_chat () const |
| ProposalDrawer * | proposal_drawer () const |
| SettingsPanel * | settings_panel () const |
| SelectionPropertiesPanel * | properties_panel () const |
| ProjectManagementPanel * | project_panel () const |
Static Public Member Functions | |
| static constexpr float | GetCollapsedWidth () |
| Get the width of the collapsed panel strip (toggle buttons) | |
Private Member Functions | |
| void | DrawPanelHeader (const char *title, const char *icon) |
| void | DrawAgentChatPanel () |
| void | DrawProposalsPanel () |
| void | DrawSettingsPanel () |
| void | DrawHelpPanel () |
| void | DrawNotificationsPanel () |
| void | DrawPropertiesPanel () |
| void | DrawProjectPanel () |
| void | DrawEditorContextHeader () |
| void | DrawGlobalShortcuts () |
| void | DrawEditorSpecificShortcuts () |
| void | DrawEditorSpecificHelp () |
| void | DrawQuickActionButtons () |
| void | DrawAboutSection () |
| bool | BeginPanelSection (const char *label, const char *icon=nullptr, bool default_open=true) |
| void | EndPanelSection () |
| void | DrawPanelDivider () |
| void | DrawPanelLabel (const char *label) |
| void | DrawPanelValue (const char *label, const char *value) |
| void | DrawPanelDescription (const char *text) |
Private Attributes | |
| PanelType | active_panel_ = PanelType::kNone |
| EditorType | active_editor_type_ = EditorType::kUnknown |
| float | agent_chat_width_ = 420.0f |
| float | proposals_width_ = 420.0f |
| float | settings_width_ = 420.0f |
| float | help_width_ = 380.0f |
| float | notifications_width_ = 420.0f |
| float | properties_width_ = 320.0f |
| float | project_width_ = 380.0f |
| AgentChat * | agent_chat_ = nullptr |
| ProposalDrawer * | proposal_drawer_ = nullptr |
| SettingsPanel * | settings_panel_ = nullptr |
| SelectionPropertiesPanel * | properties_panel_ = nullptr |
| ProjectManagementPanel * | project_panel_ = nullptr |
| ToastManager * | toast_manager_ = nullptr |
| Rom * | rom_ = nullptr |
| float | panel_animation_ = 0.0f |
| bool | animating_ = false |
Manages right-side sliding panels for agent chat, proposals, settings.
Provides a unified panel system on the right side of the application that:
Usage:
Definition at line 51 of file right_panel_manager.h.
|
strong |
| Enumerator | |
|---|---|
| kNone | |
| kAgentChat | |
| kProposals | |
| kSettings | |
| kHelp | |
| kNotifications | |
| kProperties | |
| kProject | |
Definition at line 53 of file right_panel_manager.h.
|
default |
|
default |
|
delete |
|
delete |
|
inline |
Definition at line 75 of file right_panel_manager.h.
References agent_chat_.
|
inline |
Definition at line 76 of file right_panel_manager.h.
References proposal_drawer_.
|
inline |
Definition at line 77 of file right_panel_manager.h.
References settings_panel_.
|
inline |
Definition at line 78 of file right_panel_manager.h.
References properties_panel_.
|
inline |
Definition at line 81 of file right_panel_manager.h.
References project_panel_.
|
inline |
Definition at line 84 of file right_panel_manager.h.
References toast_manager_.
|
inline |
Definition at line 85 of file right_panel_manager.h.
References rom_.
|
inline |
Set the active editor for context-aware help content.
| type | The currently active editor type |
Definition at line 91 of file right_panel_manager.h.
References active_editor_type_.
| void yaze::editor::RightPanelManager::TogglePanel | ( | PanelType | type | ) |
Toggle a specific panel on/off.
| type | Panel type to toggle |
If the panel is already active, it will be closed. If another panel is active, it will be closed and this one opened.
Definition at line 67 of file right_panel_manager.cc.
References active_panel_, ClosePanel(), and OpenPanel().
Referenced by DrawPanelToggleButtons().

| void yaze::editor::RightPanelManager::OpenPanel | ( | PanelType | type | ) |
Open a specific panel.
| type | Panel type to open |
Definition at line 75 of file right_panel_manager.cc.
References active_panel_, animating_, and panel_animation_.
Referenced by yaze::editor::EditorActivator::HandleNonEditorClassSwitch(), and TogglePanel().
| void yaze::editor::RightPanelManager::ClosePanel | ( | ) |
Close the currently active panel.
Definition at line 81 of file right_panel_manager.cc.
References active_panel_, animating_, kNone, and panel_animation_.
Referenced by Draw(), DrawPanelHeader(), yaze::editor::EditorActivator::HandleNonEditorClassSwitch(), and TogglePanel().
|
inline |
Check if any panel is currently expanded.
Definition at line 120 of file right_panel_manager.h.
References active_panel_, and kNone.
Referenced by yaze::editor::UICoordinator::DrawMenuBarExtras().
|
inline |
Get the currently active panel type.
Definition at line 125 of file right_panel_manager.h.
References active_panel_.
Referenced by yaze::editor::EditorActivator::HandleNonEditorClassSwitch().
|
inline |
Check if a specific panel is active.
Definition at line 130 of file right_panel_manager.h.
References active_panel_.
Referenced by yaze::editor::UICoordinator::DrawNotificationBell(), and DrawPanelToggleButtons().
| float yaze::editor::RightPanelManager::GetPanelWidth | ( | ) | const |
Get the width of the panel when expanded.
Definition at line 87 of file right_panel_manager.cc.
References active_panel_, agent_chat_width_, help_width_, kAgentChat, kHelp, kNone, kNotifications, kProject, kProperties, kProposals, kSettings, notifications_width_, project_width_, properties_width_, proposals_width_, and settings_width_.
Referenced by Draw(), yaze::editor::UICoordinator::DrawMenuBarExtras(), and yaze::editor::LayoutCoordinator::GetRightLayoutOffset().
|
inlinestaticconstexpr |
Get the width of the collapsed panel strip (toggle buttons)
Definition at line 144 of file right_panel_manager.h.
| void yaze::editor::RightPanelManager::SetPanelWidth | ( | PanelType | type, |
| float | width ) |
Set panel width for a specific panel type.
Definition at line 112 of file right_panel_manager.cc.
References agent_chat_width_, help_width_, kAgentChat, kHelp, kNotifications, kProject, kProperties, kProposals, kSettings, notifications_width_, project_width_, properties_width_, proposals_width_, and settings_width_.
| void yaze::editor::RightPanelManager::Draw | ( | ) |
Draw the panel and its contents.
Should be called after the main docking space is drawn. The panel will position itself on the right edge.
Definition at line 140 of file right_panel_manager.cc.
References active_panel_, ClosePanel(), DrawAgentChatPanel(), DrawHelpPanel(), DrawNotificationsPanel(), DrawPanelHeader(), DrawProjectPanel(), DrawPropertiesPanel(), DrawProposalsPanel(), DrawSettingsPanel(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetOutlineVec4(), yaze::editor::GetPanelTypeIcon(), yaze::editor::GetPanelTypeName(), GetPanelWidth(), yaze::gui::GetSurfaceContainerVec4(), kAgentChat, kHelp, kNone, kNotifications, kProject, kProperties, kProposals, and kSettings.
| bool yaze::editor::RightPanelManager::DrawPanelToggleButtons | ( | ) |
Draw toggle buttons for the status cluster.
Returns true if any button was clicked.
Definition at line 1084 of file right_panel_manager.cc.
References yaze::gui::GetPrimaryVec4(), yaze::gui::GetSurfaceContainerHighestVec4(), yaze::gui::GetSurfaceContainerHighVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_FOLDER_SPECIAL, ICON_MD_HELP_OUTLINE, ICON_MD_LIST_ALT, ICON_MD_SETTINGS, ICON_MD_SMART_TOY, IsPanelActive(), kAgentChat, kHelp, kProject, kProperties, kSettings, and TogglePanel().
Referenced by yaze::editor::UICoordinator::DrawMenuBarExtras().
|
inline |
Definition at line 174 of file right_panel_manager.h.
References agent_chat_.
|
inline |
Definition at line 175 of file right_panel_manager.h.
References proposal_drawer_.
|
inline |
Definition at line 176 of file right_panel_manager.h.
References settings_panel_.
|
inline |
Definition at line 177 of file right_panel_manager.h.
References properties_panel_.
|
inline |
Definition at line 178 of file right_panel_manager.h.
References project_panel_.
|
private |
Definition at line 225 of file right_panel_manager.cc.
References active_panel_, ClosePanel(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetOutlineVec4(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetSurfaceContainerHighestVec4(), yaze::gui::GetSurfaceContainerHighVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_CLOSE, ICON_MD_LOCK, ICON_MD_LOCK_OPEN, and kProperties.
Referenced by Draw().
|
private |
Definition at line 395 of file right_panel_manager.cc.
References yaze::editor::AgentChat::active(), agent_chat_, yaze::editor::AgentChat::auto_scroll(), yaze::editor::AgentChat::ClearHistory(), yaze::editor::AgentChat::Draw(), DrawPanelDescription(), DrawPanelValue(), yaze::gui::GetOnSurfaceVec4(), yaze::gui::GetPrimaryActiveVec4(), yaze::gui::GetPrimaryHoverVec4(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetSurfaceContainerHighestVec4(), yaze::gui::GetSurfaceContainerHighVec4(), yaze::gui::GetSurfaceContainerVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_CHAT, ICON_MD_DELETE_FOREVER, ICON_MD_FILE_DOWNLOAD, ICON_MD_OPEN_IN_NEW, ICON_MD_SETTINGS, ICON_MD_SMART_TOY, ICON_MD_TUNE, yaze::editor::AgentChat::SaveHistory(), yaze::editor::AgentChat::ScrollToBottom(), yaze::editor::AgentChat::set_active(), yaze::editor::AgentChat::set_auto_scroll(), yaze::editor::AgentChat::set_show_reasoning(), yaze::editor::AgentChat::set_show_timestamps(), yaze::editor::AgentChat::show_reasoning(), and yaze::editor::AgentChat::show_timestamps().
Referenced by Draw().
|
private |
Definition at line 522 of file right_panel_manager.cc.
References yaze::editor::ProposalDrawer::DrawContent(), DrawPanelDescription(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_DESCRIPTION, proposal_drawer_, rom_, and yaze::editor::ProposalDrawer::SetRom().
Referenced by Draw().

|
private |
Definition at line 541 of file right_panel_manager.cc.
References yaze::editor::SettingsPanel::Draw(), DrawPanelDescription(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_SETTINGS, and settings_panel_.
Referenced by Draw().

|
private |
Definition at line 557 of file right_panel_manager.cc.
References BeginPanelSection(), DrawAboutSection(), DrawEditorContextHeader(), DrawEditorSpecificHelp(), DrawEditorSpecificShortcuts(), DrawGlobalShortcuts(), DrawQuickActionButtons(), EndPanelSection(), ICON_MD_BOLT, ICON_MD_HELP, ICON_MD_INFO, and ICON_MD_KEYBOARD.
Referenced by Draw().
|
private |
Definition at line 852 of file right_panel_manager.cc.
References yaze::editor::ToastManager::ClearHistory(), yaze::gui::ConvertColorToImVec4(), DrawPanelDescription(), DrawPanelDivider(), DrawPanelLabel(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::editor::ToastManager::GetHistory(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetSurfaceContainerHighestVec4(), yaze::gui::GetSurfaceContainerHighVec4(), yaze::gui::GetTextDisabledVec4(), yaze::gui::GetTextSecondaryVec4(), yaze::editor::ToastManager::GetUnreadCount(), ICON_MD_CHECK_CIRCLE, ICON_MD_DELETE_SWEEP, ICON_MD_DONE_ALL, ICON_MD_ERROR, ICON_MD_FIBER_MANUAL_RECORD, ICON_MD_INBOX, ICON_MD_INFO, ICON_MD_NOTIFICATIONS_OFF, ICON_MD_WARNING, yaze::editor::kError, yaze::editor::kSuccess, yaze::editor::kWarning, yaze::editor::ToastManager::MarkAllRead(), and toast_manager_.
Referenced by Draw().
|
private |
Definition at line 1004 of file right_panel_manager.cc.
References BeginPanelSection(), yaze::editor::SelectionPropertiesPanel::Draw(), DrawPanelDescription(), DrawPanelDivider(), DrawPanelValue(), EndPanelSection(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_PALETTE, ICON_MD_SELECT_ALL, ICON_MD_SETTINGS, ICON_MD_STRAIGHTEN, and properties_panel_.
Referenced by Draw().
|
private |
Definition at line 1044 of file right_panel_manager.cc.
References BeginPanelSection(), yaze::editor::ProjectManagementPanel::Draw(), DrawPanelDescription(), DrawPanelDivider(), EndPanelSection(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_CHECKLIST, ICON_MD_FOLDER_SPECIAL, ICON_MD_ROCKET_LAUNCH, and project_panel_.
Referenced by Draw().
|
private |
Definition at line 587 of file right_panel_manager.cc.
References active_editor_type_, DrawPanelDivider(), yaze::gui::GetPrimaryVec4(), ICON_MD_CASTLE, ICON_MD_CHAT, ICON_MD_HELP, ICON_MD_IMAGE, ICON_MD_LANDSCAPE, ICON_MD_MUSIC_NOTE, ICON_MD_PALETTE, ICON_MD_SMART_TOY, ICON_MD_TV, ICON_MD_VIDEOGAME_ASSET, yaze::editor::kDungeon, yaze::editor::kEmulator, yaze::editor::kGraphics, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, yaze::editor::kPalette, yaze::editor::kScreen, and yaze::editor::kSprite.
Referenced by DrawHelpPanel().

|
private |
Definition at line 640 of file right_panel_manager.cc.
References DrawPanelLabel(), DrawPanelValue(), and yaze::gui::GetCtrlDisplayName().
Referenced by DrawHelpPanel().

|
private |
Definition at line 655 of file right_panel_manager.cc.
References active_editor_type_, DrawPanelLabel(), DrawPanelValue(), yaze::gui::GetCtrlDisplayName(), yaze::gui::GetTextSecondaryVec4(), yaze::editor::kDungeon, yaze::editor::kGraphics, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, and yaze::editor::kPalette.
Referenced by DrawHelpPanel().

|
private |
Definition at line 727 of file right_panel_manager.cc.
References active_editor_type_, yaze::editor::kDungeon, yaze::editor::kGraphics, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, and yaze::editor::kPalette.
Referenced by DrawHelpPanel().
|
private |
Definition at line 789 of file right_panel_manager.cc.
References yaze::gui::GetSurfaceContainerHighestVec4(), yaze::gui::GetSurfaceContainerHighVec4(), ICON_MD_BUG_REPORT, ICON_MD_DESCRIPTION, and ICON_MD_FORUM.
Referenced by DrawHelpPanel().

|
private |
Definition at line 826 of file right_panel_manager.cc.
References DrawPanelDescription(), DrawPanelDivider(), DrawPanelLabel(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), and ICON_MD_LINK.
Referenced by DrawHelpPanel().
|
private |
Definition at line 316 of file right_panel_manager.cc.
References yaze::gui::GetSurfaceContainerHighestVec4(), and yaze::gui::GetSurfaceContainerHighVec4().
Referenced by DrawHelpPanel(), DrawProjectPanel(), and DrawPropertiesPanel().

|
private |
Definition at line 355 of file right_panel_manager.cc.
Referenced by DrawHelpPanel(), DrawProjectPanel(), and DrawPropertiesPanel().
|
private |
Definition at line 361 of file right_panel_manager.cc.
References yaze::gui::GetOutlineVec4().
Referenced by DrawAboutSection(), DrawEditorContextHeader(), DrawNotificationsPanel(), DrawProjectPanel(), and DrawPropertiesPanel().

|
private |
Definition at line 369 of file right_panel_manager.cc.
References yaze::gui::GetTextSecondaryVec4().
Referenced by DrawAboutSection(), DrawEditorSpecificShortcuts(), DrawGlobalShortcuts(), and DrawNotificationsPanel().

|
private |
Definition at line 375 of file right_panel_manager.cc.
References yaze::gui::GetTextSecondaryVec4().
Referenced by DrawAgentChatPanel(), DrawEditorSpecificShortcuts(), DrawGlobalShortcuts(), and DrawPropertiesPanel().

|
private |
Definition at line 383 of file right_panel_manager.cc.
References yaze::gui::GetTextDisabledVec4().
Referenced by DrawAboutSection(), DrawAgentChatPanel(), DrawNotificationsPanel(), DrawProjectPanel(), DrawPropertiesPanel(), DrawProposalsPanel(), and DrawSettingsPanel().

|
private |
Definition at line 208 of file right_panel_manager.h.
Referenced by ClosePanel(), Draw(), DrawPanelHeader(), GetActivePanel(), GetPanelWidth(), IsPanelActive(), IsPanelExpanded(), OpenPanel(), and TogglePanel().
|
private |
Definition at line 211 of file right_panel_manager.h.
Referenced by DrawEditorContextHeader(), DrawEditorSpecificHelp(), DrawEditorSpecificShortcuts(), and SetActiveEditor().
|
private |
Definition at line 214 of file right_panel_manager.h.
Referenced by GetPanelWidth(), and SetPanelWidth().
|
private |
Definition at line 215 of file right_panel_manager.h.
Referenced by GetPanelWidth(), and SetPanelWidth().
|
private |
Definition at line 216 of file right_panel_manager.h.
Referenced by GetPanelWidth(), and SetPanelWidth().
|
private |
Definition at line 217 of file right_panel_manager.h.
Referenced by GetPanelWidth(), and SetPanelWidth().
|
private |
Definition at line 218 of file right_panel_manager.h.
Referenced by GetPanelWidth(), and SetPanelWidth().
|
private |
Definition at line 219 of file right_panel_manager.h.
Referenced by GetPanelWidth(), and SetPanelWidth().
|
private |
Definition at line 220 of file right_panel_manager.h.
Referenced by GetPanelWidth(), and SetPanelWidth().
|
private |
Definition at line 223 of file right_panel_manager.h.
Referenced by agent_chat(), DrawAgentChatPanel(), and SetAgentChat().
|
private |
Definition at line 224 of file right_panel_manager.h.
Referenced by DrawProposalsPanel(), proposal_drawer(), and SetProposalDrawer().
|
private |
Definition at line 225 of file right_panel_manager.h.
Referenced by DrawSettingsPanel(), SetSettingsPanel(), and settings_panel().
|
private |
Definition at line 226 of file right_panel_manager.h.
Referenced by DrawPropertiesPanel(), properties_panel(), and SetPropertiesPanel().
|
private |
Definition at line 227 of file right_panel_manager.h.
Referenced by DrawProjectPanel(), project_panel(), and SetProjectManagementPanel().
|
private |
Definition at line 228 of file right_panel_manager.h.
Referenced by DrawNotificationsPanel(), and SetToastManager().
|
private |
Definition at line 229 of file right_panel_manager.h.
Referenced by DrawProposalsPanel(), and SetRom().
|
private |
Definition at line 232 of file right_panel_manager.h.
Referenced by ClosePanel(), and OpenPanel().
|
private |
Definition at line 233 of file right_panel_manager.h.
Referenced by ClosePanel(), and OpenPanel().