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

Central registry for all editor cards with session awareness and dependency injection. More...

#include <panel_manager.h>

Collaboration diagram for yaze::editor::PanelManager:

Classes

struct  CategoryTheme
 Get the expressive theme color for a category. More...
 
struct  PanelContextScopeHash
 
struct  PanelValidationResult
 
struct  SidePanelWidthBounds
 
struct  WorkspacePreset
 

Public Member Functions

 PanelManager ()=default
 
 ~PanelManager ()=default
 
 PanelManager (const PanelManager &)=delete
 
PanelManageroperator= (const PanelManager &)=delete
 
 PanelManager (PanelManager &&)=delete
 
PanelManageroperator= (PanelManager &&)=delete
 
void RegisterSession (size_t session_id)
 
void UnregisterSession (size_t session_id)
 
void SetActiveSession (size_t session_id)
 
void SetContextKey (size_t session_id, PanelContextScope scope, std::string key)
 Set a string key for a given context scope (room/selection/etc)
 
std::string GetContextKey (size_t session_id, PanelContextScope scope) const
 
void RegisterPanel (size_t session_id, const PanelDescriptor &base_info)
 
void RegisterPanelAlias (const std::string &legacy_base_id, const std::string &canonical_base_id)
 Register a legacy panel ID alias that resolves to a canonical ID.
 
std::string ResolvePanelAlias (const std::string &panel_id) const
 Resolve a panel ID through the alias table.
 
void RegisterPanel (size_t session_id, const std::string &card_id, const std::string &display_name, const std::string &icon, const std::string &category, const std::string &shortcut_hint="", int priority=50, std::function< void()> on_show=nullptr, std::function< void()> on_hide=nullptr, bool visible_by_default=false)
 
void UnregisterPanel (size_t session_id, const std::string &base_card_id)
 
void UnregisterPanelsWithPrefix (const std::string &prefix)
 
void ClearAllPanels ()
 
void RegisterRegistryPanel (std::unique_ptr< EditorPanel > panel)
 Register a ContentRegistry-managed EditorPanel instance.
 
void RegisterRegistryPanelsForSession (size_t session_id)
 Register descriptors for all registry panels in a session.
 
size_t GetRegistryPanelCount () const
 Returns the number of panels registered via ContentRegistry.
 
void RegisterEditorPanel (std::unique_ptr< EditorPanel > panel)
 Register an EditorPanel instance for central drawing.
 
void UnregisterEditorPanel (const std::string &panel_id)
 Unregister and destroy an EditorPanel instance.
 
EditorPanelGetEditorPanel (const std::string &panel_id)
 Get an EditorPanel instance by ID.
 
void DrawAllVisiblePanels ()
 Draw all visible EditorPanel instances (central drawing)
 
void OnEditorSwitch (const std::string &from_category, const std::string &to_category)
 Handle editor/category switching for panel visibility.
 
bool ShowPanel (size_t session_id, const std::string &base_card_id)
 
bool HidePanel (size_t session_id, const std::string &base_card_id)
 
bool TogglePanel (size_t session_id, const std::string &base_card_id)
 
bool IsPanelVisible (size_t session_id, const std::string &base_card_id) const
 
bool * GetVisibilityFlag (size_t session_id, const std::string &base_card_id)
 
void ShowAllPanelsInSession (size_t session_id)
 
void HideAllPanelsInSession (size_t session_id)
 
void ShowAllPanelsInCategory (size_t session_id, const std::string &category)
 
void HideAllPanelsInCategory (size_t session_id, const std::string &category)
 
void ShowOnlyPanel (size_t session_id, const std::string &base_card_id)
 
std::vector< std::string > GetPanelsInSession (size_t session_id) const
 
std::vector< PanelDescriptorGetPanelsInCategory (size_t session_id, const std::string &category) const
 
std::vector< std::string > GetAllCategories (size_t session_id) const
 
const PanelDescriptorGetPanelDescriptor (size_t session_id, const std::string &base_card_id) const
 
const std::unordered_map< std::string, PanelDescriptor > & GetAllPanelDescriptors () const
 Get all panel descriptors (for layout designer, panel browser, etc.)
 
std::vector< std::string > GetAllCategories () const
 
std::vector< std::string > GetVisiblePanelIds (size_t session_id) const
 Get list of currently visible panel IDs for a session.
 
void SetVisiblePanels (size_t session_id, const std::vector< std::string > &panel_ids)
 Set which panels should be visible for a session.
 
std::unordered_map< std::string, bool > SerializeVisibilityState (size_t session_id) const
 Serialize panel visibility state for persistence.
 
void RestoreVisibilityState (size_t session_id, const std::unordered_map< std::string, bool > &state, bool publish_events=false)
 Restore panel visibility state from persistence.
 
std::unordered_map< std::string, bool > SerializePinnedState () const
 Serialize pinned panel state for persistence.
 
void RestorePinnedState (const std::unordered_map< std::string, bool > &state)
 Restore pinned panel state from persistence.
 
std::string GetPanelWindowName (size_t session_id, const std::string &base_card_id) const
 Resolve the exact ImGui window name for a panel by base ID.
 
std::string GetPanelWindowName (const PanelDescriptor &descriptor) const
 Resolve the exact ImGui window name for a descriptor.
 
float GetActiveSidePanelWidth (float viewport_width) const
 
void SetActiveSidePanelWidth (float width, float viewport_width=0.0f, bool notify=true)
 
void ResetSidePanelWidth (bool notify=true)
 
float GetStoredSidePanelWidth () const
 
void SetStoredSidePanelWidth (float width, bool notify=false)
 
void SetSidePanelWidthChangedCallback (std::function< void(float)> cb)
 
float GetPanelBrowserCategoryWidth () const
 
void SetPanelBrowserCategoryWidth (float width, bool notify=true)
 
void SetPanelBrowserCategoryWidthChangedCallback (std::function< void(float)> cb)
 
void HandleSidebarKeyboardNav (size_t session_id, const std::vector< PanelDescriptor > &cards)
 Handle keyboard navigation in sidebar (click-to-focus modal)
 
bool SidebarHasFocus () const
 
int GetFocusedPanelIndex () const
 
void ToggleSidebarVisibility ()
 
void SetSidebarVisible (bool visible, bool notify=true)
 
bool IsSidebarVisible () const
 
void TogglePanelExpanded ()
 
void SetPanelExpanded (bool expanded, bool notify=true)
 
bool IsPanelExpanded () const
 
void SetEventBus (EventBus *event_bus)
 
void TriggerShowEmulator ()
 
void TriggerShowSettings ()
 
void TriggerShowPanelBrowser ()
 
void TriggerSaveRom ()
 
void TriggerUndo ()
 
void TriggerRedo ()
 
void TriggerShowSearch ()
 
void TriggerShowShortcuts ()
 
void TriggerShowCommandPalette ()
 
void TriggerShowHelp ()
 
void TriggerShowAgentChatSidebar ()
 
void TriggerShowAgentProposalsSidebar ()
 
void TriggerResetLayout ()
 
void TriggerOpenRom ()
 
void TriggerPanelClicked (const std::string &category)
 
void TriggerCategorySelected (const std::string &category)
 
void SetSidebarStateChangedCallback (std::function< void(bool, bool)> cb)
 
bool IsEmulatorVisible () const
 
void SetEmulatorVisible (bool visible)
 
void ToggleEmulatorVisible ()
 
void SetEmulatorVisibilityChangedCallback (std::function< void(bool)> cb)
 
void SetCategoryChangedCallback (std::function< void(const std::string &)> cb)
 
void SavePreset (const std::string &name, const std::string &description="")
 
bool LoadPreset (const std::string &name)
 
void DeletePreset (const std::string &name)
 
std::vector< WorkspacePresetGetPresets () const
 
std::vector< PanelValidationResultValidatePanels () const
 
PanelValidationResult ValidatePanel (const std::string &card_id) const
 
void ShowAll (size_t session_id)
 
void HideAll (size_t session_id)
 
void ResetToDefaults (size_t session_id)
 
void ResetToDefaults (size_t session_id, EditorType editor_type)
 
size_t GetPanelCount () const
 
