Files
2026-09-03 15:31:39 +08:00

27 lines
1.2 KiB
C++

#pragma once
#include "Gallery_Plots_2D.hpp"
#include "Gallery_Plots_3D.hpp"
#include <optional>
#include <span>
#include <string_view>
namespace aethera::web {
enum struct Plot_Dimension : std::uint8_t {
two_d, /* Blend2D 二维绘图。 */
three_d /* Datoviz 三维绘图。 */
};
struct Plot_Definition {
std::string_view id; /* 协议和路由使用的稳定标识。 */
std::string_view title; /* 前端直接展示的业务名称。 */
std::string_view category; /* Catalog 分组名称。 */
std::string_view description; /* Plot 能力说明。 */
Plot_Dimension dimension{Plot_Dimension::two_d}; /* 渲染后端维度。 */
Gallery_Build (*create)(); /* 创建组件所有者与借用组件的 Scene。 */
};
[[nodiscard]] std::span<const Plot_Definition> gallery_plot_definitions() noexcept;
[[nodiscard]] const Plot_Definition* find_gallery_plot_definition(std::string_view id) noexcept;
[[nodiscard]] std::string_view plot_dimension_name(Plot_Dimension dimension) noexcept;
}