mod container;
mod space_view;
mod space_view_contents;
mod tree_actions;
pub mod ui;
mod view_properties;
mod viewport_blueprint;
pub use container::ContainerBlueprint;
use re_viewer_context::ViewerContext;
pub use space_view::SpaceViewBlueprint;
pub use space_view_contents::SpaceViewContents;
pub use tree_actions::TreeAction;
pub use view_properties::{entity_path_for_view_property, ViewProperty, ViewPropertyQueryError};
pub use viewport_blueprint::ViewportBlueprint;
pub const VIEWPORT_PATH: &str = "viewport";
#[inline]
pub fn container_kind_to_egui(
kind: re_types_blueprint::blueprint::components::ContainerKind,
) -> egui_tiles::ContainerKind {
use re_types_blueprint::blueprint::components::ContainerKind;
match kind {
ContainerKind::Tabs => egui_tiles::ContainerKind::Tabs,
ContainerKind::Horizontal => egui_tiles::ContainerKind::Horizontal,
ContainerKind::Vertical => egui_tiles::ContainerKind::Vertical,
ContainerKind::Grid => egui_tiles::ContainerKind::Grid,
}
}
#[inline]
pub fn container_kind_from_egui(
kind: egui_tiles::ContainerKind,
) -> re_types_blueprint::blueprint::components::ContainerKind {
use re_types_blueprint::blueprint::components::ContainerKind;
match kind {
egui_tiles::ContainerKind::Tabs => ContainerKind::Tabs,
egui_tiles::ContainerKind::Horizontal => ContainerKind::Horizontal,
egui_tiles::ContainerKind::Vertical => ContainerKind::Vertical,
egui_tiles::ContainerKind::Grid => ContainerKind::Grid,
}
}
pub fn default_created_space_views(ctx: &ViewerContext<'_>) -> Vec<SpaceViewBlueprint> {
re_tracing::profile_function!();
ctx.space_view_class_registry
.iter_registry()
.flat_map(|entry| {
let spawn_heuristics = entry.class.spawn_heuristics(ctx);
spawn_heuristics
.into_vec()
.into_iter()
.map(|recommendation| SpaceViewBlueprint::new(entry.identifier, recommendation))
})
.collect()
}