size_t GetVisiblePanelCount (size_t session_id) const
 
size_t GetSessionCount () const
 
std::string MakePanelId (size_t session_id, const std::string &base_id) const
 
std::string MakePanelId (size_t session_id, const std::string &base_id, PanelScope scope) const
 
bool ShouldPrefixPanels () const
 
void RegisterPanel (const PanelDescriptor &base_info)
 
void UnregisterPanel (const std::string &base_card_id)
 
bool ShowPanel (const std::string &base_card_id)
 
bool HidePanel (const std::string &base_card_id)
 
bool IsPanelVisible (const std::string &base_card_id) const
 
void HideAllPanelsInCategory (const std::string &category)
 
std::string GetActiveCategory () const
 
void SetActiveCategory (const std::string &category, bool notify=true)
 
void ShowAllPanelsInCategory (const std::string &category)
 
bool * GetVisibilityFlag (const std::string &base_card_id)
 
void ShowAll ()
 
void HideAll ()
 
void SetOnPanelClickedCallback (std::function< void(const std::string &)> callback)
 
void SetOnCategorySelectedCallback (std::function< void(const std::string &)> callback)
 
void SetEditorResolver (std::function< Editor *(const std::string &)> resolver)
 
size_t GetActiveSessionId () const
 
FileBrowserGetFileBrowser (const std::string &category)
 
void EnableFileBrowser (const std::string &category, const std::string &root_path="")
 
void DisableFileBrowser (const std::string &category)
 
bool HasFileBrowser (const std::string &category) const
 
void SetFileBrowserPath (const std::string &category, const std::string &path)
 
void SetFileClickedCallback (std::function< void(const std::string &category, const std::string &path)> callback)
 
void ToggleFavorite (const std::string &card_id)
 
bool IsFavorite (const std::string &card_id) const
 
void MarkPanelRecentlyUsed (const std::string &card_id)
 Record that a panel was used (for MRU ordering in sidebar)
 
std::vector< PanelDescriptorGetPanelsSortedByMRU (size_t session_id, const std::string &category) const
 Get panels in category sorted by: pinned first, then MRU.
 
uint64_t GetPanelMRUTime (const std::string &card_id) const
 Get MRU timestamp for a panel (0 if never used)
 
void SetPanelPinned (size_t session_id, const std::string &base_card_id, bool pinned)
 
bool IsPanelPinned (size_t session_id, const std::string &base_card_id) const
 
std::vector< std::string > GetPinnedPanels (size_t session_id) const
 
void SetPanelPinned (const std::string &base_card_id, bool pinned)
 
bool IsPanelPinned (const std::string &base_card_id) const
 
std::vector< std::string > GetPinnedPanels () const
 
void EnforceResourceLimits (const std::string &resource_type)
 Enforce limits on resource panels (LRU eviction)
 
void MarkPanelUsed (const std::string &panel_id)
 Mark a panel as recently used (for LRU)
 
EditorPanelFindPanelInstance (const std::string &prefixed_panel_id, const std::string &base_panel_id)
 
const EditorPanelFindPanelInstance (const std::string &prefixed_panel_id, const std::string &base_panel_id) const
 

Static Public Member Functions

static constexpr float GetSidebarWidth ()
 
static constexpr float GetSidePanelWidth ()
 
static SidePanelWidthBounds GetSidePanelWidthBounds (float viewport_width)
 
static float GetSidePanelWidthForViewport (float viewport_width)
 
static constexpr float GetDefaultPanelBrowserCategoryWidth ()
 
static constexpr float GetCollapsedSidebarWidth ()
 
static std::string GetCategoryIcon (const std::string &category)
 
static CategoryTheme GetCategoryTheme (const std::string &category)
 

Static Public Attributes

static constexpr const char * kDashboardCategory = "Dashboard"
 

Private Member Functions

void ApplyContextPolicy (size_t session_id, PanelContextScope scope, const std::string &old_key, const std::string &new_key)
 
std::string ResolveBasePanelId (const std::string &panel_id) const
 
std::string GetBaseIdForPrefixedId (size_t session_id, const std::string &prefixed_id) const
 
void UpdateSessionCount ()
 
std::string GetPrefixedPanelId (size_t session_id, const std::string &base_id) const
 
void RegisterPanelDescriptorForSession (size_t session_id, const EditorPanel &panel)
 
void TrackPanelForSession (size_t session_id, const std::string &base_id, const std::string &panel_id)
 
void UnregisterSessionPanels (size_t session_id)
 
void SavePresetsToFile ()
 
void LoadPresetsFromFile ()
 

Private Attributes

std::unordered_map< std::string, std::list< std::string > > resource_panels_
 
std::unordered_map< std::string, std::string > panel_resource_types_
 
std::unordered_map< std::string, PanelDescriptorcards_
 
std::unordered_map< std::string, std::unique_ptr< EditorPanel > > panel_instances_
 
std::unordered_set< std::string > registry_panel_ids_
 
std::unordered_set< std::string > global_panel_ids_
 
std::unordered_map< std::string, uint64_t > last_used_at_
 
uint64_t mru_counter_ = 0
 
std::unordered_map< std::string, bool > centralized_visibility_
 
std::unordered_map< std::string, bool > pinned_panels_
 
size_t session_count_ = 0
 
size_t active_session_ = 0
 
std::unordered_map< size_t, std::vector< std::string > > session_cards_
 
std::unordered_map< size_t, std::unordered_map< std::string, std::string > > session_card_mapping_
 
std::unordered_map< size_t, std::unordered_map< std::string, std::string > > session_reverse_card_mapping_
 
std::unordered_map< std::string, std::string > panel_id_aliases_
 
std::unordered_map< size_t, std::unordered_map< PanelContextScope, std::string, PanelContextScopeHash > > session_context_keys_
 
std::unordered_map< std::string, WorkspacePresetpresets_
 
std::string active_category_
 
std::vector< std::string > recent_categories_
 
bool sidebar_visible_ = false
 
bool panel_expanded_ = false
 
float side_panel_width_ = 0.0f
 
float panel_browser_category_width_
 
int focused_card_index_ = -1
 
bool sidebar_has_focus_ = false
 
bool emulator_visible_ = false
 
EventBusevent_bus_ = nullptr
 
std::function< void(bool visible, bool expanded)> on_sidebar_state_changed_
 
std::function< void(float width)> on_side_panel_width_changed_
 
std::function< void(float width)> on_panel_browser_category_width_changed_
 
std::function< void(const std::string &) on_category_changed_ )
 
std::function< void(const std::string &) on_card_clicked_ )
 
std::function< void(const std::string &) on_category_selected_ )
 
std::function< void(bool)> on_emulator_visibility_changed_
 
std::function< void(const std::string &, const std::string &) on_file_clicked_ )
 
std::function< Editor *(const std::string &) editor_resolver_ )
 
std::unordered_map< std::string, std::unique_ptr< FileBrowser > > category_file_browsers_
 
std::unordered_set< std::string > active_editor_categories_
 

Static Private Attributes

static constexpr size_t kMaxRecentCategories = 5
 

Detailed Description

Central registry for all editor cards with session awareness and dependency injection.

Definition at line 112 of file panel_manager.h.

Constructor & Destructor Documentation

◆ PanelManager() [1/3]

yaze::editor::PanelManager::PanelManager ( )
default

◆ ~PanelManager()

yaze::editor::PanelManager::~PanelManager ( )
default

◆ PanelManager() [2/3]

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

◆ PanelManager() [3/3]

yaze::editor::PanelManager::PanelManager ( PanelManager && )
delete

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

PanelManager & yaze::editor::PanelManager::operator= ( PanelManager && )
delete

◆ RegisterSession()

void yaze::editor::PanelManager::RegisterSession ( size_t session_id)

◆ UnregisterSession()

void yaze::editor::PanelManager::UnregisterSession ( size_t session_id)

◆ SetActiveSession()

void yaze::editor::PanelManager::SetActiveSession ( size_t session_id)

◆ SetContextKey()

void yaze::editor::PanelManager::SetContextKey ( size_t session_id,
PanelContextScope scope,
std::string key )

Set a string key for a given context scope (room/selection/etc)

