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

#include <toast_manager.h>

Public Member Functions

void Show (const std::string &message, ToastType type=ToastType::kInfo, float ttl_seconds=3.0f)
 
size_t dedup_suppressed_count () const
 Number of toasts suppressed by dedup since last reset.
 
void reset_dedup_stats ()
 
void Draw ()
 
size_t GetUnreadCount () const
 
const std::deque< NotificationEntry > & GetHistory () const
 
void MarkAllRead ()
 
void ClearHistory ()
 

Static Public Attributes

static constexpr size_t kMaxHistorySize = 50
 
static constexpr float kDedupCooldownSeconds = 1.0f
 

Private Attributes

std::deque< Toasttoasts_
 
std::deque< NotificationEntrynotification_history_
 
std::string last_shown_message_
 
ToastType last_shown_type_ = ToastType::kInfo
 
std::chrono::steady_clock::time_point last_shown_time_ {}
 
size_t dedup_suppressed_count_ = 0
 

Detailed Description

Definition at line 39 of file toast_manager.h.

Member Function Documentation

◆ Show()

void yaze::editor::ToastManager::Show ( const std::string & message,
ToastType type = ToastType::kInfo,
float ttl_seconds = 3.0f )
inline

Definition at line 45 of file toast_manager.h.

References dedup_suppressed_count_, kDedupCooldownSeconds, kMaxHistorySize, last_shown_message_, last_shown_time_, last_shown_type_, yaze::editor::NotificationEntry::message, notification_history_, yaze::editor::NotificationEntry::read, yaze::editor::NotificationEntry::timestamp, toasts_, and yaze::editor::NotificationEntry::type.

