FuncDoodle
Loading...
Searching...
No Matches
Themes.h File Reference

Theme system for FuncDoodle UI styling. More...

#include "UI/Gui.h"
#include "imgui.h"
#include "nfd.h"
#include <algorithm>
#include <cstdlib>
#include <filesystem>
#include <string.h>
#include <string>
#include <string_view>
#include <type_traits>
#include <unordered_map>
#include <vector>
#include <toml++.h>
#include "Util/MacroUtils.h"
#include "Util/UUID.h"

Go to the source code of this file.

Classes

struct  FuncDoodle::Themes::CustomTheme
 Represents a users' custom theme for FuncDoodle. More...

Namespaces

namespace  Themes
 Helper utilities for applying, creating and saving FuncDoodle themes.
namespace  FuncDoodle
 The FuncDoodle C++ namespace.
namespace  FuncDoodle::Themes

Macros

#define TOML_EXCEPTIONS   0
#define SAVE_FLOAT(field)
#define SAVE_VEC2(field)
#define SAVE_BOOL(field)
#define SAVE_ENUM(field)

Functions

void FuncDoodle::Themes::ClearThemes ()
 Clears the loaded theme registry and frees owned metadata.
void FuncDoodle::Themes::ThemeEditor ()
 Renders the ImGui style editor when enabled.
CustomThemeFuncDoodle::Themes::LoadThemeFromFile (const char *path)
void FuncDoodle::Themes::LoadThemes (std::filesystem::path path)
void FuncDoodle::Themes::SaveCurrentTheme ()
 Renders and processes the save-theme UI.

Variables

constexpr const char * FuncDoodle::Themes::s_DefaultTheme
 UUID string of the built-in default theme.
std::map< UUID, CustomThemeFuncDoodle::Themes::g_Themes
bool FuncDoodle::Themes::g_ThemeEditorOpen = false
bool FuncDoodle::Themes::g_SaveThemeOpen = false
CustomTheme FuncDoodle::Themes::g_LastLoadedTheme

Detailed Description

Theme system for FuncDoodle UI styling.

Provides utilities for loading, saving, editing, and managing ImGui themes. Themes are stored as TOML files and support full ImGuiStyle serialization.

Macro Definition Documentation

◆ SAVE_BOOL

#define SAVE_BOOL ( field)
Value:
other.insert(#field, style.field)

◆ SAVE_ENUM

#define SAVE_ENUM ( field)
Value:
other.insert(#field, static_cast<int>(style.field))

◆ SAVE_FLOAT

#define SAVE_FLOAT ( field)
Value:
other.insert(#field, style.field)

◆ SAVE_VEC2

#define SAVE_VEC2 ( field)
Value:
other.insert(#field, toml::array{style.field.x, style.field.y})

◆ TOML_EXCEPTIONS

#define TOML_EXCEPTIONS   0