This is an opt-in policy hook. PanelManager can apply default rules when context becomes invalid (e.g., selection cleared) to avoid stale panels.

Definition at line 269 of file panel_manager.cc.

References ApplyContextPolicy(), RegisterSession(), and session_context_keys_.

Here is the call graph for this function:

◆ GetContextKey()

std::string yaze::editor::PanelManager::GetContextKey ( size_t session_id,
PanelContextScope scope ) const

Definition at line 282 of file panel_manager.cc.

References session_context_keys_.

◆ RegisterPanel() [1/3]

◆ RegisterPanelAlias()

void yaze::editor::PanelManager::RegisterPanelAlias ( const std::string & legacy_base_id,
const std::string & canonical_base_id )

Register a legacy panel ID alias that resolves to a canonical ID.

Use this when a panel has been renamed but persisted layout/user settings may still reference the old ID.

Definition at line 296 of file panel_manager.cc.

References panel_id_aliases_.

Referenced by yaze::editor::DungeonEditorV2::Initialize(), yaze::editor::EditorManager::RegisterEmulatorPanels(), and yaze::editor::PanelHost::RegisterPanelAlias().

◆ ResolvePanelAlias()

std::string yaze::editor::PanelManager::ResolvePanelAlias ( const std::string & panel_id) const

Resolve a panel ID through the alias table.

Returns
Canonical panel ID if alias exists, otherwise input ID.

Definition at line 305 of file panel_manager.cc.

References ResolveBasePanelId().

Referenced by yaze::editor::PanelHost::ResolvePanelId().

Here is the call graph for this function:

◆ RegisterPanel() [2/3]

void yaze::editor::PanelManager::RegisterPanel ( size_t session_id,
const std::string & card_id,
const std::string & display_name,
const std::string & icon,
const std::string & category,
const std::string & shortcut_hint = "",
int priority = 50,
std::function< void()> on_show = nullptr,
std::function< void()> on_hide = nullptr,
bool visible_by_default = false )

◆ UnregisterPanel() [1/2]

void yaze::editor::PanelManager::UnregisterPanel ( size_t session_id,
const std::string & base_card_id )

◆ UnregisterPanelsWithPrefix()

void yaze::editor::PanelManager::UnregisterPanelsWithPrefix ( const std::string & prefix)

Definition at line 499 of file panel_manager.cc.

References cards_, centralized_visibility_, LOG_INFO, pinned_panels_, and session_cards_.

◆ ClearAllPanels()

◆ RegisterRegistryPanel()

void yaze::editor::PanelManager::RegisterRegistryPanel ( std::unique_ptr< EditorPanel > panel)

Register a ContentRegistry-managed EditorPanel instance.

Parameters
panelThe panel to register (ownership transferred)

Registry panels are stored without auto-registering descriptors. Call RegisterRegistryPanelsForSession() to add descriptors per session.

Definition at line 547 of file panel_manager.cc.

References EnforceResourceLimits(), global_panel_ids_, yaze::editor::kGlobal, LOG_ERROR, LOG_INFO, LOG_WARN, panel_instances_, panel_resource_types_, registry_panel_ids_, and resource_panels_.

Referenced by yaze::editor::EditorManager::RegisterEditors().

Here is the call graph for this function:

◆ RegisterRegistryPanelsForSession()

void yaze::editor::PanelManager::RegisterRegistryPanelsForSession ( size_t session_id)

Register descriptors for all registry panels in a session.

Parameters
session_idThe session to register descriptors for

Safe to call multiple times; descriptors are only created once.

Definition at line 588 of file panel_manager.cc.

References panel_instances_, RegisterPanelDescriptorForSession(), RegisterSession(), and registry_panel_ids_.

Referenced by yaze::editor::EditorManager::HandleSessionCreated().

Here is the call graph for this function:

◆ GetRegistryPanelCount()

size_t yaze::editor::PanelManager::GetRegistryPanelCount ( ) const
inline

Returns the number of panels registered via ContentRegistry.

Definition at line 203 of file panel_manager.h.

References registry_panel_ids_.

◆ RegisterEditorPanel()

void yaze::editor::PanelManager::RegisterEditorPanel ( std::unique_ptr< EditorPanel > panel)

Register an EditorPanel instance for central drawing.

Parameters
panelThe panel to register (ownership transferred)

This method:

  1. Stores the EditorPanel instance
  2. Auto-registers a PanelDescriptor for sidebar/menu visibility
  3. Panel will be drawn by DrawAllVisiblePanels()

Definition at line 599 of file panel_manager.cc.

References active_session_, yaze::editor::PanelDescriptor::display_name, EnforceResourceLimits(), LOG_ERROR, LOG_INFO, LOG_WARN, panel_instances_, panel_resource_types_, RegisterPanel(), resource_panels_, and ShowPanel().

Referenced by yaze::editor::AgentEditor::Initialize(), yaze::editor::AssemblyEditor::Initialize(), yaze::editor::SpriteEditor::Initialize(), and yaze::editor::DungeonEditorV2::Load().

Here is the call graph for this function:

◆ UnregisterEditorPanel()

void yaze::editor::PanelManager::UnregisterEditorPanel ( const std::string & panel_id)

Unregister and destroy an EditorPanel instance.

Parameters
panel_idThe panel ID to unregister

Definition at line 715 of file panel_manager.cc.

References active_session_, yaze::gui::Animator::ClearAnimationsForPanel(), yaze::gui::GetAnimator(), global_panel_ids_, LOG_INFO, panel_instances_, registry_panel_ids_, and UnregisterPanel().

Referenced by EnforceResourceLimits().

Here is the call graph for this function:

◆ GetEditorPanel()

EditorPanel * yaze::editor::PanelManager::GetEditorPanel ( const std::string & panel_id)

Get an EditorPanel instance by ID.

Parameters
panel_idThe panel ID
Returns
Pointer to panel, or nullptr if not found

Definition at line 731 of file panel_manager.cc.

References panel_instances_.

◆ DrawAllVisiblePanels()

void yaze::editor::PanelManager::DrawAllVisiblePanels ( )

Draw all visible EditorPanel instances (central drawing)

Call this once per frame to draw all panels that have EditorPanel implementations. Panels without EditorPanel instances are skipped (they use manual drawing).

Definition at line 766 of file panel_manager.cc.

References active_category_, active_session_, yaze::gui::PanelWindow::Begin(), cards_, yaze::editor::PanelDescriptor::category, yaze::gui::PanelWindow::Center, yaze::editor::PanelDescriptor::display_name, yaze::editor::EditorPanel::DrawWithLazyInit(), editor_resolver_, yaze::gui::PanelWindow::End(), FindPanelInstance(), yaze::gui::GetAnimator(), GetBaseIdForPrefixedId(), yaze::editor::EditorPanel::GetDisplayName(), yaze::editor::EditorPanel::GetEditorCategory(), yaze::editor::EditorPanel::GetIcon(), yaze::editor::EditorPanel::GetPanelCategory(), yaze::editor::EditorPanel::GetPreferredWidth(), yaze::editor::PanelDescriptor::icon, IsPanelPinned(), yaze::gui::LayoutHelpers::IsTouchDevice(), kDashboardCategory, yaze::gui::kRelaxed, yaze::gui::kSnappy, yaze::gui::kStandard, yaze::editor::EditorPanel::OnClose(), yaze::editor::PanelDescriptor::panel_category, yaze::editor::Persistent, session_cards_, yaze::editor::ContentRegistry::Context::SetCurrentEditor(), yaze::gui::PanelWindow::SetDefaultSize(), SetPanelPinned(), yaze::gui::PanelWindow::SetPinChangedCallback(), yaze::gui::PanelWindow::SetPinnable(), yaze::gui::PanelWindow::SetPinned(), yaze::gui::PanelWindow::SetPosition(), yaze::gui::PanelWindow::SetStableId(), and yaze::editor::PanelDescriptor::visibility_flag.

Referenced by yaze::editor::EditorManager::DrawInterface().

◆ OnEditorSwitch()

void yaze::editor::PanelManager::OnEditorSwitch ( const std::string & from_category,
const std::string & to_category )

