53402d84d5
Wave 1 de parallel-fix-issues integrada a master: - 0025: text_editor_cpp_core + file_watcher_cpp_core - 0026: gl_texture_load_cpp_gfx (vendor: stb_image v2.30) Ademas se commitea WIP previo de master que estaba sin commitear (cambios en shaders_lab, dag_*, framework, tokens, kpi_card, gl_loader.md, etc.) para dejar HEAD buildable. Notas: - Algunos deps del gallery (button.cpp, toolbar.cpp, modal_dialog.cpp...) siguen UNTRACKED — gating con FN_BUILD_GALLERY=ON (default OFF) para que master build (sin flag) no los necesite. - Build OK con y sin flag. fn index registra 904 functions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
namespace fn {
|
|
|
|
// Modos de tema para run_app.
|
|
enum class ThemeMode {
|
|
FnDark, // Identidad del registry (Mantine v9 dark + indigo). DEFAULT.
|
|
ImGuiDark, // Tema estandar de ImGui (ImGui::StyleColorsDark).
|
|
ImGuiLight,
|
|
None, // No tocar el ImGuiStyle — la app lo configura.
|
|
};
|
|
|
|
struct AppConfig {
|
|
const char* title = "fn_registry";
|
|
int width = 1280;
|
|
int height = 720;
|
|
bool vsync = true;
|
|
bool viewports = false; // Enable multi-viewport: ImGui windows become real OS windows
|
|
ThemeMode theme = ThemeMode::FnDark; // Identidad visual unificada por defecto
|
|
float bg_r = 0.102f; // fn_tokens::colors::bg (dark.7 #1A1B1E)
|
|
float bg_g = 0.106f;
|
|
float bg_b = 0.118f;
|
|
};
|
|
|
|
// Run an ImGui application. The render_fn is called every frame
|
|
// between ImGui::NewFrame() and ImGui::Render().
|
|
// Returns 0 on clean exit, 1 on error.
|
|
int run_app(AppConfig config, std::function<void()> render_fn);
|
|
|
|
// Convenience: run with default config
|
|
int run_app(std::function<void()> render_fn);
|
|
|
|
} // namespace fn
|