Rerun C++ SDK
Loading...
Searching...
No Matches
plot_legend.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/plot_legend.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/corner2d.hpp"
7#include "../../blueprint/components/visible.hpp"
8#include "../../collection.hpp"
9#include "../../compiler_utils.hpp"
10#include "../../component_batch.hpp"
11#include "../../indicator_component.hpp"
12#include "../../result.hpp"
13
14#include <cstdint>
15#include <optional>
16#include <utility>
17#include <vector>
18
19namespace rerun::blueprint::archetypes {
20 /// **Archetype**: Configuration for the legend of a plot.
21 struct PlotLegend {
22 /// To what corner the legend is aligned.
23 ///
24 /// Defaults to the right bottom corner.
25 std::optional<rerun::blueprint::components::Corner2D> corner;
26
27 /// Whether the legend is shown at all.
28 ///
29 /// True by default.
30 std::optional<rerun::blueprint::components::Visible> visible;
31
32 public:
33 static constexpr const char IndicatorComponentName[] =
34 "rerun.blueprint.components.PlotLegendIndicator";
35
36 /// Indicator component, used to identify the archetype when converting to a list of components.
38
39 public:
40 PlotLegend() = default;
41 PlotLegend(PlotLegend&& other) = default;
42
43 /// To what corner the legend is aligned.
44 ///
45 /// Defaults to the right bottom corner.
46 PlotLegend with_corner(rerun::blueprint::components::Corner2D _corner) && {
47 corner = std::move(_corner);
48 // See: https://github.com/rerun-io/rerun/issues/4027
49 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
50 }
51
52 /// Whether the legend is shown at all.
53 ///
54 /// True by default.
56 visible = std::move(_visible);
57 // See: https://github.com/rerun-io/rerun/issues/4027
58 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
59 }
60 };
61
62} // namespace rerun::blueprint::archetypes
63
64namespace rerun {
65 /// \private
66 template <typename T>
67 struct AsComponents;
68
69 /// \private
70 template <>
71 struct AsComponents<blueprint::archetypes::PlotLegend> {
72 /// Serialize all set component batches.
73 static Result<std::vector<ComponentBatch>> serialize(
75 );
76 };
77} // namespace rerun
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: Configuration for the legend of a plot.
Definition plot_legend.hpp:21
PlotLegend with_visible(rerun::blueprint::components::Visible _visible) &&
Whether the legend is shown at all.
Definition plot_legend.hpp:55
PlotLegend with_corner(rerun::blueprint::components::Corner2D _corner) &&
To what corner the legend is aligned.
Definition plot_legend.hpp:46
std::optional< rerun::blueprint::components::Visible > visible
Whether the legend is shown at all.
Definition plot_legend.hpp:30
std::optional< rerun::blueprint::components::Corner2D > corner
To what corner the legend is aligned.
Definition plot_legend.hpp:25
Component: Whether the container, view, entity or instance is currently visible.
Definition visible.hpp:14
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30