Handle editor/category switching for panel visibility.

Parameters
from_categoryThe category being switched away from
to_categoryThe category being switched to

This method:

  1. Hides non-pinned, non-persistent panels from the previous category
  2. Shows default panels for the new category
  3. Updates the active category

Definition at line 916 of file panel_manager.cc.

References yaze::gui::Animator::BeginPanelTransition(), yaze::gui::GetAnimator(), yaze::gui::kFade, LOG_INFO, and SetActiveCategory().

Referenced by yaze::editor::EditorActivator::ActivatePanelBasedEditor(), and yaze::editor::EditorActivator::DeactivatePanelBasedEditor().

Here is the call graph for this function:

◆ ShowPanel() [1/2]

bool yaze::editor::PanelManager::ShowPanel ( size_t session_id,
const std::string & base_card_id )

Definition at line 945 of file panel_manager.cc.

References cards_, yaze::editor::PanelVisibilityChangedEvent::Create(), yaze::editor::ContentRegistry::Context::event_bus(), FindPanelInstance(), GetPrefixedPanelId(), and ResolveBasePanelId().

Referenced by yaze::editor::LayoutManager::ApplyBuiltInProfile(), yaze::editor::LayoutCoordinator::ApplyLayoutPreset(), yaze::editor::layout_designer::anonymous_namespace{layout_designer_window.cc}::ApplyLayoutToDockspace(), yaze::editor::ActivityBar::DrawPanelBrowser(), yaze::editor::UICoordinator::DrawPanelFinder(), yaze::editor::ActivityBar::DrawSidePanel(), yaze::editor::OverworldCanvasRenderer::DrawTile16Selector(), yaze::editor::EditorActivator::HandleNonEditorClassSwitch(), yaze::editor::OverworldEditor::HandleTile16Edit(), yaze::editor::DungeonEditorV2::OnRoomSelected(), yaze::editor::MenuOrchestrator::OnShowHexEditor(), yaze::editor::MenuOrchestrator::OnShowMemoryEditor(), yaze::editor::PanelHost::OpenAndFocus(), yaze::editor::EditorManager::OpenEditorAndPanelsFromFlags(), yaze::editor::MessageEditor::OpenMessageById(), yaze::editor::MusicEditor::OpenSong(), yaze::editor::MusicEditor::OpenSongPianoRoll(), yaze::editor::DungeonEditorV2::ProcessPendingSwap(), RegisterEditorPanel(), yaze::editor::EditorManager::RegisterEmulatorPanels(), anonymous_namespace{main.cc}::RegisterLabPanels(), yaze::editor::PanelHost::RegisterPanel(), RegisterPanel(), RegisterPanelDescriptorForSession(), ResetToDefaults(), yaze::editor::UICoordinator::SetEmulatorVisible(), yaze::editor::EditorManager::SetupSidebarCallbacks(), yaze::editor::anonymous_namespace{layout_manager.cc}::ShowDefaultPanelsForEditor(), ShowOnlyPanel(), ShowPanel(), yaze::editor::DungeonEditorV2::ShowPanel(), yaze::editor::PanelHost::ShowPanel(), and yaze::editor::LayoutOrchestrator::ShowPresetPanels().

◆ HidePanel() [1/2]

◆ TogglePanel()

◆ IsPanelVisible() [1/2]

◆ GetVisibilityFlag() [1/2]

bool * yaze::editor::PanelManager::GetVisibilityFlag ( size_t session_id,
const std::string & base_card_id )

◆ ShowAllPanelsInSession()

void yaze::editor::PanelManager::ShowAllPanelsInSession ( size_t session_id)

◆ HideAllPanelsInSession()

◆ ShowAllPanelsInCategory() [1/2]

◆ HideAllPanelsInCategory() [1/2]

◆ ShowOnlyPanel()

void yaze::editor::PanelManager::ShowOnlyPanel ( size_t session_id,
const std::string & base_card_id )

Definition at line 1157 of file panel_manager.cc.

References cards_, GetPrefixedPanelId(), HideAllPanelsInCategory(), and ShowPanel().

Here is the call graph for this function:

◆ GetPanelsInSession()

std::vector< std::string > yaze::editor::PanelManager::GetPanelsInSession ( size_t session_id) const

Definition at line 1183 of file panel_manager.cc.

References session_cards_.

Referenced by yaze::editor::ActivityBar::DrawPanelBrowser().

◆ GetPanelsInCategory()

◆ GetAllCategories() [1/2]

std::vector< std::string > yaze::editor::PanelManager::GetAllCategories ( size_t session_id) const

◆ GetPanelDescriptor()

◆ GetAllPanelDescriptors()

const std::unordered_map< std::string, PanelDescriptor > & yaze::editor::PanelManager::GetAllPanelDescriptors ( ) const
inline

◆ GetAllCategories() [2/2]

std::vector< std::string > yaze::editor::PanelManager::GetAllCategories ( ) const

Definition at line 1249 of file panel_manager.cc.

References cards_.

◆ GetVisiblePanelIds()

std::vector< std::string > yaze::editor::PanelManager::GetVisiblePanelIds ( size_t session_id) const

Get list of currently visible panel IDs for a session.

Parameters
session_idThe session to query
Returns
Vector of base panel IDs that are currently visible

Definition at line 1264 of file panel_manager.cc.

References cards_, and session_card_mapping_.

◆ SetVisiblePanels()

void yaze::editor::PanelManager::SetVisiblePanels ( size_t session_id,
const std::vector< std::string > & panel_ids )

Set which panels should be visible for a session.

Parameters
session_idThe session to modify
panel_idsVector of base panel IDs to make visible (others hidden)

Definition at line 1284 of file panel_manager.cc.

References cards_, LOG_INFO, ResolveBasePanelId(), and session_card_mapping_.

Here is the call graph for this function:

◆ SerializeVisibilityState()

std::unordered_map< std::string, bool > yaze::editor::PanelManager::SerializeVisibilityState ( size_t session_id) const

Serialize panel visibility state for persistence.

Parameters
session_idThe session to serialize
Returns
Map of base_panel_id -> visible (for serialization)

Definition at line 1311 of file panel_manager.cc.

References cards_, and session_card_mapping_.

Referenced by yaze::editor::LayoutManager::CaptureTemporarySessionLayout(), and yaze::editor::LayoutManager::SaveCurrentLayout().

◆ RestoreVisibilityState()

void yaze::editor::PanelManager::RestoreVisibilityState ( size_t session_id,
const std::unordered_map< std::string, bool > & state,
bool publish_events = false )

◆ SerializePinnedState()

std::unordered_map< std::string, bool > yaze::editor::PanelManager::SerializePinnedState ( ) const

Serialize pinned panel state for persistence.

Returns
Map of base_panel_id -> pinned

Definition at line 1365 of file panel_manager.cc.

References pinned_panels_.

Referenced by yaze::editor::LayoutManager::CaptureTemporarySessionLayout(), and yaze::editor::LayoutManager::SaveCurrentLayout().

◆ RestorePinnedState()

void yaze::editor::PanelManager::RestorePinnedState ( const std::unordered_map< std::string, bool > & state)

Restore pinned panel state from persistence.

Parameters
stateMap of base_panel_id -> pinned

Definition at line 1384 of file panel_manager.cc.

References LOG_INFO, pinned_panels_, ResolveBasePanelId(), and session_card_mapping_.

Referenced by yaze::editor::EditorManager::HandleSessionCreated(), yaze::editor::EditorManager::InitializeServices(), yaze::editor::LayoutManager::LoadLayout(), and yaze::editor::LayoutManager::RestoreTemporarySessionLayout().

Here is the call graph for this function:

◆ GetPanelWindowName() [1/2]

std::string yaze::editor::PanelManager::GetPanelWindowName ( size_t session_id,
const std::string & base_card_id ) const

◆ GetPanelWindowName() [2/2]

std::string yaze::editor::PanelManager::GetPanelWindowName ( const PanelDescriptor & descriptor) const

Resolve the exact ImGui window name for a descriptor.

Definition at line 1415 of file panel_manager.cc.

References yaze::editor::PanelDescriptor::GetImGuiWindowName().

