Rerun C++ SDK
Loading...
Searching...
No Matches
container_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/container_blueprint.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/active_tab.hpp"
7#include "../../blueprint/components/column_share.hpp"
8#include "../../blueprint/components/container_kind.hpp"
9#include "../../blueprint/components/grid_columns.hpp"
10#include "../../blueprint/components/included_content.hpp"
11#include "../../blueprint/components/row_share.hpp"
12#include "../../blueprint/components/visible.hpp"
13#include "../../collection.hpp"
14#include "../../compiler_utils.hpp"
15#include "../../component_batch.hpp"
16#include "../../components/name.hpp"
17#include "../../indicator_component.hpp"
18#include "../../result.hpp"
19
20#include <cstdint>
21#include <optional>
22#include <utility>
23#include <vector>
24
25namespace rerun::blueprint::archetypes {
26 /// **Archetype**: The description of a container.
28 /// The class of the view.
29 rerun::blueprint::components::ContainerKind container_kind;
30
31 /// The name of the container.
32 std::optional<rerun::components::Name> display_name;
33
34 /// `ContainerId`s or `ViewId`s that are children of this container.
35 std::optional<Collection<rerun::blueprint::components::IncludedContent>> contents;
36
37 /// The layout shares of each column in the container.
38 ///
39 /// For `components::ContainerKind::Horizontal` containers, the length of this list should always match the number of contents.
40 ///
41 /// Ignored for `components::ContainerKind::Vertical` containers.
42 std::optional<Collection<rerun::blueprint::components::ColumnShare>> col_shares;
43
44 /// The layout shares of each row of the container.
45 ///
46 /// For `components::ContainerKind::Vertical` containers, the length of this list should always match the number of contents.
47 ///
48 /// Ignored for `components::ContainerKind::Horizontal` containers.
49 std::optional<Collection<rerun::blueprint::components::RowShare>> row_shares;
50
51 /// Which tab is active.
52 ///
53 /// Only applies to `Tabs` containers.
54 std::optional<rerun::blueprint::components::ActiveTab> active_tab;
55
56 /// Whether this container is visible.
57 ///
58 /// Defaults to true if not specified.
59 std::optional<rerun::blueprint::components::Visible> visible;
60
61 /// How many columns this grid should have.
62 ///
63 /// If unset, the grid layout will be auto.
64 ///
65 /// Ignored for `components::ContainerKind::Horizontal`/`components::ContainerKind::Vertical` containers.
66 std::optional<rerun::blueprint::components::GridColumns> grid_columns;
67
68 public:
69 static constexpr const char IndicatorComponentName[] =
70 "rerun.blueprint.components.ContainerBlueprintIndicator";
71
72 /// Indicator component, used to identify the archetype when converting to a list of components.
74
75 public:
76 ContainerBlueprint() = default;
77 ContainerBlueprint(ContainerBlueprint&& other) = default;
78
79 explicit ContainerBlueprint(rerun::blueprint::components::ContainerKind _container_kind)
80 : container_kind(std::move(_container_kind)) {}
81
82 /// The name of the container.
84 display_name = std::move(_display_name);
85 // See: https://github.com/rerun-io/rerun/issues/4027
86 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
87 }
88
89 /// `ContainerId`s or `ViewId`s that are children of this container.
92 ) && {
93 contents = std::move(_contents);
94 // See: https://github.com/rerun-io/rerun/issues/4027
95 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
96 }
97
98 /// The layout shares of each column in the container.
99 ///
100 /// For `components::ContainerKind::Horizontal` containers, the length of this list should always match the number of contents.
101 ///
102 /// Ignored for `components::ContainerKind::Vertical` containers.
105 ) && {
106 col_shares = std::move(_col_shares);
107 // See: https://github.com/rerun-io/rerun/issues/4027
108 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
109 }
110
111 /// The layout shares of each row of the container.
112 ///
113 /// For `components::ContainerKind::Vertical` containers, the length of this list should always match the number of contents.
114 ///
115 /// Ignored for `components::ContainerKind::Horizontal` containers.
118 ) && {
119 row_shares = std::move(_row_shares);
120 // See: https://github.com/rerun-io/rerun/issues/4027
121 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
122 }
123
124 /// Which tab is active.
125 ///
126 /// Only applies to `Tabs` containers.
128 active_tab = std::move(_active_tab);
129 // See: https://github.com/rerun-io/rerun/issues/4027
130 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
131 }
132
133 /// Whether this container is visible.
134 ///
135 /// Defaults to true if not specified.
137 visible = std::move(_visible);
138 // See: https://github.com/rerun-io/rerun/issues/4027
139 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
140 }
141
142 /// How many columns this grid should have.
143 ///
144 /// If unset, the grid layout will be auto.
145 ///
146 /// Ignored for `components::ContainerKind::Horizontal`/`components::ContainerKind::Vertical` containers.
148 ) && {
149 grid_columns = std::move(_grid_columns);
150 // See: https://github.com/rerun-io/rerun/issues/4027
151 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
152 }
153 };
154
155} // namespace rerun::blueprint::archetypes
156
157namespace rerun {
158 /// \private
159 template <typename T>
160 struct AsComponents;
161
162 /// \private
163 template <>
164 struct AsComponents<blueprint::archetypes::ContainerBlueprint> {
165 /// Serialize all set component batches.
166 static Result<std::vector<ComponentBatch>> serialize(
168 );
169 };
170} // 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 description of a container.
Definition container_blueprint.hpp:27
std::optional< rerun::blueprint::components::Visible > visible
Whether this container is visible.
Definition container_blueprint.hpp:59
ContainerBlueprint with_display_name(rerun::components::Name _display_name) &&
The name of the container.
Definition container_blueprint.hpp:83
std::optional< Collection< rerun::blueprint::components::ColumnShare > > col_shares
The layout shares of each column in the container.
Definition container_blueprint.hpp:42
std::optional< rerun::blueprint::components::GridColumns > grid_columns
How many columns this grid should have.
Definition container_blueprint.hpp:66
ContainerBlueprint with_active_tab(rerun::blueprint::components::ActiveTab _active_tab) &&
Which tab is active.
Definition container_blueprint.hpp:127
std::optional< Collection< rerun::blueprint::components::RowShare > > row_shares
The layout shares of each row of the container.
Definition container_blueprint.hpp:49
ContainerBlueprint with_contents(Collection< rerun::blueprint::components::IncludedContent > _contents) &&
ContainerIds or ViewIds that are children of this container.
Definition container_blueprint.hpp:90
ContainerBlueprint with_grid_columns(rerun::blueprint::components::GridColumns _grid_columns) &&
How many columns this grid should have.
Definition container_blueprint.hpp:147
std::optional< Collection< rerun::blueprint::components::IncludedContent > > contents
ContainerIds or ViewIds that are children of this container.
Definition container_blueprint.hpp:35
ContainerBlueprint with_visible(rerun::blueprint::components::Visible _visible) &&
Whether this container is visible.
Definition container_blueprint.hpp:136
rerun::blueprint::components::ContainerKind container_kind
The class of the view.
Definition container_blueprint.hpp:29
ContainerBlueprint with_row_shares(Collection< rerun::blueprint::components::RowShare > _row_shares) &&
The layout shares of each row of the container.
Definition container_blueprint.hpp:116
std::optional< rerun::components::Name > display_name
The name of the container.
Definition container_blueprint.hpp:32
ContainerBlueprint with_col_shares(Collection< rerun::blueprint::components::ColumnShare > _col_shares) &&
The layout shares of each column in the container.
Definition container_blueprint.hpp:103
std::optional< rerun::blueprint::components::ActiveTab > active_tab
Which tab is active.
Definition container_blueprint.hpp:54
Component: The active tab in a tabbed container.
Definition active_tab.hpp:17
Component: How many columns a grid container should have.
Definition grid_columns.hpp:15
Component: Whether the container, view, entity or instance is currently visible.
Definition visible.hpp:15
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
Component: A display name, typically for an entity or a item like a plot series.
Definition name.hpp:17