Files
graph_explorer/CMakeLists.txt
T
egutierrez f9d2229512 migrate entity panel Table to data_table_cpp_viz (issue 0081-J)
- views.cpp: replace ImGui::BeginTable("##tablev", 6, ...) + 200 LOC of
  manual sort/filter/clipper helpers with data_table::render("##tablev_dt", ...)
  AppState::table_dt_state persists sort+filter+stages between frames.
  Removed helpers: render_one_table, render_table_headers_with_filters,
  table_row_lt, table_row_field, table_col_name_by_id, k_table_cols,
  TableColMeta, TableSortCtx, ci_contains, build_visible lambda.
  NOTE: click-to-select-in-viewport removed from table panel; use Inspector.

- views.h: add #include "core/data_table_types.h" + data_table::State
  table_dt_state member to AppState.

- CMakeLists.txt: target_link_libraries(graph_explorer PRIVATE fn_table_viz)

- app.md: uses_functions += [data_table_cpp_viz, viz_render_cpp_viz,
  compute_stage_cpp_core, compute_pipeline_cpp_core, tql_emit_cpp_core,
  tql_apply_cpp_core, lua_engine_cpp_core, join_tables_cpp_core,
  auto_detect_type_cpp_core, compute_column_stats_cpp_core,
  llm_anthropic_cpp_core, tql_to_sql_cpp_core]

Panels NOT migrated (have inline widget interactions incompatible with
data_table::render):
  TODO: jobs_table (views_jobs.cpp) — ProgressBar + Cancel/Delete buttons
  TODO: ##te_rows (views.cpp NodeGroups) — promote/demote buttons, context menus
  TODO: ##ents/##rels (extract_panel.cpp) — editable InputText cells
  TODO: ##insp_id/##insp_fields/##enr_params/##te_fields — layout helpers (2 col)

Build: OK (1 warning: tmpnam in llm_anthropic.cpp, unrelated to migration)
Tests: 125 pytest passed, 0 failures.
2026-05-15 14:42:07 +02:00

80 lines
3.0 KiB
CMake

# SQLite3: el target SQLite::SQLite3 lo crea ya cpp/CMakeLists.txt (sistema en
# Linux, vendored amalgamation en Windows). Si esta app se construye en
# stand-alone, levantar SQLite desde el amalgamation vendoreado del registry.
find_package(SQLite3 QUIET)
if(NOT SQLite3_FOUND AND NOT TARGET sqlite3_vendored)
set(SQLITE3_AMALG_DIR ${FN_CPP_ROOT_DIR}/vendor/sqlite3)
add_library(sqlite3_vendored STATIC ${SQLITE3_AMALG_DIR}/sqlite3.c)
target_include_directories(sqlite3_vendored PUBLIC ${SQLITE3_AMALG_DIR})
target_compile_definitions(sqlite3_vendored PRIVATE
SQLITE_THREADSAFE=1
SQLITE_ENABLE_FTS5
SQLITE_ENABLE_JSON1
)
add_library(SQLite::SQLite3 ALIAS sqlite3_vendored)
endif()
add_imgui_app(graph_explorer
main.cpp
data.cpp
views.cpp
views_jobs.cpp
types_registry.cpp
layout_store.cpp
entity_ops.cpp
project_manager.cpp
node_groups.cpp
jobs.cpp
enrichers.cpp
agent.cpp
extract_panel.cpp
# --- viz ---
${FN_CPP_ROOT_DIR}/functions/viz/graph_renderer.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_force_layout.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_force_layout_gpu.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_layouts.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_viewport.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_viewport_selection.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_labels.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_labels_select.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_icons.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_sources.cpp
${FN_CPP_ROOT_DIR}/functions/viz/graph_types.cpp
${FN_CPP_ROOT_DIR}/functions/core/graph_spatial_hash.cpp
# --- core UI ---
${FN_CPP_ROOT_DIR}/functions/core/button.cpp
${FN_CPP_ROOT_DIR}/functions/core/icon_button.cpp
${FN_CPP_ROOT_DIR}/functions/core/toolbar.cpp
${FN_CPP_ROOT_DIR}/functions/core/modal_dialog.cpp
${FN_CPP_ROOT_DIR}/functions/core/text_input.cpp
${FN_CPP_ROOT_DIR}/functions/core/select.cpp
${FN_CPP_ROOT_DIR}/functions/core/tree_view.cpp
${FN_CPP_ROOT_DIR}/functions/core/page_header.cpp
${FN_CPP_ROOT_DIR}/functions/core/fullscreen_window.cpp
${FN_CPP_ROOT_DIR}/functions/core/badge.cpp
${FN_CPP_ROOT_DIR}/functions/core/empty_state.cpp
)
target_include_directories(graph_explorer PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${FN_CPP_ROOT_DIR}/functions
)
target_link_libraries(graph_explorer PRIVATE SQLite::SQLite3 DuckDB::DuckDB fn_table_viz)
duckdb_copy_runtime(graph_explorer)
# Threads — issue 0026 (jobs system) usa std::thread + std::mutex + condvar.
find_package(Threads REQUIRED)
target_link_libraries(graph_explorer PRIVATE Threads::Threads)
# OpenGL: graph_renderer + graph_force_layout_gpu llaman gl* directamente.
# fn::run_app inicializa el loader cuando AppConfig::init_gl_loader = true.
if(NOT WIN32)
find_package(OpenGL REQUIRED)
target_link_libraries(graph_explorer PRIVATE OpenGL::GL)
endif()
if(WIN32)
set_target_properties(graph_explorer PROPERTIES WIN32_EXECUTABLE TRUE)
endif()