Here is the call graph for this function:

◆ GetSidebarWidth()

static constexpr float yaze::editor::PanelManager::GetSidebarWidth ( )
inlinestaticconstexpr

◆ GetSidePanelWidth()

static constexpr float yaze::editor::PanelManager::GetSidePanelWidth ( )
inlinestaticconstexpr

Definition at line 353 of file panel_manager.h.

Referenced by getSidebarState(), and GetSidePanelWidthForViewport().

◆ GetSidePanelWidthBounds()

PanelManager::SidePanelWidthBounds yaze::editor::PanelManager::GetSidePanelWidthBounds ( float viewport_width)
static

Definition at line 150 of file panel_manager.cc.

References GetSidePanelWidthForViewport(), and yaze::editor::PanelManager::SidePanelWidthBounds::min_width.

Referenced by GetActiveSidePanelWidth(), and SetActiveSidePanelWidth().

Here is the call graph for this function:

◆ GetSidePanelWidthForViewport()

static float yaze::editor::PanelManager::GetSidePanelWidthForViewport ( float viewport_width)
inlinestatic

Definition at line 359 of file panel_manager.h.

References GetSidePanelWidth().

Referenced by GetActiveSidePanelWidth(), and GetSidePanelWidthBounds().

Here is the call graph for this function:

◆ GetActiveSidePanelWidth()

float yaze::editor::PanelManager::GetActiveSidePanelWidth ( float viewport_width) const

◆ SetActiveSidePanelWidth()

void yaze::editor::PanelManager::SetActiveSidePanelWidth ( float width,
float viewport_width = 0.0f,
bool notify = true )

Definition at line 177 of file panel_manager.cc.

References GetSidePanelWidthBounds(), on_side_panel_width_changed_, and side_panel_width_.

Referenced by yaze::editor::ActivityBar::DrawSidePanel(), and SetStoredSidePanelWidth().

Here is the call graph for this function:

◆ ResetSidePanelWidth()

void yaze::editor::PanelManager::ResetSidePanelWidth ( bool notify = true)

◆ GetStoredSidePanelWidth()

float yaze::editor::PanelManager::GetStoredSidePanelWidth ( ) const
inline

Definition at line 401 of file panel_manager.h.

References side_panel_width_.

◆ SetStoredSidePanelWidth()

void yaze::editor::PanelManager::SetStoredSidePanelWidth ( float width,
bool notify = false )
inline

Definition at line 402 of file panel_manager.h.

References SetActiveSidePanelWidth().

Referenced by yaze::editor::EditorManager::Initialize().

Here is the call graph for this function:

◆ SetSidePanelWidthChangedCallback()

void yaze::editor::PanelManager::SetSidePanelWidthChangedCallback ( std::function< void(float)> cb)
inline

◆ GetPanelBrowserCategoryWidth()

float yaze::editor::PanelManager::GetPanelBrowserCategoryWidth ( ) const
inline

◆ SetPanelBrowserCategoryWidth()

void yaze::editor::PanelManager::SetPanelBrowserCategoryWidth ( float width,
bool notify = true )

◆ SetPanelBrowserCategoryWidthChangedCallback()

void yaze::editor::PanelManager::SetPanelBrowserCategoryWidthChangedCallback ( std::function< void(float)> cb)
inline

◆ GetDefaultPanelBrowserCategoryWidth()

static constexpr float yaze::editor::PanelManager::GetDefaultPanelBrowserCategoryWidth ( )
inlinestaticconstexpr

◆ GetCollapsedSidebarWidth()

static constexpr float yaze::editor::PanelManager::GetCollapsedSidebarWidth ( )
inlinestaticconstexpr

Definition at line 421 of file panel_manager.h.

◆ GetCategoryIcon()

◆ GetCategoryTheme()

PanelManager::CategoryTheme yaze::editor::PanelManager::GetCategoryTheme ( const std::string & category)
static

Definition at line 88 of file panel_manager.cc.

Referenced by yaze::editor::ActivityBar::DrawActivityBarStrip().

◆ HandleSidebarKeyboardNav()

void yaze::editor::PanelManager::HandleSidebarKeyboardNav ( size_t session_id,
const std::vector< PanelDescriptor > & cards )

Handle keyboard navigation in sidebar (click-to-focus modal)

Definition at line 1424 of file panel_manager.cc.

References focused_card_index_, sidebar_has_focus_, and TogglePanel().

Here is the call graph for this function:

◆ SidebarHasFocus()

bool yaze::editor::PanelManager::SidebarHasFocus ( ) const
inline

Definition at line 442 of file panel_manager.h.

References sidebar_has_focus_.

◆ GetFocusedPanelIndex()

int yaze::editor::PanelManager::GetFocusedPanelIndex ( ) const
inline

Definition at line 443 of file panel_manager.h.

References focused_card_index_.

◆ ToggleSidebarVisibility()

◆ SetSidebarVisible()

void yaze::editor::PanelManager::SetSidebarVisible ( bool visible,
bool notify = true )
inline

◆ IsSidebarVisible()

◆ TogglePanelExpanded()

void yaze::editor::PanelManager::TogglePanelExpanded ( )
inline

◆ SetPanelExpanded()

◆ IsPanelExpanded()

bool yaze::editor::PanelManager::IsPanelExpanded ( ) const
inline

◆ SetEventBus()

void yaze::editor::PanelManager::SetEventBus ( EventBus * event_bus)
inline

Definition at line 485 of file panel_manager.h.

References event_bus_.

Referenced by yaze::editor::EditorManager::InitializeSubsystems().

◆ TriggerShowEmulator()

void yaze::editor::PanelManager::TriggerShowEmulator ( )
inline

Definition at line 491 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::ShowEmulator().

Here is the call graph for this function:

◆ TriggerShowSettings()

void yaze::editor::PanelManager::TriggerShowSettings ( )
inline

Definition at line 496 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::ShowSettings().

Referenced by yaze::editor::ActivityBar::DrawActivityBarStrip().

Here is the call graph for this function:

◆ TriggerShowPanelBrowser()

void yaze::editor::PanelManager::TriggerShowPanelBrowser ( )
inline

◆ TriggerSaveRom()

void yaze::editor::PanelManager::TriggerSaveRom ( )
inline

Definition at line 507 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::SaveRom().

Here is the call graph for this function:

◆ TriggerUndo()

void yaze::editor::PanelManager::TriggerUndo ( )
inline

Definition at line 512 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::Undo().

Here is the call graph for this function:

◆ TriggerRedo()

void yaze::editor::PanelManager::TriggerRedo ( )
inline

Definition at line 517 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::Redo().

Here is the call graph for this function:

◆ TriggerShowSearch()

void yaze::editor::PanelManager::TriggerShowSearch ( )
inline

◆ TriggerShowShortcuts()

void yaze::editor::PanelManager::TriggerShowShortcuts ( )
inline

◆ TriggerShowCommandPalette()

void yaze::editor::PanelManager::TriggerShowCommandPalette ( )
inline

Definition at line 534 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::ShowCommandPalette().

Referenced by yaze::editor::ActivityBar::DrawActivityBarStrip().

Here is the call graph for this function:

◆ TriggerShowHelp()

void yaze::editor::PanelManager::TriggerShowHelp ( )
inline

Definition at line 539 of file panel_manager.h.

References yaze::editor::UIActionRequestEvent::Create(), event_bus_, yaze::editor::UIActionRequestEvent::kShowHelp, and yaze::EventBus::Publish().

Here is the call graph for this function:

◆ TriggerShowAgentChatSidebar()

void yaze::editor::PanelManager::TriggerShowAgentChatSidebar ( )
inline

Definition at line 545 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::ShowAgentChatSidebar().

Here is the call graph for this function:

◆ TriggerShowAgentProposalsSidebar()

void yaze::editor::PanelManager::TriggerShowAgentProposalsSidebar ( )
inline

Definition at line 550 of file panel_manager.h.

References event_bus_, yaze::EventBus::Publish(), and yaze::editor::UIActionRequestEvent::ShowAgentProposalsSidebar().

Here is the call graph for this function:

◆ TriggerResetLayout()

