Rerun C++ SDK
Loading...
Searching...
No Matches
viewport_blueprint.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/viewport_blueprint.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/auto_layout.hpp"
7#include "../../blueprint/components/auto_space_views.hpp"
8#include "../../blueprint/components/root_container.hpp"
9#include "../../blueprint/components/space_view_maximized.hpp"
10#include "../../blueprint/components/viewer_recommendation_hash.hpp"
11#include "../../collection.hpp"
12#include "../../compiler_utils.hpp"
13#include "../../component_batch.hpp"
14#include "../../indicator_component.hpp"
15#include "../../result.hpp"
16
17#include <cstdint>
18#include <optional>
19#include <utility>
20#include <vector>
21
22namespace rerun::blueprint::archetypes {
23 /// **Archetype**: The top-level description of the viewport.
25 /// The layout of the space-views
26 std::optional<rerun::blueprint::components::RootContainer> root_container;
27
28 /// Show one tab as maximized?
29 std::optional<rerun::blueprint::components::SpaceViewMaximized> maximized;
30
31 /// Whether the viewport layout is determined automatically.
32 ///
33 /// If `true`, the container layout will be reset whenever a new space view is added or removed.
34 /// This defaults to `false` and is automatically set to `false` when there is user determined layout.
35 std::optional<rerun::blueprint::components::AutoLayout> auto_layout;
36
37 /// Whether or not space views should be created automatically.
38 ///
39 /// If `true`, the viewer will only add space views that it hasn't considered previously (as identified by `past_viewer_recommendations`)
40 /// and which aren't deemed redundant to existing space views.
41 /// This defaults to `false` and is automatically set to `false` when the user adds space views manually in the viewer.
42 std::optional<rerun::blueprint::components::AutoSpaceViews> auto_space_views;
43
44 /// Hashes of all recommended space views the viewer has already added and that should not be added again.
45 ///
46 /// This is an internal field and should not be set usually.
47 /// If you want the viewer from stopping to add space views, you should set `auto_space_views` to `false`.
48 ///
49 /// The viewer uses this to determine whether it should keep adding space views.
50 std::optional<Collection<rerun::blueprint::components::ViewerRecommendationHash>>
52
53 public:
54 static constexpr const char IndicatorComponentName[] =
55 "rerun.blueprint.components.ViewportBlueprintIndicator";
56
57 /// Indicator component, used to identify the archetype when converting to a list of components.
59
60 public:
61 ViewportBlueprint() = default;
62 ViewportBlueprint(ViewportBlueprint&& other) = default;
63
64 /// The layout of the space-views
67 ) && {
68 root_container = std::move(_root_container);
69 // See: https://github.com/rerun-io/rerun/issues/4027
70 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
71 }
72
73 /// Show one tab as maximized?
75 ) && {
76 maximized = std::move(_maximized);
77 // See: https://github.com/rerun-io/rerun/issues/4027
78 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
79 }
80
81 /// Whether the viewport layout is determined automatically.
82 ///
83 /// If `true`, the container layout will be reset whenever a new space view is added or removed.
84 /// This defaults to `false` and is automatically set to `false` when there is user determined layout.
86 ) && {
87 auto_layout = std::move(_auto_layout);
88 // See: https://github.com/rerun-io/rerun/issues/4027
89 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
90 }
91
92 /// Whether or not space views should be created automatically.
93 ///
94 /// If `true`, the viewer will only add space views that it hasn't considered previously (as identified by `past_viewer_recommendations`)
95 /// and which aren't deemed redundant to existing space views.
96 /// This defaults to `false` and is automatically set to `false` when the user adds space views manually in the viewer.
99 ) && {
100 auto_space_views = std::move(_auto_space_views);
101 // See: https://github.com/rerun-io/rerun/issues/4027
102 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
103 }
104
105 /// Hashes of all recommended space views the viewer has already added and that should not be added again.
106 ///
107 /// This is an internal field and should not be set usually.
108 /// If you want the viewer from stopping to add space views, you should set `auto_space_views` to `false`.
109 ///
110 /// The viewer uses this to determine whether it should keep adding space views.
113 _past_viewer_recommendations
114 ) && {
115 past_viewer_recommendations = std::move(_past_viewer_recommendations);
116 // See: https://github.com/rerun-io/rerun/issues/4027
117 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
118 }
119 };
120
121} // namespace rerun::blueprint::archetypes
122
123namespace rerun {
124 /// \private
125 template <typename T>
126 struct AsComponents;
127
128 /// \private
129 template <>
130 struct AsComponents<blueprint::archetypes::ViewportBlueprint> {
131 /// Serialize all set component batches.
132 static Result<std::vector<ComponentBatch>> serialize(
134 );
135 };
136} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Archetype: The top-level description of the viewport.
Definition viewport_blueprint.hpp:24
ViewportBlueprint with_past_viewer_recommendations(Collection< rerun::blueprint::components::ViewerRecommendationHash > _past_viewer_recommendations) &&
Hashes of all recommended space views the viewer has already added and that should not be added again...
Definition viewport_blueprint.hpp:111
std::optional< rerun::blueprint::components::RootContainer > root_container
The layout of the space-views.
Definition viewport_blueprint.hpp:26
std::optional< Collection< rerun::blueprint::components::ViewerRecommendationHash > > past_viewer_recommendations
Hashes of all recommended space views the viewer has already added and that should not be added again...
Definition viewport_blueprint.hpp:51
std::optional< rerun::blueprint::components::AutoLayout > auto_layout
Whether the viewport layout is determined automatically.
Definition viewport_blueprint.hpp:35
ViewportBlueprint with_auto_layout(rerun::blueprint::components::AutoLayout _auto_layout) &&
Whether the viewport layout is determined automatically.
Definition viewport_blueprint.hpp:85
ViewportBlueprint with_maximized(rerun::blueprint::components::SpaceViewMaximized _maximized) &&
Show one tab as maximized?
Definition viewport_blueprint.hpp:74
ViewportBlueprint with_auto_space_views(rerun::blueprint::components::AutoSpaceViews _auto_space_views) &&
Whether or not space views should be created automatically.
Definition viewport_blueprint.hpp:97
std::optional< rerun::blueprint::components::AutoSpaceViews > auto_space_views
Whether or not space views should be created automatically.
Definition viewport_blueprint.hpp:42
ViewportBlueprint with_root_container(rerun::blueprint::components::RootContainer _root_container) &&
The layout of the space-views.
Definition viewport_blueprint.hpp:65
std::optional< rerun::blueprint::components::SpaceViewMaximized > maximized
Show one tab as maximized?
Definition viewport_blueprint.hpp:29
Component: Whether the viewport layout is determined automatically.
Definition auto_layout.hpp:14
Component: Whether or not space views should be created automatically.
Definition auto_space_views.hpp:14
Component: The container that sits at the root of a viewport.
Definition root_container.hpp:15
Component: Whether a space view is maximized.
Definition space_view_maximized.hpp:15
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30