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_views.hpp"
8#include "../../blueprint/components/root_container.hpp"
9#include "../../blueprint/components/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 views
26 std::optional<rerun::blueprint::components::RootContainer> root_container;
27
28 /// Show one tab as maximized?
29 std::optional<rerun::blueprint::components::ViewMaximized> maximized;
30
31 /// Whether the viewport layout is determined automatically.
32 ///
33 /// If `true`, the container layout will be reset whenever a new 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 views should be created automatically.
38 ///
39 /// If `true`, the viewer will only add views that it hasn't considered previously (as identified by `past_viewer_recommendations`)
40 /// and which aren't deemed redundant to existing views.
41 /// This defaults to `false` and is automatically set to `false` when the user adds views manually in the viewer.
42 std::optional<rerun::blueprint::components::AutoViews> auto_views;
43
44 /// Hashes of all recommended 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 views, you should set `auto_views` to `false`.
48 ///
49 /// The viewer uses this to determine whether it should keep adding 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 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 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 views should be created automatically.
93 ///
94 /// If `true`, the viewer will only add views that it hasn't considered previously (as identified by `past_viewer_recommendations`)
95 /// and which aren't deemed redundant to existing views.
96 /// This defaults to `false` and is automatically set to `false` when the user adds views manually in the viewer.
98 auto_views = std::move(_auto_views);
99 // See: https://github.com/rerun-io/rerun/issues/4027
100 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
101 }
102
103 /// Hashes of all recommended views the viewer has already added and that should not be added again.
104 ///
105 /// This is an internal field and should not be set usually.
106 /// If you want the viewer from stopping to add views, you should set `auto_views` to `false`.
107 ///
108 /// The viewer uses this to determine whether it should keep adding views.
111 _past_viewer_recommendations
112 ) && {
113 past_viewer_recommendations = std::move(_past_viewer_recommendations);
114 // See: https://github.com/rerun-io/rerun/issues/4027
115 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
116 }
117 };
118
119} // namespace rerun::blueprint::archetypes
120
121namespace rerun {
122 /// \private
123 template <typename T>
124 struct AsComponents;
125
126 /// \private
127 template <>
128 struct AsComponents<blueprint::archetypes::ViewportBlueprint> {
129 /// Serialize all set component batches.
130 static Result<std::vector<ComponentBatch>> serialize(
132 );
133 };
134} // 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:23
Archetype: The top-level description of the viewport.
Definition viewport_blueprint.hpp:24
std::optional< rerun::blueprint::components::ViewMaximized > maximized
Show one tab as maximized?
Definition viewport_blueprint.hpp:29
ViewportBlueprint with_past_viewer_recommendations(Collection< rerun::blueprint::components::ViewerRecommendationHash > _past_viewer_recommendations) &&
Hashes of all recommended views the viewer has already added and that should not be added again.
Definition viewport_blueprint.hpp:109
std::optional< rerun::blueprint::components::RootContainer > root_container
The layout of the views.
Definition viewport_blueprint.hpp:26
std::optional< Collection< rerun::blueprint::components::ViewerRecommendationHash > > past_viewer_recommendations
Hashes of all recommended views the viewer has already added and that should not be added again.
Definition viewport_blueprint.hpp:51
ViewportBlueprint with_auto_views(rerun::blueprint::components::AutoViews _auto_views) &&
Whether or not views should be created automatically.
Definition viewport_blueprint.hpp:97
std::optional< rerun::blueprint::components::AutoViews > auto_views
Whether or not views should be created automatically.
Definition viewport_blueprint.hpp:42
std::optional< rerun::blueprint::components::AutoLayout > auto_layout
Whether the viewport layout is determined automatically.
Definition viewport_blueprint.hpp:35
ViewportBlueprint with_maximized(rerun::blueprint::components::ViewMaximized _maximized) &&
Show one tab as maximized?
Definition viewport_blueprint.hpp:74
ViewportBlueprint with_auto_layout(rerun::blueprint::components::AutoLayout _auto_layout) &&
Whether the viewport layout is determined automatically.
Definition viewport_blueprint.hpp:85
ViewportBlueprint with_root_container(rerun::blueprint::components::RootContainer _root_container) &&
The layout of the views.
Definition viewport_blueprint.hpp:65
Component: Whether the viewport layout is determined automatically.
Definition auto_layout.hpp:15
Component: Whether or not views should be created automatically.
Definition auto_views.hpp:15
Component: The container that sits at the root of a viewport.
Definition root_container.hpp:16
Component: Whether a view is maximized.
Definition view_maximized.hpp:16
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32