void yaze::editor::PanelManager::TriggerResetLayout ( )
inline

◆ TriggerOpenRom()

void yaze::editor::PanelManager::TriggerOpenRom ( )
inline

Definition at line 561 of file panel_manager.h.

References event_bus_, yaze::editor::UIActionRequestEvent::OpenRom(), and yaze::EventBus::Publish().

Referenced by yaze::editor::ActivityBar::DrawActivityBarStrip().

Here is the call graph for this function:

◆ TriggerPanelClicked()

void yaze::editor::PanelManager::TriggerPanelClicked ( const std::string & category)
inline

Definition at line 566 of file panel_manager.h.

References on_card_clicked_.

Referenced by yaze::editor::ActivityBar::DrawSidePanel().

◆ TriggerCategorySelected()

void yaze::editor::PanelManager::TriggerCategorySelected ( const std::string & category)
inline

Definition at line 569 of file panel_manager.h.

References on_category_selected_.

Referenced by yaze::editor::ActivityBar::DrawActivityBarStrip().

◆ SetSidebarStateChangedCallback()

void yaze::editor::PanelManager::SetSidebarStateChangedCallback ( std::function< void(bool, bool)> cb)
inline

◆ IsEmulatorVisible()

bool yaze::editor::PanelManager::IsEmulatorVisible ( ) const
inline

Definition at line 586 of file panel_manager.h.

References emulator_visible_.

◆ SetEmulatorVisible()

void yaze::editor::PanelManager::SetEmulatorVisible ( bool visible)
inline

Definition at line 587 of file panel_manager.h.

References emulator_visible_, and on_emulator_visibility_changed_.

Referenced by ToggleEmulatorVisible().

◆ ToggleEmulatorVisible()

void yaze::editor::PanelManager::ToggleEmulatorVisible ( )
inline

Definition at line 595 of file panel_manager.h.

References emulator_visible_, and SetEmulatorVisible().

Here is the call graph for this function:

◆ SetEmulatorVisibilityChangedCallback()

void yaze::editor::PanelManager::SetEmulatorVisibilityChangedCallback ( std::function< void(bool)> cb)
inline

Definition at line 596 of file panel_manager.h.

References on_emulator_visibility_changed_.

◆ SetCategoryChangedCallback()

void yaze::editor::PanelManager::SetCategoryChangedCallback ( std::function< void(const std::string &)> cb)
inline

Definition at line 599 of file panel_manager.h.

References on_category_changed_.

Referenced by yaze::editor::EditorManager::SetupSidebarCallbacks().

◆ SavePreset()

void yaze::editor::PanelManager::SavePreset ( const std::string & name,
const std::string & description = "" )

◆ LoadPreset()

bool yaze::editor::PanelManager::LoadPreset ( const std::string & name)

Definition at line 1531 of file panel_manager.cc.

References cards_, LOG_INFO, and presets_.

◆ DeletePreset()

void yaze::editor::PanelManager::DeletePreset ( const std::string & name)

Definition at line 1559 of file panel_manager.cc.

References presets_, and SavePresetsToFile().

Here is the call graph for this function:

◆ GetPresets()

std::vector< PanelManager::WorkspacePreset > yaze::editor::PanelManager::GetPresets ( ) const

Definition at line 1564 of file panel_manager.cc.

References presets_.

◆ ValidatePanels()

std::vector< PanelManager::PanelValidationResult > yaze::editor::PanelManager::ValidatePanels ( ) const

Definition at line 1997 of file panel_manager.cc.

References cards_, and ValidatePanel().

Here is the call graph for this function:

◆ ValidatePanel()

◆ ShowAll() [1/2]

void yaze::editor::PanelManager::ShowAll ( size_t session_id)

Definition at line 1576 of file panel_manager.cc.

References ShowAllPanelsInSession().

Referenced by yaze::editor::WorkspaceManager::ShowAllWindows().

Here is the call graph for this function:

◆ HideAll() [1/2]

void yaze::editor::PanelManager::HideAll ( size_t session_id)

◆ ResetToDefaults() [1/2]

void yaze::editor::PanelManager::ResetToDefaults ( size_t session_id)
Todo
Load default visibility from config file or hardcoded defaults

Definition at line 1584 of file panel_manager.cc.

References HideAllPanelsInSession(), and LOG_INFO.

Referenced by yaze::editor::LayoutCoordinator::ResetCurrentEditorLayout().

Here is the call graph for this function:

◆ ResetToDefaults() [2/2]

void yaze::editor::PanelManager::ResetToDefaults ( size_t session_id,
EditorType editor_type )

◆ GetPanelCount()

size_t yaze::editor::PanelManager::GetPanelCount ( ) const
inline

Definition at line 645 of file panel_manager.h.

References cards_.

◆ GetVisiblePanelCount()

size_t yaze::editor::PanelManager::GetVisiblePanelCount ( size_t session_id) const

Definition at line 1623 of file panel_manager.cc.

References cards_, and session_cards_.

◆ GetSessionCount()

size_t yaze::editor::PanelManager::GetSessionCount ( ) const
inline

Definition at line 647 of file panel_manager.h.

References session_count_.

◆ MakePanelId() [1/2]

std::string yaze::editor::PanelManager::MakePanelId ( size_t session_id,
const std::string & base_id ) const

◆ MakePanelId() [2/2]

std::string yaze::editor::PanelManager::MakePanelId ( size_t session_id,
const std::string & base_id,
PanelScope scope ) const

Definition at line 1648 of file panel_manager.cc.

References yaze::editor::kGlobal, ResolveBasePanelId(), and ShouldPrefixPanels().

Here is the call graph for this function:

◆ ShouldPrefixPanels()

bool yaze::editor::PanelManager::ShouldPrefixPanels ( ) const
inline

Definition at line 656 of file panel_manager.h.

References session_count_.

Referenced by MakePanelId().

◆ RegisterPanel() [3/3]

void yaze::editor::PanelManager::RegisterPanel ( const PanelDescriptor & base_info)
inline

Definition at line 662 of file panel_manager.h.

References active_session_, and RegisterPanel().

Here is the call graph for this function:

◆ UnregisterPanel() [2/2]

void yaze::editor::PanelManager::UnregisterPanel ( const std::string & base_card_id)
inline

Definition at line 665 of file panel_manager.h.

References active_session_, and UnregisterPanel().

Here is the call graph for this function:

◆ ShowPanel() [2/2]

bool yaze::editor::PanelManager::ShowPanel ( const std::string & base_card_id)
inline

Definition at line 668 of file panel_manager.h.

References active_session_, and ShowPanel().

Here is the call graph for this function:

◆ HidePanel() [2/2]

bool yaze::editor::PanelManager::HidePanel ( const std::string & base_card_id)
inline

Definition at line 671 of file panel_manager.h.

References active_session_, and HidePanel().

Here is the call graph for this function:

◆ IsPanelVisible() [2/2]

bool yaze::editor::PanelManager::IsPanelVisible ( const std::string & base_card_id) const
inline

Definition at line 674 of file panel_manager.h.

References active_session_, and IsPanelVisible().

Here is the call graph for this function:

◆ HideAllPanelsInCategory() [2/2]

void yaze::editor::PanelManager::HideAllPanelsInCategory ( const std::string & category)
inline

Definition at line 677 of file panel_manager.h.

References active_session_, and HideAllPanelsInCategory().

Here is the call graph for this function:

◆ GetActiveCategory()

◆ SetActiveCategory()

◆ ShowAllPanelsInCategory() [2/2]

void yaze::editor::PanelManager::ShowAllPanelsInCategory ( const std::string & category)
inline

Definition at line 689 of file panel_manager.h.

References active_session_, and ShowAllPanelsInCategory().

Here is the call graph for this function:

◆ GetVisibilityFlag() [2/2]

bool * yaze::editor::PanelManager::GetVisibilityFlag ( const std::string & base_card_id)
inline

Definition at line 692 of file panel_manager.h.

References active_session_, and GetVisibilityFlag().

Here is the call graph for this function:

◆ ShowAll() [2/2]

void yaze::editor::PanelManager::ShowAll ( )
inline

Definition at line 695 of file panel_manager.h.

