yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::RightPanelManager Class Reference

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
 
RightPanelManageroperator= (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.
 
AgentChatagent_chat () const
 
ProposalDrawerproposal_drawer () const
 
SettingsPanelsettings_panel () const
 
SelectionPropertiesPanelproperties_panel () const
 
ProjectManagementPanelproject_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
 
AgentChatagent_chat_ = nullptr
 
ProposalDrawerproposal_drawer_ = nullptr
 
SettingsPanelsettings_panel_ = nullptr
 
SelectionPropertiesPanelproperties_panel_ = nullptr
 
ProjectManagementPanelproject_panel_ = nullptr
 
ToastManagertoast_manager_ = nullptr
 
Romrom_ = nullptr
 
float panel_animation_ = 0.0f
 
bool animating_ = false
 

Detailed Description

Manages right-side sliding panels for agent chat, proposals, settings.

Provides a unified panel system on the right side of the application that:

  • Slides in/out from the right edge
  • Shifts the main docking space when expanded
  • Supports multiple panel types (agent chat, proposals, settings)
  • Only one panel can be active at a time

Usage:

RightPanelManager panel_manager;
panel_manager.SetAgentChat(&agent_chat);
panel_manager.Draw();
Manages right-side sliding panels for agent chat, proposals, settings.
void Draw()
Draw the panel and its contents.
ProposalDrawer * proposal_drawer() const
void TogglePanel(PanelType type)
Toggle a specific panel on/off.
void SetProposalDrawer(ProposalDrawer *drawer)

Definition at line 51 of file right_panel_manager.h.

Member Enumeration Documentation

◆ PanelType

Enumerator
kNone 
kAgentChat 
kProposals 
kSettings 
kHelp 
kNotifications 
kProperties 
kProject 

Definition at line 53 of file right_panel_manager.h.

Constructor & Destructor Documentation

◆ RightPanelManager() [1/2]

yaze::editor::RightPanelManager::RightPanelManager ( )
default

◆ ~RightPanelManager()

yaze::editor::RightPanelManager::~RightPanelManager ( )
default

◆ RightPanelManager() [2/2]

yaze::editor::RightPanelManager::RightPanelManager ( const RightPanelManager & )
delete

Member Function Documentation

◆ operator=()

RightPanelManager & yaze::editor::RightPanelManager::operator= ( const RightPanelManager & )
delete

◆ SetAgentChat()

void yaze::editor::RightPanelManager::SetAgentChat ( AgentChat * chat)
inline

Definition at line 75 of file right_panel_manager.h.

References agent_chat_.

◆ SetProposalDrawer()

void yaze::editor::RightPanelManager::SetProposalDrawer ( ProposalDrawer * drawer)
inline

Definition at line 76 of file right_panel_manager.h.

References proposal_drawer_.

◆ SetSettingsPanel()

void yaze::editor::RightPanelManager::SetSettingsPanel ( SettingsPanel * panel)
inline

Definition at line 77 of file right_panel_manager.h.

References settings_panel_.

◆ SetPropertiesPanel()

void yaze::editor::RightPanelManager::SetPropertiesPanel ( SelectionPropertiesPanel * panel)
inline

Definition at line 78 of file right_panel_manager.h.

References properties_panel_.

◆ SetProjectManagementPanel()

void yaze::editor::RightPanelManager::SetProjectManagementPanel ( ProjectManagementPanel * panel)
inline

Definition at line 81 of file right_panel_manager.h.

References project_panel_.

◆ SetToastManager()

void yaze::editor::RightPanelManager::SetToastManager ( ToastManager * manager)
inline

Definition at line 84 of file right_panel_manager.h.

References toast_manager_.

◆ SetRom()

void yaze::editor::RightPanelManager::SetRom ( Rom * rom)
inline

Definition at line 85 of file right_panel_manager.h.

References rom_.

◆ SetActiveEditor()

void yaze::editor::RightPanelManager::SetActiveEditor ( EditorType type)
inline

Set the active editor for context-aware help content.

Parameters
typeThe currently active editor type

Definition at line 91 of file right_panel_manager.h.

References active_editor_type_.

◆ TogglePanel()

void yaze::editor::RightPanelManager::TogglePanel ( PanelType type)

Toggle a specific panel on/off.

Parameters
typePanel 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().

Here is the call graph for this function:

◆ OpenPanel()

void yaze::editor::RightPanelManager::OpenPanel ( PanelType type)

Open a specific panel.

Parameters
typePanel 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().

◆ ClosePanel()

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().

◆ IsPanelExpanded()

bool yaze::editor::RightPanelManager::IsPanelExpanded ( ) const
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().

◆ GetActivePanel()

PanelType yaze::editor::RightPanelManager::GetActivePanel ( ) const
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().

◆ IsPanelActive()

bool yaze::editor::RightPanelManager::IsPanelActive ( PanelType type) const
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().

◆ GetPanelWidth()

◆ GetCollapsedWidth()

static constexpr float yaze::editor::RightPanelManager::GetCollapsedWidth ( )
inlinestaticconstexpr

Get the width of the collapsed panel strip (toggle buttons)

Definition at line 144 of file right_panel_manager.h.

◆ SetPanelWidth()

void yaze::editor::RightPanelManager::SetPanelWidth ( PanelType type,
float width )

◆ Draw()

◆ DrawPanelToggleButtons()

◆ agent_chat()

AgentChat * yaze::editor::RightPanelManager::agent_chat ( ) const
inline

Definition at line 174 of file right_panel_manager.h.

References agent_chat_.

◆ proposal_drawer()

ProposalDrawer * yaze::editor::RightPanelManager::proposal_drawer ( ) const
inline

Definition at line 175 of file right_panel_manager.h.

References proposal_drawer_.

◆ settings_panel()

SettingsPanel * yaze::editor::RightPanelManager::settings_panel ( ) const
inline

Definition at line 176 of file right_panel_manager.h.

References settings_panel_.

◆ properties_panel()

SelectionPropertiesPanel * yaze::editor::RightPanelManager::properties_panel ( ) const
inline

Definition at line 177 of file right_panel_manager.h.

References properties_panel_.

◆ project_panel()

ProjectManagementPanel * yaze::editor::RightPanelManager::project_panel ( ) const
inline

Definition at line 178 of file right_panel_manager.h.

References project_panel_.

◆ DrawPanelHeader()

◆ DrawAgentChatPanel()

◆ DrawProposalsPanel()

void yaze::editor::RightPanelManager::DrawProposalsPanel ( )
private

◆ DrawSettingsPanel()

void yaze::editor::RightPanelManager::DrawSettingsPanel ( )
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().

Here is the call graph for this function:

◆ DrawHelpPanel()

◆ DrawNotificationsPanel()

◆ DrawPropertiesPanel()

◆ DrawProjectPanel()

◆ DrawEditorContextHeader()

◆ DrawGlobalShortcuts()

void yaze::editor::RightPanelManager::DrawGlobalShortcuts ( )
private

Definition at line 640 of file right_panel_manager.cc.

References DrawPanelLabel(), DrawPanelValue(), and yaze::gui::GetCtrlDisplayName().

Referenced by DrawHelpPanel().

Here is the call graph for this function:

◆ DrawEditorSpecificShortcuts()

void yaze::editor::RightPanelManager::DrawEditorSpecificShortcuts ( )
private

◆ DrawEditorSpecificHelp()

void yaze::editor::RightPanelManager::DrawEditorSpecificHelp ( )
private

◆ DrawQuickActionButtons()

void yaze::editor::RightPanelManager::DrawQuickActionButtons ( )
private
Todo
Open documentation URL
Todo
Open GitHub issues URL
Todo
Open Discord invite URL

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().

Here is the call graph for this function:

◆ DrawAboutSection()

void yaze::editor::RightPanelManager::DrawAboutSection ( )
private

◆ BeginPanelSection()

bool yaze::editor::RightPanelManager::BeginPanelSection ( const char * label,
const char * icon = nullptr,
bool default_open = true )
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().

Here is the call graph for this function:

◆ EndPanelSection()

void yaze::editor::RightPanelManager::EndPanelSection ( )
private

Definition at line 355 of file right_panel_manager.cc.

Referenced by DrawHelpPanel(), DrawProjectPanel(), and DrawPropertiesPanel().

◆ DrawPanelDivider()

void yaze::editor::RightPanelManager::DrawPanelDivider ( )
private

Definition at line 361 of file right_panel_manager.cc.

References yaze::gui::GetOutlineVec4().

Referenced by DrawAboutSection(), DrawEditorContextHeader(), DrawNotificationsPanel(), DrawProjectPanel(), and DrawPropertiesPanel().

Here is the call graph for this function:

◆ DrawPanelLabel()

void yaze::editor::RightPanelManager::DrawPanelLabel ( const char * label)
private

Definition at line 369 of file right_panel_manager.cc.

References yaze::gui::GetTextSecondaryVec4().

Referenced by DrawAboutSection(), DrawEditorSpecificShortcuts(), DrawGlobalShortcuts(), and DrawNotificationsPanel().

Here is the call graph for this function:

◆ DrawPanelValue()

void yaze::editor::RightPanelManager::DrawPanelValue ( const char * label,
const char * value )
private

Definition at line 375 of file right_panel_manager.cc.

References yaze::gui::GetTextSecondaryVec4().

Referenced by DrawAgentChatPanel(), DrawEditorSpecificShortcuts(), DrawGlobalShortcuts(), and DrawPropertiesPanel().

Here is the call graph for this function:

◆ DrawPanelDescription()

void yaze::editor::RightPanelManager::DrawPanelDescription ( const char * text)
private

Member Data Documentation

◆ active_panel_

PanelType yaze::editor::RightPanelManager::active_panel_ = PanelType::kNone
private

◆ active_editor_type_

EditorType yaze::editor::RightPanelManager::active_editor_type_ = EditorType::kUnknown
private

◆ agent_chat_width_

float yaze::editor::RightPanelManager::agent_chat_width_ = 420.0f
private

Definition at line 214 of file right_panel_manager.h.

Referenced by GetPanelWidth(), and SetPanelWidth().

◆ proposals_width_

float yaze::editor::RightPanelManager::proposals_width_ = 420.0f
private

Definition at line 215 of file right_panel_manager.h.

Referenced by GetPanelWidth(), and SetPanelWidth().

◆ settings_width_

float yaze::editor::RightPanelManager::settings_width_ = 420.0f
private

Definition at line 216 of file right_panel_manager.h.

Referenced by GetPanelWidth(), and SetPanelWidth().

◆ help_width_

float yaze::editor::RightPanelManager::help_width_ = 380.0f
private

Definition at line 217 of file right_panel_manager.h.

Referenced by GetPanelWidth(), and SetPanelWidth().

◆ notifications_width_

float yaze::editor::RightPanelManager::notifications_width_ = 420.0f
private

Definition at line 218 of file right_panel_manager.h.

Referenced by GetPanelWidth(), and SetPanelWidth().

◆ properties_width_

float yaze::editor::RightPanelManager::properties_width_ = 320.0f
private

Definition at line 219 of file right_panel_manager.h.

Referenced by GetPanelWidth(), and SetPanelWidth().

◆ project_width_

float yaze::editor::RightPanelManager::project_width_ = 380.0f
private

Definition at line 220 of file right_panel_manager.h.

Referenced by GetPanelWidth(), and SetPanelWidth().

◆ agent_chat_

AgentChat* yaze::editor::RightPanelManager::agent_chat_ = nullptr
private

Definition at line 223 of file right_panel_manager.h.

Referenced by agent_chat(), DrawAgentChatPanel(), and SetAgentChat().

◆ proposal_drawer_

ProposalDrawer* yaze::editor::RightPanelManager::proposal_drawer_ = nullptr
private

Definition at line 224 of file right_panel_manager.h.

Referenced by DrawProposalsPanel(), proposal_drawer(), and SetProposalDrawer().

◆ settings_panel_

SettingsPanel* yaze::editor::RightPanelManager::settings_panel_ = nullptr
private

Definition at line 225 of file right_panel_manager.h.

Referenced by DrawSettingsPanel(), SetSettingsPanel(), and settings_panel().

◆ properties_panel_

SelectionPropertiesPanel* yaze::editor::RightPanelManager::properties_panel_ = nullptr
private

◆ project_panel_

ProjectManagementPanel* yaze::editor::RightPanelManager::project_panel_ = nullptr
private

◆ toast_manager_

ToastManager* yaze::editor::RightPanelManager::toast_manager_ = nullptr
private

Definition at line 228 of file right_panel_manager.h.

Referenced by DrawNotificationsPanel(), and SetToastManager().

◆ rom_

Rom* yaze::editor::RightPanelManager::rom_ = nullptr
private

Definition at line 229 of file right_panel_manager.h.

Referenced by DrawProposalsPanel(), and SetRom().

◆ panel_animation_

float yaze::editor::RightPanelManager::panel_animation_ = 0.0f
private

Definition at line 232 of file right_panel_manager.h.

Referenced by ClosePanel(), and OpenPanel().

◆ animating_

bool yaze::editor::RightPanelManager::animating_ = false
private

Definition at line 233 of file right_panel_manager.h.

Referenced by ClosePanel(), and OpenPanel().


The documentation for this class was generated from the following files: