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

Manages themes, loading, saving, and switching. More...

#include <theme_manager.h>

Collaboration diagram for yaze::gui::ThemeManager:

Public Member Functions

absl::Status LoadTheme (const std::string &theme_name)
 
absl::Status SaveTheme (const Theme &theme, const std::string &filename)
 
absl::Status LoadThemeFromFile (const std::string &filepath)
 
absl::Status SaveThemeToFile (const Theme &theme, const std::string &filepath) const
 
std::vector< std::string > DiscoverAvailableThemeFiles () const
 
absl::Status LoadAllAvailableThemes ()
 
absl::Status RefreshAvailableThemes ()
 
void InitializeBuiltInThemes ()
 
std::vector< std::string > GetAvailableThemes () const
 
const ThemeGetTheme (const std::string &name) const
 
const ThemeGetCurrentTheme () const
 
const std::string & GetCurrentThemeName () const
 
void ApplyTheme (const std::string &theme_name)
 
void ApplyTheme (const Theme &theme)
 
void ApplyClassicYazeTheme ()
 
Theme CreateCustomTheme (const std::string &name)
 
void ShowThemeEditor (bool *p_open)
 
void ShowThemeSelector (bool *p_open)
 
void ShowSimpleThemeEditor (bool *p_open)
 
Color GetWelcomeScreenBackground () const
 
Color GetWelcomeScreenBorder () const
 
Color GetWelcomeScreenAccent () const
 
std::string ExportCurrentThemeJson () const
 
Color GetThemeColor (const std::string &color_name) const
 
ImVec4 GetThemeColorVec4 (const std::string &color_name) const
 
Color GetPrimary () const
 
Color GetPrimaryHover () const
 
Color GetPrimaryActive () const
 
Color GetSecondary () const
 
Color GetSurface () const
 
Color GetSurfaceVariant () const
 
Color GetSurfaceContainer () const
 
Color GetSurfaceContainerHigh () const
 
Color GetSurfaceContainerHighest () const
 
Color GetOnSurface () const
 
Color GetOnSurfaceVariant () const
 
Color GetOnPrimary () const
 
Color GetOutline () const
 
Color GetTextSecondary () const
 
Color GetTextDisabled () const
 
Color GetShadow () const
 

Static Public Member Functions

static ThemeManagerGet ()
 

Private Member Functions

 ThemeManager ()
 
void CreateFallbackYazeClassic ()
 
absl::Status ParseThemeFile (const std::string &content, Theme &theme)
 
Color ParseColorFromString (const std::string &color_str) const
 
std::string SerializeTheme (const Theme &theme) const
 
std::vector< std::string > GetThemeSearchPaths () const
 
std::string GetThemesDirectory () const
 
std::string GetCurrentThemeFilePath () const
 

Private Attributes

std::map< std::string, Themethemes_
 
Theme current_theme_
 
std::string current_theme_name_ = "Classic YAZE"
 

Detailed Description

Manages themes, loading, saving, and switching.

Definition at line 231 of file theme_manager.h.

Constructor & Destructor Documentation

◆ ThemeManager()

yaze::gui::ThemeManager::ThemeManager ( )
inlineprivate

Definition at line 301 of file theme_manager.h.

References InitializeBuiltInThemes().

Here is the call graph for this function:

Member Function Documentation

◆ Get()

ThemeManager & yaze::gui::ThemeManager::Get ( )
static

Definition at line 127 of file theme_manager.cc.