References active_session_, and ShowAll().

Referenced by ShowAll().

Here is the call graph for this function:

◆ HideAll() [2/2]

void yaze::editor::PanelManager::HideAll ( )
inline

Definition at line 696 of file panel_manager.h.

References active_session_, and HideAll().

Referenced by HideAll().

Here is the call graph for this function:

◆ SetOnPanelClickedCallback()

void yaze::editor::PanelManager::SetOnPanelClickedCallback ( std::function< void(const std::string &)> callback)
inline

Definition at line 697 of file panel_manager.h.

References on_card_clicked_.

Referenced by yaze::editor::EditorManager::SetupSidebarCallbacks().

◆ SetOnCategorySelectedCallback()

void yaze::editor::PanelManager::SetOnCategorySelectedCallback ( std::function< void(const std::string &)> callback)
inline

◆ SetEditorResolver()

void yaze::editor::PanelManager::SetEditorResolver ( std::function< Editor *(const std::string &)> resolver)
inline

Definition at line 703 of file panel_manager.h.

References editor_resolver_.

Referenced by yaze::editor::EditorManager::SetupSidebarCallbacks().

◆ GetActiveSessionId()

◆ GetFileBrowser()

FileBrowser * yaze::editor::PanelManager::GetFileBrowser ( const std::string & category)

Definition at line 1843 of file panel_manager.cc.

References category_file_browsers_.

◆ EnableFileBrowser()

void yaze::editor::PanelManager::EnableFileBrowser ( const std::string & category,
const std::string & root_path = "" )

◆ DisableFileBrowser()

void yaze::editor::PanelManager::DisableFileBrowser ( const std::string & category)

Definition at line 1882 of file panel_manager.cc.

References category_file_browsers_.

◆ HasFileBrowser()

bool yaze::editor::PanelManager::HasFileBrowser ( const std::string & category) const

Definition at line 1886 of file panel_manager.cc.

References category_file_browsers_.

◆ SetFileBrowserPath()

void yaze::editor::PanelManager::SetFileBrowserPath ( const std::string & category,
const std::string & path )

◆ SetFileClickedCallback()

void yaze::editor::PanelManager::SetFileClickedCallback ( std::function< void(const std::string &category, const std::string &path)> callback)
inline

Definition at line 719 of file panel_manager.h.

References on_file_clicked_.

Referenced by yaze::editor::EditorManager::SetupSidebarCallbacks().

◆ ToggleFavorite()

void yaze::editor::PanelManager::ToggleFavorite ( const std::string & card_id)
inline

Definition at line 730 of file panel_manager.h.

References IsPanelPinned(), and SetPanelPinned().

Here is the call graph for this function:

◆ IsFavorite()

bool yaze::editor::PanelManager::IsFavorite ( const std::string & card_id) const
inline

Definition at line 733 of file panel_manager.h.

References IsPanelPinned().

Here is the call graph for this function:

◆ MarkPanelRecentlyUsed()

void yaze::editor::PanelManager::MarkPanelRecentlyUsed ( const std::string & card_id)

Record that a panel was used (for MRU ordering in sidebar)

Definition at line 1479 of file panel_manager.cc.

References last_used_at_, and mru_counter_.

Referenced by yaze::editor::UICoordinator::DrawPanelFinder(), and yaze::editor::ActivityBar::DrawSidePanel().

◆ GetPanelsSortedByMRU()

std::vector< PanelDescriptor > yaze::editor::PanelManager::GetPanelsSortedByMRU ( size_t session_id,
const std::string & category ) const

Get panels in category sorted by: pinned first, then MRU.

Definition at line 1483 of file panel_manager.cc.

References GetPanelsInCategory().

Referenced by yaze::editor::ActivityBar::DrawSidePanel().

Here is the call graph for this function:

◆ GetPanelMRUTime()

uint64_t yaze::editor::PanelManager::GetPanelMRUTime ( const std::string & card_id) const
inline

Get MRU timestamp for a panel (0 if never used)

Definition at line 745 of file panel_manager.h.

References last_used_at_.

◆ SetPanelPinned() [1/2]

void yaze::editor::PanelManager::SetPanelPinned ( size_t session_id,
const std::string & base_card_id,
bool pinned )

◆ IsPanelPinned() [1/2]

◆ GetPinnedPanels() [1/2]

std::vector< std::string > yaze::editor::PanelManager::GetPinnedPanels ( size_t session_id) const

Definition at line 1925 of file panel_manager.cc.

References pinned_panels_, and session_cards_.

Referenced by yaze::editor::ActivityBar::DrawSidePanel().

◆ SetPanelPinned() [2/2]

void yaze::editor::PanelManager::SetPanelPinned ( const std::string & base_card_id,
bool pinned )

Definition at line 1945 of file panel_manager.cc.

References active_session_, and SetPanelPinned().

Here is the call graph for this function:

◆ IsPanelPinned() [2/2]

bool yaze::editor::PanelManager::IsPanelPinned ( const std::string & base_card_id) const

Definition at line 1950 of file panel_manager.cc.

References active_session_, and IsPanelPinned().

Here is the call graph for this function:

◆ GetPinnedPanels() [2/2]

std::vector< std::string > yaze::editor::PanelManager::GetPinnedPanels ( ) const

Definition at line 1954 of file panel_manager.cc.

References active_session_, and GetPinnedPanels().

Referenced by GetPinnedPanels().

Here is the call graph for this function:

◆ EnforceResourceLimits()

void yaze::editor::PanelManager::EnforceResourceLimits ( const std::string & resource_type)

Enforce limits on resource panels (LRU eviction)

Parameters
resource_typeThe type of resource (e.g., "room", "song")

Checks if the number of open panels of this type exceeds the limit. If so, closes and unregisters the least recently used panel.

Definition at line 652 of file panel_manager.cc.

References IsPanelPinned(), yaze::editor::ResourcePanelLimits::kMaxMapPanels, yaze::editor::ResourcePanelLimits::kMaxRoomPanels, yaze::editor::ResourcePanelLimits::kMaxSheetPanels, yaze::editor::ResourcePanelLimits::kMaxSongPanels, yaze::editor::ResourcePanelLimits::kMaxTotalResourcePanels, LOG_INFO, resource_panels_, and UnregisterEditorPanel().

Referenced by RegisterEditorPanel(), and RegisterRegistryPanel().

Here is the call graph for this function:

◆ MarkPanelUsed()

void yaze::editor::PanelManager::MarkPanelUsed ( const std::string & panel_id)

Mark a panel as recently used (for LRU)

Parameters
panel_idThe panel ID

Definition at line 701 of file panel_manager.cc.

References panel_resource_types_, and resource_panels_.

◆ FindPanelInstance() [1/2]

EditorPanel * yaze::editor::PanelManager::FindPanelInstance ( const std::string & prefixed_panel_id,
const std::string & base_panel_id )

Definition at line 739 of file panel_manager.cc.

References panel_instances_.

Referenced by DrawAllVisiblePanels(), HidePanel(), ShowPanel(), and TogglePanel().

◆ FindPanelInstance() [2/2]

const EditorPanel * yaze::editor::PanelManager::FindPanelInstance ( const std::string & prefixed_panel_id,
const std::string & base_panel_id ) const

Definition at line 752 of file panel_manager.cc.

References panel_instances_.

◆ ApplyContextPolicy()

void yaze::editor::PanelManager::ApplyContextPolicy ( size_t session_id,
PanelContextScope scope,
const std::string & old_key,
const std::string & new_key )
private

◆ ResolveBasePanelId()

◆ GetBaseIdForPrefixedId()

std::string yaze::editor::PanelManager::GetBaseIdForPrefixedId ( size_t session_id,
const std::string & prefixed_id ) const
private

Definition at line 375 of file panel_manager.cc.

References session_reverse_card_mapping_.

Referenced by ApplyContextPolicy(), and DrawAllVisiblePanels().

◆ UpdateSessionCount()

void yaze::editor::PanelManager::UpdateSessionCount ( )
private

Definition at line 1665 of file panel_manager.cc.

References session_cards_, and session_count_.

Referenced by RegisterSession(), and UnregisterSession().

