4a0750445c
Phase 1 — graph_layouts:
- New module cpp/functions/viz/graph_layouts.{h,cpp,md} v1.0.0
- layout_grid, layout_circular, layout_random (migrated from graph_force_layout.cpp)
- layout_radial: BFS rings from root, hop k -> circle of radius k*ring_spacing
- layout_hierarchical: Sugiyama-style heuristic (longest-path levels + barycenter ordering)
- layout_fixed: no-op
- All respect NF_PINNED. graph_layout_circular/grid kept as deprecated wrappers.
Phase 2-3 — graph_viewport v1.2.0:
- Multi-selection via state.selection (vector<int>); NF_SELECTED kept in sync
- Lasso: Shift+Drag on empty area; AABB hit-test on release
- Drag of N-selection: all selected pinned + moved by mouse delta
- Ctrl+click toggle, Esc clears selection
- Right-click on node -> on_context_menu callback
- Double-click on node -> on_double_click callback
- Helpers exposed: graph_viewport_clear/add_to/toggle/is_selected (own TU for tests)
Phase 4 — tests:
- test_graph_layouts: 12 cases / 364 assertions covering geometry, pin, edges
- test_graph_viewport: 5 cases for selection helpers (pure logic, no GL)
Phase 5 — demo (primitives_gallery):
- Layout combo (force/grid/circular/radial/hierarchical/fixed) + Apply button
- Right-click popup with Pin/Unpin/Add-to-selection
- Status overlay shows [N selected] when selection non-empty
- Updated golden images
Issue moved to dev/issues/completed/.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
109 lines
4.7 KiB
CMake
109 lines
4.7 KiB
CMake
add_imgui_app(primitives_gallery
|
|
main.cpp
|
|
capture.cpp
|
|
demo.cpp
|
|
demos_core.cpp
|
|
demos_viz.cpp
|
|
demos_graph.cpp
|
|
demos_graph_styles.cpp
|
|
demos_gfx.cpp
|
|
demos_3d.cpp
|
|
demos_text_editor.cpp
|
|
demos_gl_texture.cpp
|
|
demos_extras.cpp
|
|
demos_mesh.cpp
|
|
# animation primitives (issue 0031)
|
|
demos_animation.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/tween_curves.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/bezier_editor.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/timeline.cpp
|
|
demos_sql.cpp
|
|
demos_scientific.cpp
|
|
# text_editor + file_watcher (issue 0025) + file_poll_diff pure (issue 0045)
|
|
${CMAKE_SOURCE_DIR}/functions/core/text_editor.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/file_watcher.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/file_poll_diff.cpp
|
|
${CMAKE_SOURCE_DIR}/vendor/imgui_text_edit/TextEditor.cpp
|
|
# sql_workbench (issue 0032) + sql_parse pure (issue 0045)
|
|
${CMAKE_SOURCE_DIR}/functions/core/sql_workbench.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/sql_parse.cpp
|
|
# Core primitives demoed (tokens vive en fn_framework)
|
|
${CMAKE_SOURCE_DIR}/functions/core/fullscreen_window.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/page_header.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/dashboard_panel.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/badge.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/empty_state.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/button.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/icon_button.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/toolbar.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/modal_dialog.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/text_input.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/select.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/toast.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/tree_view.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/process_runner.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/process_state_machine.cpp
|
|
# Viz primitives demoed
|
|
${CMAKE_SOURCE_DIR}/functions/viz/kpi_card.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/bar_chart.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/pie_chart.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/line_plot.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/scatter_plot.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/histogram.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/sparkline.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/candlestick.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/gauge.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/heatmap.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/table_view.cpp
|
|
# 3D viz primitives (issue 0028, ImPlot3D)
|
|
${CMAKE_SOURCE_DIR}/functions/viz/surface_plot_3d.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/scatter_3d.cpp
|
|
# Scientific viz (issue 0034)
|
|
${CMAKE_SOURCE_DIR}/functions/viz/treemap.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/sankey.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/chord.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/contour.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/voronoi.cpp
|
|
# Graph stack (instanced GPU + Barnes-Hut + spatial hash)
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_types.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_renderer.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_icons.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_force_layout.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_force_layout_gpu.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_layouts.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_viewport.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/graph_viewport_selection.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/graph_spatial_hash.cpp
|
|
# GL loader (Linux no-op, Windows wglGetProcAddress)
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/gl_loader.cpp
|
|
# Shader stack (shader_canvas demo)
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/gl_shader.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/gl_framebuffer.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/fullscreen_quad.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/shader_canvas.cpp
|
|
# gl_texture_load (issue 0026) + stb_image
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/gl_texture_load.cpp
|
|
${CMAKE_SOURCE_DIR}/vendor/stb/stb_image_impl.cpp
|
|
# mesh_viewer stack (issue 0029)
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/mesh_obj_load.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/mesh_gpu.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/core/orbit_camera.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/viz/mesh_viewer.cpp
|
|
)
|
|
target_include_directories(primitives_gallery PRIVATE
|
|
${CMAKE_SOURCE_DIR}/vendor/imgui_text_edit
|
|
${CMAKE_SOURCE_DIR}/vendor/stb
|
|
)
|
|
|
|
# SQLite (sql_workbench) — alias provisto por cpp/CMakeLists.txt:
|
|
# system on Linux, vendored amalgamation on Windows cross-compile.
|
|
target_link_libraries(primitives_gallery PRIVATE SQLite::SQLite3)
|
|
|
|
if(WIN32)
|
|
target_link_libraries(primitives_gallery PRIVATE opengl32)
|
|
endif()
|
|
|
|
if(WIN32)
|
|
set_target_properties(primitives_gallery PROPERTIES WIN32_EXECUTABLE TRUE)
|
|
endif()
|