Referenced by yaze::editor::AgentProposalsPanel::AcceptProposal(), yaze::editor::AgentEditor::ApplyConfig(), yaze::editor::LayoutCoordinator::ApplyLayoutPreset(), yaze::editor::EditorManager::ApplyLayoutProfile(), yaze::editor::ProjectManager::ApplyZsoPreset(), yaze::editor::ProjectManager::CancelPendingProject(), yaze::editor::EditorManager::CaptureTemporaryLayoutSnapshot(), yaze::editor::RomLifecycleManager::CheckOracleRomSafetyPreSave(), yaze::editor::RomLifecycleManager::CheckRomWritePolicy(), yaze::editor::AgentChat::ClearHistory(), yaze::editor::EditorManager::ClearTemporaryLayoutSnapshot(), yaze::editor::WorkspaceManager::CloseAllFloatingWindows(), yaze::editor::SessionCoordinator::CloseSession(), yaze::editor::RomFileManager::CreateBackup(), yaze::editor::ProjectManager::CreateFromTemplate(), yaze::editor::ProjectManager::CreateNewProject(), yaze::editor::AgentProposalsPanel::DeleteProposal(), yaze::editor::ProjectFileEditor::Draw(), yaze::editor::AgentRomSyncPanel::Draw(), yaze::editor::AgentZ3EDCommandPanel::Draw(), yaze::editor::AgentEditor::DrawAgentBuilderPanel(), yaze::editor::AssemblyEditor::DrawAssembleMenu(), yaze::editor::AgentEditor::DrawBotProfilesPanel(), yaze::editor::AssemblyEditor::DrawBuildOutput(), yaze::editor::AgentEditor::DrawCommonTilesEditor(), yaze::editor::PaletteEditor::DrawControlPanel(), yaze::editor::UICoordinator::DrawGlobalSearch(), yaze::editor::AgentEditor::DrawNewPromptCreator(), yaze::editor::ProjectManagementPanel::DrawProjectOverview(), yaze::editor::AgentEditor::DrawPromptEditorPanel(), yaze::editor::DungeonEditorV2::DrawRoomTab(), yaze::editor::ProjectManagementPanel::DrawStorageLocations(), yaze::editor::PaletteGroupPanel::DrawToolbar(), yaze::editor::ProjectManagementPanel::DrawVersionControl(), yaze::editor::UICoordinator::DrawWorkspacePresetDialogs(), yaze::editor::WorkspaceManager::ExecuteWorkspaceCommand(), yaze::editor::ProjectManager::ExportProject(), yaze::editor::ProjectManager::FinalizeProjectCreation(), yaze::editor::AgentChat::HandleAgentResponse(), yaze::editor::DungeonEditorV2::HandleObjectPlaced(), yaze::editor::EditorManager::HandleUIActionRequest(), yaze::editor::WorkspaceManager::HideAllWindows(), yaze::editor::AgentEditor::HostSession(), yaze::editor::ProjectManager::ImportProject(), yaze::editor::DungeonEditorV2::Initialize(), yaze::editor::UICoordinator::InitializeCommandPalette(), yaze::editor::EditorManager::InitializeSubsystems(), yaze::editor::AgentEditor::JoinSession(), yaze::editor::EditorActivator::JumpToAssemblySymbol(), yaze::editor::EditorActivator::JumpToDungeonRoom(), yaze::editor::EditorActivator::JumpToMessage(), yaze::editor::EditorActivator::JumpToOverworldMap(), yaze::editor::AgentEditor::LeaveSession(), yaze::editor::DungeonEditorV2::Load(), yaze::editor::WorkspaceManager::LoadDesignerLayout(), yaze::editor::WorkspaceManager::LoadDeveloperLayout(), yaze::editor::WorkspaceManager::LoadModderLayout(), yaze::editor::ProjectManager::LoadProjectFromFile(), yaze::editor::EditorManager::LoadProjectWithRom(), yaze::editor::EditorManager::LoadRom(), yaze::editor::RomFileManager::LoadRomFromFile(), yaze::editor::WorkspaceManager::LoadWorkspaceLayout(), yaze::editor::WorkspaceManager::LoadWorkspacePreset(), yaze::editor::WorkspaceManager::MaximizeCurrentWindow(), yaze::editor::MenuOrchestrator::OnCheckRomVersion(), yaze::editor::MenuOrchestrator::OnCopy(), yaze::editor::MenuOrchestrator::OnCreateBackup(), yaze::editor::MenuOrchestrator::OnCreateProject(), yaze::editor::MenuOrchestrator::OnCut(), yaze::editor::MenuOrchestrator::OnFind(), yaze::editor::MenuOrchestrator::OnLoadAsmFile(), yaze::editor::MenuOrchestrator::OnOpenProject(), yaze::editor::MenuOrchestrator::OnOpenRom(), yaze::editor::MenuOrchestrator::OnPaste(), yaze::editor::MenuOrchestrator::OnRedo(), yaze::editor::MenuOrchestrator::OnResetWorkspaceLayout(), yaze::editor::MenuOrchestrator::OnRunDataIntegrityCheck(), yaze::editor::MenuOrchestrator::OnSaveProject(), yaze::editor::MenuOrchestrator::OnSaveProjectAs(), yaze::editor::MenuOrchestrator::OnSaveRom(), yaze::editor::MenuOrchestrator::OnTestSaveLoad(), yaze::editor::MenuOrchestrator::OnToggleAsarPatch(), yaze::editor::MenuOrchestrator::OnToggleCustomLoading(), yaze::editor::MenuOrchestrator::OnUndo(), yaze::editor::MenuOrchestrator::OnUpgradeRom(), yaze::editor::MenuOrchestrator::OnValidateRom(), yaze::editor::EditorManager::OpenProject(), yaze::editor::AgentEditor::RefreshModelCache(), yaze::editor::AgentProposalsPanel::RejectProposal(), yaze::editor::AgentConfigPanel::RenderModelConfigControls(), yaze::editor::AgentConfigPanel::RenderModelDeck(), yaze::editor::EditorManager::RepairCurrentProject(), yaze::editor::ProjectManager::RepairCurrentProject(), yaze::editor::EditorManager::ResetCurrentEditorLayout(), yaze::editor::LayoutCoordinator::ResetCurrentEditorLayout(), yaze::editor::WorkspaceManager::ResetWorkspaceLayout(), yaze::editor::EditorManager::ResolvePotItemSaveConfirmation(), yaze::editor::WorkspaceManager::RestoreAllWindows(), yaze::editor::EditorManager::RestoreTemporaryLayoutSnapshot(), yaze::editor::OverworldEditor::Save(), yaze::editor::DungeonEditorV2::SaveAllRooms(), yaze::editor::EditorManager::SaveProjectAs(), yaze::editor::ProjectManager::SaveProjectToFile(), yaze::editor::EditorManager::SaveRom(), yaze::editor::RomFileManager::SaveRom(), yaze::editor::RomFileManager::SaveRomAs(), yaze::editor::DungeonEditorV2::SaveRoomData(), yaze::editor::WorkspaceManager::SaveWorkspaceLayout(), yaze::editor::WorkspaceManager::SaveWorkspacePreset(), yaze::editor::AgentEditor::SendToGemini(), yaze::editor::PaletteGroupPanel::SetColor(), yaze::editor::ProjectManager::SetProjectRom(), yaze::editor::EditorManager::SetupDialogCallbacks(), yaze::editor::EditorManager::SetupWelcomeScreenCallbacks(), yaze::editor::DungeonEditorV2::SetWorkbenchWorkflowMode(), yaze::editor::WorkspaceManager::ShowAllWindows(), yaze::editor::EditorManager::ShowProjectFileEditor(), yaze::editor::SessionCoordinator::ShowSessionLimitWarning(), yaze::editor::SessionCoordinator::ShowSessionOperationResult(), yaze::editor::EditorManager::SwitchToEditor(), yaze::editor::UICoordinator::UICoordinator(), yaze::editor::EditorManager::UpdateEditorState(), yaze::editor::SessionCoordinator::UpdateSessions(), yaze::editor::ProjectManager::ValidateProject(), and yaze::editor::RomFileManager::ValidateRom().