◆ GetPrefixedPanelId()

std::string yaze::editor::PanelManager::GetPrefixedPanelId ( size_t session_id,
const std::string & base_id ) const
private

◆ RegisterPanelDescriptorForSession()

void yaze::editor::PanelManager::RegisterPanelDescriptorForSession ( size_t session_id,
const EditorPanel & panel )
private

◆ TrackPanelForSession()

void yaze::editor::PanelManager::TrackPanelForSession ( size_t session_id,
const std::string & base_id,
const std::string & panel_id )
private

Definition at line 1702 of file panel_manager.cc.

References ResolveBasePanelId(), session_card_mapping_, session_cards_, and session_reverse_card_mapping_.

Referenced by RegisterPanel().

Here is the call graph for this function:

◆ UnregisterSessionPanels()

void yaze::editor::PanelManager::UnregisterSessionPanels ( size_t session_id)
private

◆ SavePresetsToFile()

void yaze::editor::PanelManager::SavePresetsToFile ( )
private

Definition at line 1730 of file panel_manager.cc.

References yaze::Json::dump(), yaze::util::PlatformPaths::GetConfigDirectory(), LOG_ERROR, LOG_INFO, yaze::Json::object(), and presets_.

Referenced by DeletePreset(), and SavePreset().

Here is the call graph for this function:

◆ LoadPresetsFromFile()

Member Data Documentation

◆ kDashboardCategory

◆ resource_panels_

std::unordered_map<std::string, std::list<std::string> > yaze::editor::PanelManager::resource_panels_
private

◆ panel_resource_types_

std::unordered_map<std::string, std::string> yaze::editor::PanelManager::panel_resource_types_
private

Definition at line 806 of file panel_manager.h.

Referenced by MarkPanelUsed(), RegisterEditorPanel(), and RegisterRegistryPanel().

◆ cards_

◆ panel_instances_

std::unordered_map<std::string, std::unique_ptr<EditorPanel> > yaze::editor::PanelManager::panel_instances_
private

◆ registry_panel_ids_

std::unordered_set<std::string> yaze::editor::PanelManager::registry_panel_ids_
private

◆ global_panel_ids_

std::unordered_set<std::string> yaze::editor::PanelManager::global_panel_ids_
private

◆ last_used_at_

std::unordered_map<std::string, uint64_t> yaze::editor::PanelManager::last_used_at_
private

Definition at line 819 of file panel_manager.h.

Referenced by GetPanelMRUTime(), and MarkPanelRecentlyUsed().

◆ mru_counter_

uint64_t yaze::editor::PanelManager::mru_counter_ = 0
private

Definition at line 820 of file panel_manager.h.

Referenced by MarkPanelRecentlyUsed().

◆ centralized_visibility_

std::unordered_map<std::string, bool> yaze::editor::PanelManager::centralized_visibility_
private

◆ pinned_panels_

std::unordered_map<std::string, bool> yaze::editor::PanelManager::pinned_panels_
private

◆ session_count_

size_t yaze::editor::PanelManager::session_count_ = 0
private

◆ active_session_

◆ session_cards_

◆ session_card_mapping_

std::unordered_map<size_t, std::unordered_map<std::string, std::string> > yaze::editor::PanelManager::session_card_mapping_
private

◆ session_reverse_card_mapping_

std::unordered_map<size_t, std::unordered_map<std::string, std::string> > yaze::editor::PanelManager::session_reverse_card_mapping_
private

◆ panel_id_aliases_

std::unordered_map<std::string, std::string> yaze::editor::PanelManager::panel_id_aliases_
private

Definition at line 844 of file panel_manager.h.

Referenced by RegisterPanelAlias(), and ResolveBasePanelId().

◆ session_context_keys_

std::unordered_map<size_t, std::unordered_map<PanelContextScope, std::string, PanelContextScopeHash> > yaze::editor::PanelManager::session_context_keys_
private

Definition at line 850 of file panel_manager.h.

Referenced by ClearAllPanels(), GetContextKey(), SetContextKey(), and UnregisterSession().

◆ presets_

std::unordered_map<std::string, WorkspacePreset> yaze::editor::PanelManager::presets_
private

◆ active_category_

std::string yaze::editor::PanelManager::active_category_
private

Definition at line 856 of file panel_manager.h.

Referenced by DrawAllVisiblePanels(), GetActiveCategory(), and SetActiveCategory().

◆ recent_categories_

std::vector<std::string> yaze::editor::PanelManager::recent_categories_
private

Definition at line 857 of file panel_manager.h.

◆ kMaxRecentCategories

constexpr size_t yaze::editor::PanelManager::kMaxRecentCategories = 5
staticconstexprprivate

Definition at line 858 of file panel_manager.h.

◆ sidebar_visible_

bool yaze::editor::PanelManager::sidebar_visible_ = false
private

◆ panel_expanded_

bool yaze::editor::PanelManager::panel_expanded_ = false
private

◆ side_panel_width_

float yaze::editor::PanelManager::side_panel_width_ = 0.0f
private

◆ panel_browser_category_width_

float yaze::editor::PanelManager::panel_browser_category_width_
private
Initial value:

Definition at line 864 of file panel_manager.h.

Referenced by GetPanelBrowserCategoryWidth(), and SetPanelBrowserCategoryWidth().

◆ focused_card_index_

int yaze::editor::PanelManager::focused_card_index_ = -1
private

Definition at line 868 of file panel_manager.h.

Referenced by GetFocusedPanelIndex(), and HandleSidebarKeyboardNav().

◆ sidebar_has_focus_

bool yaze::editor::PanelManager::sidebar_has_focus_ = false
private

Definition at line 869 of file panel_manager.h.

Referenced by HandleSidebarKeyboardNav(), and SidebarHasFocus().

◆ emulator_visible_

bool yaze::editor::PanelManager::emulator_visible_ = false
private

Definition at line 872 of file panel_manager.h.

Referenced by IsEmulatorVisible(), SetEmulatorVisible(), and ToggleEmulatorVisible().

◆ event_bus_

◆ on_sidebar_state_changed_

std::function<void(bool visible, bool expanded)> yaze::editor::PanelManager::on_sidebar_state_changed_
private

◆ on_side_panel_width_changed_

std::function<void(float width)> yaze::editor::PanelManager::on_side_panel_width_changed_
private

◆ on_panel_browser_category_width_changed_

std::function<void(float width)> yaze::editor::PanelManager::on_panel_browser_category_width_changed_
private

◆ on_category_changed_

std::function<void(const std::string&) yaze::editor::PanelManager::on_category_changed_)
private

Definition at line 881 of file panel_manager.h.

Referenced by SetActiveCategory(), and SetCategoryChangedCallback().

◆ on_card_clicked_

std::function<void(const std::string&) yaze::editor::PanelManager::on_card_clicked_)
private

◆ on_category_selected_

std::function<void(const std::string&) yaze::editor::PanelManager::on_category_selected_)
private

Definition at line 883 of file panel_manager.h.

Referenced by SetOnCategorySelectedCallback(), and TriggerCategorySelected().

◆ on_emulator_visibility_changed_

std::function<void(bool)> yaze::editor::PanelManager::on_emulator_visibility_changed_
private

Definition at line 884 of file panel_manager.h.

Referenced by SetEmulatorVisibilityChangedCallback(), and SetEmulatorVisible().

◆ on_file_clicked_

std::function<void(const std::string&, const std::string&) yaze::editor::PanelManager::on_file_clicked_)
private

Definition at line 885 of file panel_manager.h.

Referenced by EnableFileBrowser(), and SetFileClickedCallback().

◆ editor_resolver_

std::function<Editor*(const std::string&) yaze::editor::PanelManager::editor_resolver_)
private

Definition at line 886 of file panel_manager.h.

Referenced by DrawAllVisiblePanels(), and SetEditorResolver().

◆ category_file_browsers_

std::unordered_map<std::string, std::unique_ptr<FileBrowser> > yaze::editor::PanelManager::category_file_browsers_
private

◆ active_editor_categories_

std::unordered_set<std::string> yaze::editor::PanelManager::active_editor_categories_
private

Definition at line 893 of file panel_manager.h.


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