Referenced by yaze::gui::DangerButton(), yaze::editor::RightPanelManager::Draw(), yaze::editor::StatusBar::Draw(), yaze::editor::ToastManager::Draw(), yaze::editor::RomLoadOptionsDialog::DrawActionButtons(), yaze::editor::ActivityBar::DrawActivityBarStrip(), yaze::editor::SettingsPanel::DrawAppearanceSettings(), yaze::editor::UICoordinator::DrawBackground(), yaze::gui::KeyboardShortcuts::DrawCategorySection(), yaze::editor::music::PianoRollView::DrawChannelList(), yaze::editor::UICoordinator::DrawCommandPalette(), yaze::gui::DrawDisplaySettings(), yaze::gui::DrawDisplaySettingsForPopup(), yaze::editor::UICoordinator::DrawMenuBarExtras(), yaze::editor::SelectionPropertiesPanel::DrawNoSelection(), yaze::editor::UICoordinator::DrawNotificationBell(), yaze::editor::RightPanelManager::DrawNotificationsPanel(), yaze::gui::KeyboardShortcuts::DrawOverlay(), yaze::gui::KeyboardShortcuts::DrawOverlayContent(), yaze::gui::PaletteEditorWidget::DrawPaletteAnalysis(), yaze::editor::RightPanelManager::DrawPanelHeader(), yaze::editor::ProjectManagementPanel::DrawQuickActions(), yaze::editor::ProjectManagementPanel::DrawRomManagement(), yaze::editor::StatusBar::DrawRomSegment(), yaze::editor::SessionCoordinator::DrawSessionIndicator(), yaze::gui::BackgroundRenderer::DrawSettingsUI(), yaze::gui::KeyboardShortcuts::DrawShortcutRow(), yaze::editor::ActivityBar::DrawSidePanel(), yaze::editor::MusicEditor::DrawToolset(), yaze::editor::RomLoadOptionsDialog::DrawVersionInfo(), yaze::editor::AgentUITheme::FromCurrentTheme(), yaze::gui::GetAccentColor(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorBeatHighlight(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorCommand(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorNote(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorSelection(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorSubroutine(), yaze::gui::GetErrorColor(), yaze::gui::GetInfoColor(), yaze::gui::GetModifiedColor(), yaze::gui::GetOnPrimary(), yaze::gui::GetOnSurface(), yaze::gui::GetOnSurfaceVariant(), yaze::gui::GetOutline(), yaze::editor::music::anonymous_namespace{piano_roll_view.cc}::GetPalette(), yaze::gui::GetPrimary(), yaze::gui::GetPrimaryActive(), yaze::gui::GetPrimaryHover(), yaze::gui::GetSecondary(), yaze::gui::GetSelectedColor(), yaze::gui::GetShadow(), yaze::gui::GetSuccessColor(), yaze::gui::GetSurface(), yaze::gui::GetSurfaceContainer(), yaze::gui::GetSurfaceContainerHigh(), yaze::gui::GetSurfaceContainerHighest(), yaze::gui::GetSurfaceVariant(), yaze::gui::GetTextDisabled(), yaze::gui::GetTextSecondary(), yaze::gui::LayoutHelpers::GetTheme(), yaze::gui::GetThemeColor(), yaze::gui::GetThemeColorVec4(), yaze::editor::anonymous_namespace{welcome_screen.cc}::GetThemedColor(), yaze::gui::GetWarningColor(), yaze::gui::PanelHeader(), yaze::gui::PrimaryButton(), yaze::emu::ui::RenderAIAgentPanel(), yaze::emu::ui::RenderApuDebugger(), yaze::emu::ui::RenderBreakpointList(), yaze::emu::ui::RenderCpuInstructionLog(), yaze::gui::BackgroundRenderer::RenderDockingBackground(), yaze::emu::Emulator::RenderEmulatorInterface(), yaze::emu::ui::RenderEmulatorInterface(), yaze::emu::ui::RenderKeyboardShortcuts(), yaze::emu::ui::RenderMemoryViewer(), yaze::emu::Emulator::RenderModernCpuDebugger(), yaze::emu::ui::RenderModernCpuDebugger(), yaze::emu::ui::RenderNavBar(), yaze::emu::ui::RenderPerformanceMonitor(), yaze::emu::Emulator::RenderSaveStates(), yaze::emu::ui::RenderSnesPpu(), yaze::emu::ui::RenderVirtualController(), yaze::gui::SectionHeader(), yaze::gui::PaletteEditorWidget::ShowColorAnalysis(), yaze::gui::ThemedIconButton(), and yaze::gui::TransparentIconButton().

◆ LoadTheme()

absl::Status yaze::gui::ThemeManager::LoadTheme ( const std::string & theme_name)

Definition at line 326 of file theme_manager.cc.

References yaze::gui::Theme::ApplyToImGui(), current_theme_, current_theme_name_, and themes_.

Referenced by ApplyTheme(), ShowSimpleThemeEditor(), and ShowThemeSelector().

Here is the call graph for this function:

◆ SaveTheme()

absl::Status yaze::gui::ThemeManager::SaveTheme ( const Theme & theme,
const std::string & filename )

◆ LoadThemeFromFile()

absl::Status yaze::gui::ThemeManager::LoadThemeFromFile ( const std::string & filepath)

Definition at line 340 of file theme_manager.cc.

References yaze::util::GetResourcePath(), yaze::gui::Theme::name, ParseThemeFile(), and themes_.

Referenced by LoadAllAvailableThemes(), ShowSimpleThemeEditor(), and ShowThemeSelector().

Here is the call graph for this function:

◆ SaveThemeToFile()

absl::Status yaze::gui::ThemeManager::SaveThemeToFile ( const Theme & theme,
const std::string & filepath ) const

Definition at line 1095 of file theme_manager.cc.

References SerializeTheme().

Referenced by ShowSimpleThemeEditor().

Here is the call graph for this function:

◆ DiscoverAvailableThemeFiles()

std::vector< std::string > yaze::gui::ThemeManager::DiscoverAvailableThemeFiles ( ) const

Definition at line 2450 of file theme_manager.cc.

References yaze::util::GetFileName(), yaze::util::FileDialogWrapper::GetFilesInFolder(), GetThemeSearchPaths(), and LOG_ERROR.

Referenced by LoadAllAvailableThemes().

Here is the call graph for this function:

◆ LoadAllAvailableThemes()

absl::Status yaze::gui::ThemeManager::LoadAllAvailableThemes ( )

Definition at line 2502 of file theme_manager.cc.

References DiscoverAvailableThemeFiles(), and LoadThemeFromFile().

Referenced by InitializeBuiltInThemes(), and RefreshAvailableThemes().

Here is the call graph for this function:

◆ RefreshAvailableThemes()

absl::Status yaze::gui::ThemeManager::RefreshAvailableThemes ( )

Definition at line 2525 of file theme_manager.cc.

References LoadAllAvailableThemes().

Referenced by ShowThemeSelector().

Here is the call graph for this function:

◆ InitializeBuiltInThemes()

void yaze::gui::ThemeManager::InitializeBuiltInThemes ( )

Definition at line 132 of file theme_manager.cc.

References ApplyClassicYazeTheme(), CreateFallbackYazeClassic(), current_theme_, current_theme_name_, LoadAllAvailableThemes(), LOG_ERROR, and themes_.

Referenced by ThemeManager().

Here is the call graph for this function:

◆ GetAvailableThemes()

std::vector< std::string > yaze::gui::ThemeManager::GetAvailableThemes ( ) const

Definition at line 395 of file theme_manager.cc.

References themes_.

Referenced by ShowSimpleThemeEditor().

◆ GetTheme()

const Theme * yaze::gui::ThemeManager::GetTheme ( const std::string & name) const

Definition at line 403 of file theme_manager.cc.

References themes_.

◆ GetCurrentTheme()

const Theme & yaze::gui::ThemeManager::GetCurrentTheme ( ) const
inline

Definition at line 254 of file theme_manager.h.

References current_theme_.

Referenced by yaze::gui::DangerButton(), yaze::editor::RightPanelManager::Draw(), yaze::editor::StatusBar::Draw(), yaze::editor::ToastManager::Draw(), yaze::editor::RomLoadOptionsDialog::DrawActionButtons(), yaze::editor::ActivityBar::DrawActivityBarStrip(), yaze::gui::KeyboardShortcuts::DrawCategorySection(), yaze::editor::music::PianoRollView::DrawChannelList(), yaze::editor::UICoordinator::DrawCommandPalette(), yaze::editor::UICoordinator::DrawMenuBarExtras(), yaze::editor::SelectionPropertiesPanel::DrawNoSelection(), yaze::editor::RightPanelManager::DrawNotificationsPanel(), yaze::gui::KeyboardShortcuts::DrawOverlay(), yaze::gui::KeyboardShortcuts::DrawOverlayContent(), yaze::editor::RightPanelManager::DrawPanelHeader(), yaze::editor::ProjectManagementPanel::DrawQuickActions(), yaze::editor::ProjectManagementPanel::DrawRomManagement(), yaze::editor::StatusBar::DrawRomSegment(), yaze::editor::SessionCoordinator::DrawSessionIndicator(), yaze::gui::KeyboardShortcuts::DrawShortcutRow(), yaze::editor::ActivityBar::DrawSidePanel(), yaze::editor::MusicEditor::DrawToolset(), yaze::editor::RomLoadOptionsDialog::DrawVersionInfo(), yaze::editor::AgentUITheme::FromCurrentTheme(), yaze::gui::GetAccentColor(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorBeatHighlight(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorCommand(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorNote(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorSelection(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorSubroutine(), yaze::gui::GetErrorColor(), yaze::gui::GetInfoColor(), yaze::gui::GetModifiedColor(), yaze::editor::music::anonymous_namespace{piano_roll_view.cc}::GetPalette(), yaze::gui::GetSelectedColor(), yaze::gui::GetSuccessColor(), yaze::gui::LayoutHelpers::GetTheme(), yaze::gui::GetWarningColor(), yaze::gui::PanelHeader(), yaze::gui::PrimaryButton(), yaze::gui::SectionHeader(), ShowSimpleThemeEditor(), ShowThemeSelector(), yaze::gui::ThemedIconButton(), and yaze::gui::TransparentIconButton().

◆ GetCurrentThemeName()

const std::string & yaze::gui::ThemeManager::GetCurrentThemeName ( ) const
inline

Definition at line 255 of file theme_manager.h.

References current_theme_name_.

◆ ApplyTheme() [1/2]

void yaze::gui::ThemeManager::ApplyTheme ( const std::string & theme_name)

Definition at line 408 of file theme_manager.cc.

References LoadTheme(), and LOG_ERROR.

Referenced by ShowSimpleThemeEditor().

Here is the call graph for this function:

◆ ApplyTheme() [2/2]

void yaze::gui::ThemeManager::ApplyTheme ( const Theme & theme)

Definition at line 419 of file theme_manager.cc.

References yaze::gui::Theme::ApplyToImGui(), current_theme_, current_theme_name_, and yaze::gui::Theme::name.

Here is the call graph for this function:

◆ ApplyClassicYazeTheme()

void yaze::gui::ThemeManager::ApplyClassicYazeTheme ( )

Definition at line 1116 of file theme_manager.cc.

References yaze::gui::Theme::accent, yaze::gui::Theme::active_selection, yaze::gui::Theme::author, yaze::gui::Theme::background, yaze::gui::Theme::border, yaze::gui::Theme::border_shadow, yaze::gui::Theme::button, yaze::gui::Theme::button_active, yaze::gui::Theme::button_hovered, yaze::gui::Theme::check_mark, yaze::gui::Theme::child_bg, yaze::gui::Theme::code_background, yaze::gui::ColorsYaze(), current_theme_, current_theme_name_, yaze::gui::Theme::description, yaze::gui::Theme::disabled_overlay, yaze::gui::Theme::docking_empty_bg, yaze::gui::Theme::docking_preview, yaze::gui::Theme::drag_drop_target, yaze::gui::Theme::editor_background, yaze::gui::Theme::editor_cursor, yaze::gui::Theme::editor_grid, yaze::gui::Theme::editor_selection, yaze::gui::Theme::enable_glow_effects, yaze::gui::Theme::error_light, yaze::gui::Theme::focus_border, yaze::gui::Theme::frame_bg, yaze::gui::Theme::frame_bg_active, yaze::gui::Theme::frame_bg_hovered, yaze::gui::Theme::frame_rounding, yaze::gui::Theme::header, yaze::gui::Theme::header_active, yaze::gui::Theme::header_hovered, yaze::gui::Theme::hover_highlight, yaze::gui::Theme::info_light, yaze::gui::Theme::input_text_cursor, yaze::gui::Theme::link_hover, yaze::gui::Theme::menu_bar_bg, yaze::gui::Theme::modal_window_dim_bg, yaze::gui::Theme::name, yaze::gui::Theme::nav_cursor, yaze::gui::Theme::nav_windowing_dim_bg, yaze::gui::Theme::nav_windowing_highlight, yaze::gui::Theme::plot_histogram, yaze::gui::Theme::plot_histogram_hovered, yaze::gui::Theme::plot_lines, yaze::gui::Theme::plot_lines_hovered, yaze::gui::Theme::popup_bg, yaze::gui::Theme::primary, yaze::gui::Theme::resize_grip, yaze::gui::Theme::resize_grip_active, yaze::gui::Theme::resize_grip_hovered, yaze::gui::RGBA(), yaze::gui::Theme::scrollbar_bg, yaze::gui::Theme::scrollbar_grab, yaze::gui::Theme::scrollbar_grab_active, yaze::gui::Theme::scrollbar_grab_hovered, yaze::gui::Theme::scrollbar_rounding, yaze::gui::Theme::secondary, yaze::gui::Theme::separator, yaze::gui::Theme::separator_active, yaze::gui::Theme::separator_hovered, yaze::gui::Theme::slider_grab, yaze::gui::Theme::slider_grab_active, yaze::gui::Theme::success_light, yaze::gui::Theme::tab, yaze::gui::Theme::tab_active, yaze::gui::Theme::tab_dimmed, yaze::gui::Theme::tab_dimmed_selected, yaze::gui::Theme::tab_dimmed_selected_overline, yaze::gui::Theme::tab_hovered, yaze::gui::Theme::tab_rounding, yaze::gui::Theme::tab_selected_overline, yaze::gui::Theme::tab_unfocused, yaze::gui::Theme::tab_unfocused_active, yaze::gui::Theme::table_border_light, yaze::gui::Theme::table_border_strong, yaze::gui::Theme::table_header_bg, yaze::gui::Theme::table_row_bg, yaze::gui::Theme::table_row_bg_alt, yaze::gui::Theme::text_disabled, yaze::gui::Theme::text_highlight, yaze::gui::Theme::text_link, yaze::gui::Theme::text_primary, yaze::gui::Theme::text_selected_bg, yaze::gui::Theme::title_bg, yaze::gui::Theme::title_bg_active, yaze::gui::Theme::title_bg_collapsed, yaze::gui::Theme::tree_lines, yaze::gui::Theme::warning_light, yaze::gui::Theme::window_bg, and yaze::gui::Theme::window_rounding.

Referenced by InitializeBuiltInThemes(), ShowSimpleThemeEditor(), and ShowThemeSelector().

Here is the call graph for this function:

◆ CreateCustomTheme()

Theme yaze::gui::ThemeManager::CreateCustomTheme ( const std::string & name)

◆ ShowThemeEditor()

void yaze::gui::ThemeManager::ShowThemeEditor ( bool * p_open)

◆ ShowThemeSelector()

◆ ShowSimpleThemeEditor()

void yaze::gui::ThemeManager::ShowSimpleThemeEditor ( bool * p_open)

Definition at line 1287 of file theme_manager.cc.

References yaze::gui::Theme::accent, yaze::gui::Theme::active_selection, yaze::gui::Theme::animation_speed, ApplyClassicYazeTheme(), ApplyTheme(), yaze::gui::Theme::ApplyToImGui(), yaze::gui::Theme::author, yaze::gui::Theme::background, yaze::gui::Theme::border, yaze::gui::Theme::border_shadow, yaze::gui::Theme::button, yaze::gui::Theme::button_active, yaze::gui::Theme::button_hovered, yaze::gui::Theme::check_mark, yaze::gui::Theme::child_bg, yaze::gui::Theme::code_background, yaze::gui::ConvertColorToImVec4(), current_theme_, yaze::gui::Theme::description, yaze::gui::Theme::disabled_overlay, yaze::gui::Theme::docking_empty_bg, yaze::gui::Theme::docking_preview, yaze::gui::Theme::drag_drop_target, yaze::gui::Theme::editor_background, yaze::gui::Theme::editor_cursor, yaze::gui::Theme::editor_grid, yaze::gui::Theme::editor_selection, yaze::gui::Theme::enable_animations, yaze::gui::Theme::enable_glow_effects, yaze::gui::Theme::error_light, yaze::gui::Theme::focus_border, yaze::gui::Theme::frame_bg, yaze::gui::Theme::frame_bg_active, yaze::gui::Theme::frame_bg_hovered, yaze::gui::Theme::frame_border_size, yaze::gui::Theme::frame_rounding, GetAvailableThemes(), GetCurrentTheme(), GetCurrentThemeFilePath(), yaze::gui::Theme::grab_rounding, yaze::gui::Theme::header, yaze::gui::Theme::header_active, yaze::gui::Theme::header_hovered, yaze::gui::Theme::hover_highlight, ICON_MD_ADD, ICON_MD_AUTO_AWESOME, ICON_MD_BORDER_ALL, ICON_MD_COLOR_LENS, ICON_MD_FOLDER_OPEN, ICON_MD_NAVIGATION, ICON_MD_PALETTE, ICON_MD_SAVE, ICON_MD_SAVE_AS, ICON_MD_TABLE_CHART, ICON_MD_TEXT_FIELDS, ICON_MD_TOUCH_APP, ICON_MD_TUNE, yaze::gui::Theme::info_light, yaze::gui::Theme::input_text_cursor, yaze::gui::Theme::link_hover, LoadTheme(), LoadThemeFromFile(), LOG_ERROR, yaze::gui::Theme::menu_bar_bg, yaze::gui::Theme::modal_bg, yaze::gui::Theme::modal_window_dim_bg, yaze::gui::Theme::name, yaze::gui::Theme::nav_cursor, yaze::gui::Theme::nav_windowing_dim_bg, yaze::gui::Theme::nav_windowing_highlight, yaze::gui::Theme::plot_histogram, yaze::gui::Theme::plot_histogram_hovered, yaze::gui::Theme::plot_lines, yaze::gui::Theme::plot_lines_hovered, yaze::gui::Theme::popup_bg, yaze::gui::Theme::primary, yaze::gui::Theme::resize_grip, yaze::gui::Theme::resize_grip_active, yaze::gui::Theme::resize_grip_hovered, SaveThemeToFile(), yaze::gui::Theme::scrollbar_bg, yaze::gui::Theme::scrollbar_grab, yaze::gui::Theme::scrollbar_grab_active, yaze::gui::Theme::scrollbar_grab_hovered, yaze::gui::Theme::scrollbar_rounding, yaze::gui::Theme::secondary, yaze::gui::Theme::separator, yaze::gui::Theme::separator_active, yaze::gui::Theme::separator_hovered, yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowSaveFileDialog(), yaze::gui::Theme::slider_grab, yaze::gui::Theme::slider_grab_active, yaze::gui::Theme::success_light, yaze::gui::Theme::tab, yaze::gui::Theme::tab_active, yaze::gui::Theme::tab_dimmed, yaze::gui::Theme::tab_dimmed_selected, yaze::gui::Theme::tab_hovered, yaze::gui::Theme::tab_rounding, yaze::gui::Theme::tab_unfocused, yaze::gui::Theme::tab_unfocused_active, yaze::gui::Theme::table_border_light, yaze::gui::Theme::table_border_strong, yaze::gui::Theme::table_header_bg, yaze::gui::Theme::table_row_bg, yaze::gui::Theme::table_row_bg_alt, yaze::gui::Theme::text_disabled, yaze::gui::Theme::text_highlight, yaze::gui::Theme::text_link, yaze::gui::Theme::text_primary, yaze::gui::Theme::text_secondary, yaze::gui::Theme::text_selected_bg, themes_, yaze::gui::Theme::title_bg, yaze::gui::Theme::title_bg_active, yaze::gui::Theme::title_bg_collapsed, yaze::gui::Theme::tree_lines, yaze::gui::Theme::warning_light, yaze::gui::Theme::window_bg, yaze::gui::Theme::window_border_size, and yaze::gui::Theme::window_rounding.

Referenced by ShowThemeSelector().

◆ GetWelcomeScreenBackground()

Color yaze::gui::ThemeManager::GetWelcomeScreenBackground ( ) const

◆ GetWelcomeScreenBorder()

Color yaze::gui::ThemeManager::GetWelcomeScreenBorder ( ) const

Definition at line 431 of file theme_manager.cc.

References yaze::gui::Theme::accent, and current_theme_.

◆ GetWelcomeScreenAccent()

Color yaze::gui::ThemeManager::GetWelcomeScreenAccent ( ) const

Definition at line 435 of file theme_manager.cc.

References current_theme_, and yaze::gui::Theme::primary.

◆ ExportCurrentThemeJson()

std::string yaze::gui::ThemeManager::ExportCurrentThemeJson ( ) const

Definition at line 1032 of file theme_manager.cc.

References current_theme_, and yaze::gui::Theme::name.

◆ GetThemeColor()

Color yaze::gui::ThemeManager::GetThemeColor ( const std::string & color_name) const

◆ GetThemeColorVec4()

ImVec4 yaze::gui::ThemeManager::GetThemeColorVec4 ( const std::string & color_name) const

◆ GetPrimary()

Color yaze::gui::ThemeManager::GetPrimary ( ) const
inline

Definition at line 281 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::primary.

Referenced by yaze::gui::GetPrimary().

◆ GetPrimaryHover()

Color yaze::gui::ThemeManager::GetPrimaryHover ( ) const
inline

Definition at line 282 of file theme_manager.h.

References yaze::gui::Theme::button_hovered, and current_theme_.

Referenced by yaze::gui::GetPrimaryHover().

◆ GetPrimaryActive()

Color yaze::gui::ThemeManager::GetPrimaryActive ( ) const
inline

Definition at line 283 of file theme_manager.h.

References yaze::gui::Theme::button_active, and current_theme_.

Referenced by yaze::gui::GetPrimaryActive().

◆ GetSecondary()

Color yaze::gui::ThemeManager::GetSecondary ( ) const
inline

Definition at line 284 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::secondary.

Referenced by yaze::gui::GetSecondary().

◆ GetSurface()

Color yaze::gui::ThemeManager::GetSurface ( ) const
inline

Definition at line 285 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::surface.

Referenced by yaze::gui::GetSurface().

◆ GetSurfaceVariant()

Color yaze::gui::ThemeManager::GetSurfaceVariant ( ) const
inline

Definition at line 286 of file theme_manager.h.

References yaze::gui::Theme::child_bg, and current_theme_.

Referenced by yaze::gui::GetSurfaceVariant().

◆ GetSurfaceContainer()

Color yaze::gui::ThemeManager::GetSurfaceContainer ( ) const
inline

Definition at line 287 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::popup_bg.

Referenced by yaze::gui::GetSurfaceContainer().

◆ GetSurfaceContainerHigh()

Color yaze::gui::ThemeManager::GetSurfaceContainerHigh ( ) const
inline

Definition at line 288 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::header.

Referenced by yaze::gui::GetSurfaceContainerHigh().

◆ GetSurfaceContainerHighest()

Color yaze::gui::ThemeManager::GetSurfaceContainerHighest ( ) const
inline

◆ GetOnSurface()

Color yaze::gui::ThemeManager::GetOnSurface ( ) const
inline

Definition at line 292 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::text_primary.

Referenced by yaze::gui::GetOnSurface().

◆ GetOnSurfaceVariant()

Color yaze::gui::ThemeManager::GetOnSurfaceVariant ( ) const
inline

Definition at line 293 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::text_secondary.

Referenced by yaze::gui::GetOnSurfaceVariant().

◆ GetOnPrimary()

Color yaze::gui::ThemeManager::GetOnPrimary ( ) const
inline

Definition at line 294 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::text_primary.

Referenced by yaze::gui::GetOnPrimary().

◆ GetOutline()

Color yaze::gui::ThemeManager::GetOutline ( ) const
inline

Definition at line 295 of file theme_manager.h.

References yaze::gui::Theme::border, and current_theme_.

Referenced by yaze::gui::GetOutline().

◆ GetTextSecondary()

Color yaze::gui::ThemeManager::GetTextSecondary ( ) const
inline

Definition at line 296 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::text_secondary.

Referenced by yaze::gui::GetTextSecondary().

◆ GetTextDisabled()

Color yaze::gui::ThemeManager::GetTextDisabled ( ) const
inline

Definition at line 297 of file theme_manager.h.

References current_theme_, and yaze::gui::Theme::text_disabled.

Referenced by yaze::gui::GetTextDisabled().

◆ GetShadow()

Color yaze::gui::ThemeManager::GetShadow ( ) const
inline

Definition at line 298 of file theme_manager.h.

References yaze::gui::Theme::border_shadow, and current_theme_.

Referenced by yaze::gui::GetShadow().

◆ CreateFallbackYazeClassic()

void yaze::gui::ThemeManager::CreateFallbackYazeClassic ( )
private

Definition at line 155 of file theme_manager.cc.

References yaze::gui::Theme::accent, yaze::gui::Theme::ChatColors::agent_message, yaze::gui::Theme::author, yaze::gui::Theme::background, yaze::gui::Theme::border, yaze::gui::Theme::border_shadow, yaze::gui::Theme::button, yaze::gui::Theme::button_active, yaze::gui::Theme::ChatColors::button_copy, yaze::gui::Theme::ChatColors::button_copy_hover, yaze::gui::Theme::button_hovered, yaze::gui::Theme::chat, yaze::gui::Theme::check_mark, yaze::gui::Theme::child_bg, yaze::gui::Theme::ChatColors::code_background, yaze::gui::Theme::ChatColors::command_text, current_theme_, current_theme_name_, yaze::gui::Theme::description, yaze::gui::Theme::docking_empty_bg, yaze::gui::Theme::docking_preview, yaze::gui::Theme::drag_drop_target, yaze::gui::Theme::DungeonColors::drag_preview, yaze::gui::Theme::DungeonColors::drag_preview_outline, yaze::gui::Theme::dungeon, yaze::gui::Theme::enable_glow_effects, yaze::gui::Theme::error, yaze::gui::Theme::frame_rounding, yaze::gui::Theme::ChatColors::gradient_bottom, yaze::gui::Theme::ChatColors::gradient_top, yaze::gui::Theme::DungeonColors::grid_cell_border, yaze::gui::Theme::DungeonColors::grid_cell_highlight, yaze::gui::Theme::DungeonColors::grid_cell_selected, yaze::gui::Theme::DungeonColors::grid_text, yaze::gui::Theme::header, yaze::gui::Theme::header_active, yaze::gui::Theme::header_hovered, yaze::gui::Theme::info, yaze::gui::Theme::input_text_cursor, yaze::gui::Theme::ChatColors::json_text, yaze::gui::Theme::menu_bar_bg, yaze::gui::Theme::modal_bg, yaze::gui::Theme::modal_window_dim_bg, yaze::gui::Theme::name, yaze::gui::Theme::nav_cursor, yaze::gui::Theme::nav_windowing_dim_bg, yaze::gui::Theme::nav_windowing_highlight, yaze::gui::Theme::DungeonColors::object_chest, yaze::gui::Theme::DungeonColors::object_decoration, yaze::gui::Theme::DungeonColors::object_default, yaze::gui::Theme::DungeonColors::object_door, yaze::gui::Theme::DungeonColors::object_floor, yaze::gui::Theme::DungeonColors::object_pot, yaze::gui::Theme::DungeonColors::object_stairs, yaze::gui::Theme::DungeonColors::object_wall, yaze::gui::Theme::DungeonColors::outline_layer0, yaze::gui::Theme::DungeonColors::outline_layer1, yaze::gui::Theme::DungeonColors::outline_layer2, yaze::gui::Theme::plot_histogram, yaze::gui::Theme::plot_histogram_hovered, yaze::gui::Theme::plot_lines, yaze::gui::Theme::plot_lines_hovered, yaze::gui::Theme::popup_bg, yaze::gui::Theme::primary, yaze::gui::Theme::ChatColors::proposal_accent, yaze::gui::Theme::ChatColors::proposal_panel_bg, yaze::gui::Theme::ChatColors::provider_gemini, yaze::gui::Theme::ChatColors::provider_mock, yaze::gui::Theme::ChatColors::provider_ollama, yaze::gui::Theme::ChatColors::provider_openai, yaze::gui::Theme::resize_grip, yaze::gui::Theme::resize_grip_active, yaze::gui::Theme::resize_grip_hovered, yaze::gui::RGBA(), yaze::gui::Theme::DungeonColors::room_border, yaze::gui::Theme::DungeonColors::room_border_dark, yaze::gui::Theme::scrollbar_bg, yaze::gui::Theme::scrollbar_grab, yaze::gui::Theme::scrollbar_grab_active, yaze::gui::Theme::scrollbar_grab_hovered, yaze::gui::Theme::scrollbar_rounding, yaze::gui::Theme::secondary, yaze::gui::Theme::DungeonColors::selection_handle, yaze::gui::Theme::DungeonColors::selection_primary, yaze::gui::Theme::DungeonColors::selection_pulsing, yaze::gui::Theme::DungeonColors::selection_secondary, yaze::gui::Theme::separator, yaze::gui::Theme::separator_active, yaze::gui::Theme::separator_hovered, yaze::gui::Theme::slider_grab, yaze::gui::Theme::slider_grab_active, yaze::gui::Theme::DungeonColors::sprite_layer0, yaze::gui::Theme::DungeonColors::sprite_layer1, yaze::gui::Theme::DungeonColors::sprite_layer2, yaze::gui::Theme::success, yaze::gui::Theme::surface, yaze::gui::Theme::ChatColors::system_message, yaze::gui::Theme::tab, yaze::gui::Theme::tab_active, yaze::gui::Theme::tab_hovered, yaze::gui::Theme::tab_rounding, yaze::gui::Theme::tab_unfocused, yaze::gui::Theme::tab_unfocused_active, yaze::gui::Theme::table_border_light, yaze::gui::Theme::table_border_strong, yaze::gui::Theme::table_header_bg, yaze::gui::Theme::table_row_bg, yaze::gui::Theme::table_row_bg_alt, yaze::gui::Theme::text_disabled, yaze::gui::Theme::text_link, yaze::gui::Theme::text_primary, yaze::gui::Theme::text_secondary, yaze::gui::Theme::text_selected_bg, themes_, yaze::gui::Theme::title_bg, yaze::gui::Theme::title_bg_active, yaze::gui::Theme::title_bg_collapsed, yaze::gui::Theme::ChatColors::user_message, yaze::gui::Theme::warning, yaze::gui::Theme::window_bg, and yaze::gui::Theme::window_rounding.

Referenced by InitializeBuiltInThemes().

Here is the call graph for this function:

◆ ParseThemeFile()

absl::Status yaze::gui::ThemeManager::ParseThemeFile ( const std::string & content,
Theme & theme )
private

Definition at line 604 of file theme_manager.cc.

References yaze::gui::Theme::accent, yaze::gui::Theme::animation_speed, yaze::gui::Theme::author, yaze::gui::Theme::background, yaze::gui::Theme::border, yaze::gui::Theme::border_shadow, yaze::gui::Theme::button, yaze::gui::Theme::button_active, yaze::gui::Theme::button_hovered, yaze::gui::Theme::check_mark, yaze::gui::Theme::child_bg, yaze::gui::Theme::description, yaze::gui::Theme::docking_empty_bg, yaze::gui::Theme::docking_preview, yaze::gui::Theme::drag_drop_target, yaze::gui::Theme::enable_animations, yaze::gui::Theme::enable_glow_effects, yaze::gui::Theme::error, yaze::gui::Theme::frame_bg, yaze::gui::Theme::frame_bg_active, yaze::gui::Theme::frame_bg_hovered, yaze::gui::Theme::frame_border_size, yaze::gui::Theme::frame_rounding, yaze::gui::Theme::grab_rounding, yaze::gui::Theme::header, yaze::gui::Theme::header_active, yaze::gui::Theme::header_hovered, yaze::gui::Theme::info, yaze::gui::Theme::input_text_cursor, yaze::gui::Theme::menu_bar_bg, yaze::gui::Theme::modal_window_dim_bg, yaze::gui::Theme::name, yaze::gui::Theme::nav_cursor, yaze::gui::Theme::nav_windowing_dim_bg, yaze::gui::Theme::nav_windowing_highlight, ParseColorFromString(), yaze::gui::Theme::plot_histogram, yaze::gui::Theme::plot_histogram_hovered, yaze::gui::Theme::plot_lines, yaze::gui::Theme::plot_lines_hovered, yaze::gui::Theme::popup_bg, yaze::gui::Theme::primary, yaze::gui::Theme::resize_grip, yaze::gui::Theme::resize_grip_active, yaze::gui::Theme::resize_grip_hovered, yaze::gui::Theme::scrollbar_bg, yaze::gui::Theme::scrollbar_grab, yaze::gui::Theme::scrollbar_grab_active, yaze::gui::Theme::scrollbar_grab_hovered, yaze::gui::Theme::scrollbar_rounding, yaze::gui::Theme::secondary, yaze::gui::Theme::separator, yaze::gui::Theme::separator_active, yaze::gui::Theme::separator_hovered, yaze::gui::Theme::slider_grab, yaze::gui::Theme::slider_grab_active, yaze::gui::Theme::success, yaze::gui::Theme::surface, yaze::gui::Theme::tab, yaze::gui::Theme::tab_active, yaze::gui::Theme::tab_dimmed, yaze::gui::Theme::tab_dimmed_selected, yaze::gui::Theme::tab_dimmed_selected_overline, yaze::gui::Theme::tab_hovered, yaze::gui::Theme::tab_rounding, yaze::gui::Theme::tab_selected_overline, yaze::gui::Theme::table_border_light, yaze::gui::Theme::table_border_strong, yaze::gui::Theme::table_header_bg, yaze::gui::Theme::table_row_bg, yaze::gui::Theme::table_row_bg_alt, yaze::gui::Theme::text_disabled, yaze::gui::Theme::text_link, yaze::gui::Theme::text_primary, yaze::gui::Theme::text_secondary, yaze::gui::Theme::text_selected_bg, yaze::gui::Theme::title_bg, yaze::gui::Theme::title_bg_active, yaze::gui::Theme::title_bg_collapsed, yaze::gui::Theme::tree_lines, yaze::gui::Theme::warning, yaze::gui::Theme::window_bg, yaze::gui::Theme::window_border_size, and yaze::gui::Theme::window_rounding.

Referenced by LoadThemeFromFile().

Here is the call graph for this function:

◆ ParseColorFromString()

Color yaze::gui::ThemeManager::ParseColorFromString ( const std::string & color_str) const
private

Definition at line 819 of file theme_manager.cc.

References yaze::gui::RGBA().

Referenced by ParseThemeFile().

Here is the call graph for this function:

◆ SerializeTheme()

std::string yaze::gui::ThemeManager::SerializeTheme ( const Theme & theme) const
private

Definition at line 836 of file theme_manager.cc.

References yaze::gui::Theme::accent, yaze::gui::Theme::active_selection, yaze::gui::Theme::author, yaze::gui::Theme::background, yaze::gui::Theme::border, yaze::gui::Theme::border_shadow, yaze::gui::Theme::button, yaze::gui::Theme::button_active, yaze::gui::Theme::button_hovered, yaze::gui::Theme::check_mark, yaze::gui::Theme::child_bg, yaze::gui::Theme::code_background, yaze::gui::Theme::description, yaze::gui::Theme::disabled_overlay, yaze::gui::Theme::docking_empty_bg, yaze::gui::Theme::docking_preview, yaze::gui::Theme::drag_drop_target, yaze::gui::Theme::editor_background, yaze::gui::Theme::editor_cursor, yaze::gui::Theme::editor_grid, yaze::gui::Theme::editor_selection, yaze::gui::Theme::enable_animations, yaze::gui::Theme::enable_glow_effects, yaze::gui::Theme::error, yaze::gui::Theme::error_light, yaze::gui::Theme::focus_border, yaze::gui::Theme::frame_bg, yaze::gui::Theme::frame_bg_active, yaze::gui::Theme::frame_bg_hovered, yaze::gui::Theme::frame_rounding, yaze::gui::Theme::header, yaze::gui::Theme::header_active, yaze::gui::Theme::header_hovered, yaze::gui::Theme::hover_highlight, yaze::gui::Theme::info, yaze::gui::Theme::info_light, yaze::gui::Theme::input_text_cursor, yaze::gui::Theme::link_hover, yaze::gui::Theme::menu_bar_bg, yaze::gui::Theme::modal_window_dim_bg, yaze::gui::Theme::name, yaze::gui::Theme::nav_cursor, yaze::gui::Theme::nav_windowing_dim_bg, yaze::gui::Theme::nav_windowing_highlight, yaze::gui::Theme::plot_histogram, yaze::gui::Theme::plot_histogram_hovered, yaze::gui::Theme::plot_lines, yaze::gui::Theme::plot_lines_hovered, yaze::gui::Theme::popup_bg, yaze::gui::Theme::primary, yaze::gui::Theme::resize_grip, yaze::gui::Theme::resize_grip_active, yaze::gui::Theme::resize_grip_hovered, yaze::gui::Theme::scrollbar_bg, yaze::gui::Theme::scrollbar_grab, yaze::gui::Theme::scrollbar_grab_active, yaze::gui::Theme::scrollbar_grab_hovered, yaze::gui::Theme::scrollbar_rounding, yaze::gui::Theme::secondary, yaze::gui::Theme::separator, yaze::gui::Theme::separator_active, yaze::gui::Theme::separator_hovered, yaze::gui::Theme::slider_grab, yaze::gui::Theme::slider_grab_active, yaze::gui::Theme::success, yaze::gui::Theme::success_light, yaze::gui::Theme::surface, yaze::gui::Theme::tab, yaze::gui::Theme::tab_active, yaze::gui::Theme::tab_dimmed, yaze::gui::Theme::tab_dimmed_selected, yaze::gui::Theme::tab_dimmed_selected_overline, yaze::gui::Theme::tab_hovered, yaze::gui::Theme::tab_rounding, yaze::gui::Theme::tab_selected_overline, yaze::gui::Theme::table_border_light, yaze::gui::Theme::table_border_strong, yaze::gui::Theme::table_header_bg, yaze::gui::Theme::table_row_bg, yaze::gui::Theme::table_row_bg_alt, yaze::gui::Theme::text_disabled, yaze::gui::Theme::text_highlight, yaze::gui::Theme::text_link, yaze::gui::Theme::text_primary, yaze::gui::Theme::text_secondary, yaze::gui::Theme::text_selected_bg, yaze::gui::Theme::title_bg, yaze::gui::Theme::title_bg_active, yaze::gui::Theme::title_bg_collapsed, yaze::gui::Theme::tree_lines, yaze::gui::Theme::warning, yaze::gui::Theme::warning_light, yaze::gui::Theme::window_bg, and yaze::gui::Theme::window_rounding.

Referenced by SaveThemeToFile().

◆ GetThemeSearchPaths()

std::vector< std::string > yaze::gui::ThemeManager::GetThemeSearchPaths ( ) const
private

◆ GetThemesDirectory()

std::string yaze::gui::ThemeManager::GetThemesDirectory ( ) const
private

Definition at line 2423 of file theme_manager.cc.

References GetThemeSearchPaths().

Here is the call graph for this function:

◆ GetCurrentThemeFilePath()

std::string yaze::gui::ThemeManager::GetCurrentThemeFilePath ( ) const
private

Definition at line 2529 of file theme_manager.cc.

References current_theme_name_, and GetThemeSearchPaths().

Referenced by ShowSimpleThemeEditor().

Here is the call graph for this function:

Member Data Documentation

◆ themes_

std::map<std::string, Theme> yaze::gui::ThemeManager::themes_
private

◆ current_theme_

◆ current_theme_name_

std::string yaze::gui::ThemeManager::current_theme_name_ = "Classic YAZE"
private

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