◆ dedup_suppressed_count()

size_t yaze::editor::ToastManager::dedup_suppressed_count ( ) const
inline

Number of toasts suppressed by dedup since last reset.

Definition at line 78 of file toast_manager.h.

References dedup_suppressed_count_.

◆ reset_dedup_stats()

void yaze::editor::ToastManager::reset_dedup_stats ( )
inline

Definition at line 79 of file toast_manager.h.

References dedup_suppressed_count_.

◆ Draw()

◆ GetUnreadCount()

size_t yaze::editor::ToastManager::GetUnreadCount ( ) const
inline

◆ GetHistory()

const std::deque< NotificationEntry > & yaze::editor::ToastManager::GetHistory ( ) const
inline

◆ MarkAllRead()

void yaze::editor::ToastManager::MarkAllRead ( )
inline

◆ ClearHistory()

void yaze::editor::ToastManager::ClearHistory ( )
inline

Member Data Documentation

◆ kMaxHistorySize

constexpr size_t yaze::editor::ToastManager::kMaxHistorySize = 50
staticconstexpr

Definition at line 41 of file toast_manager.h.

Referenced by Show().

◆ kDedupCooldownSeconds

constexpr float yaze::editor::ToastManager::kDedupCooldownSeconds = 1.0f
staticconstexpr

Definition at line 43 of file toast_manager.h.

Referenced by Show().

◆ toasts_

std::deque<Toast> yaze::editor::ToastManager::toasts_
private

Definition at line 176 of file toast_manager.h.

Referenced by Draw(), and Show().

◆ notification_history_

std::deque<NotificationEntry> yaze::editor::ToastManager::notification_history_
private

Definition at line 177 of file toast_manager.h.

Referenced by ClearHistory(), GetHistory(), GetUnreadCount(), MarkAllRead(), and Show().

◆ last_shown_message_

std::string yaze::editor::ToastManager::last_shown_message_
private

Definition at line 180 of file toast_manager.h.

Referenced by Show().

◆ last_shown_type_

ToastType yaze::editor::ToastManager::last_shown_type_ = ToastType::kInfo
private

Definition at line 181 of file toast_manager.h.

Referenced by Show().

◆ last_shown_time_

std::chrono::steady_clock::time_point yaze::editor::ToastManager::last_shown_time_ {}
private

Definition at line 182 of file toast_manager.h.

Referenced by Show().

◆ dedup_suppressed_count_

size_t yaze::editor::ToastManager::dedup_suppressed_count_ = 0
private

Definition at line 183 of file toast_manager.h.

Referenced by dedup_suppressed_count(), reset_dedup_stats(), and Show().


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