/*
 * Application.cxx  Projet Modulations Numériques
 * Création : 2026/01/17 17h
 * Licence GPL v2
 * Copyright Eric Bachard 2026/01/13
 */

#include "application.h"
#include "imgui_themes.h"

Application::Application()
  :  current_theme(DEFAULT_THEME), current_tab(Amplitude_TAB),
     windowWidth(DEFAULT_SDL_WINDOW_WIDTH),
     windowHeight(DEFAULT_SDL_WINDOW_HEIGHT)
{
}

Application::~Application()
{
}

void Application::set_current_tab(TAB_name aTab)
{
    if (current_tab == aTab)
        return;

    current_tab = aTab;
}


void Application::setTheme(THEME aTheme)
{
    if (current_theme == aTheme)
        return;

    switch(aTheme)
    {
        case LIGHT_GREEN_THEME:
            ImGui::StyleColorsLightGreen();
          break;

        case DARK_THEME:
            ImGui::StyleColorsDark();
          break;

        case CLASSIC_THEME:
            ImGui::StyleColorsClassic();
          break;

        case LIGHT_BLUE_THEME:
        ImGui::StyleColorsLight();
          break;

        case WINDOWS_THEME: ImGui::StyleColorsWindows();
          break;

        default:
          break;
    }
    current_theme = aTheme;
}
