334943b7db
ImGui app shell: - main.cpp con fn::run_app(cfg, render), panel Main placeholder. - CMakeLists.txt + fn_framework + fn_table_viz opt-in. - app.md frontmatter base. Capas HTTP/WS/tabs en commits siguientes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.6 KiB
C++
46 lines
1.6 KiB
C++
#include <imgui.h>
|
|
#include "app_base.h"
|
|
#include "core/panel_menu.h"
|
|
#include "core/icons_tabler.h"
|
|
#include "core/logger.h"
|
|
// #include "viz/data_table.h" // uncomment to enable data_table::render() panel
|
|
|
|
// Toggles de paneles (visibles desde el menu View del menubar canonico)
|
|
static bool g_show_main = true;
|
|
|
|
static void draw_main() {
|
|
if (!ImGui::Begin(TI_HOME " Main", &g_show_main)) {
|
|
ImGui::End();
|
|
return;
|
|
}
|
|
ImGui::TextUnformatted("Hello from dag_engine_ui");
|
|
ImGui::End();
|
|
}
|
|
|
|
static void render() {
|
|
// El framework dibuja menubar (View/Layouts/Settings/About) y un
|
|
// DockSpaceOverViewport central (auto_dockspace=true por defecto).
|
|
// Aqui solo se dibujan los paneles propios de la app.
|
|
if (g_show_main) draw_main();
|
|
|
|
// === Data panel (uncomment to enable) ===
|
|
// static data_table::State data_state;
|
|
// static std::vector<data_table::TableInput> data_tables; // populate from your source
|
|
// data_table::render("main_data", data_tables, data_state);
|
|
}
|
|
|
|
int main(int /*argc*/, char** /*argv*/) {
|
|
static fn_ui::PanelToggle panels[] = {
|
|
{ "Main", nullptr, &g_show_main },
|
|
};
|
|
|
|
fn::AppConfig cfg;
|
|
cfg.title = "dag_engine_ui — Frontend ImGui para dag_engine. Lista, lanza e inspecciona DAGs con live updates via WS.";
|
|
cfg.about = { "dag_engine_ui", "0.1.0", "Frontend ImGui para dag_engine. Lista, lanza e inspecciona DAGs con live updates via WS." };
|
|
cfg.log = { "dag_engine_ui.log", 1 };
|
|
cfg.panels = panels;
|
|
cfg.panel_count = sizeof(panels) / sizeof(panels[0]);
|
|
|
|
return fn::run_app(cfg, render);
|
|
}
|