Open3D (C++ API)  0.18.0
Checkbox.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <functional>
11 
13 
14 namespace open3d {
15 namespace visualization {
16 namespace gui {
17 
18 class Checkbox : public Widget {
19 public:
20  explicit Checkbox(const char* name);
21  ~Checkbox();
22 
23  bool IsChecked() const;
24  void SetChecked(bool checked);
25 
27  const Constraints& constraints) const override;
28 
29  DrawResult Draw(const DrawContext& context) override;
30 
33  void SetOnChecked(std::function<void(bool)> on_checked);
34 
35 private:
36  struct Impl;
37  std::unique_ptr<Impl> impl_;
38 };
39 
40 } // namespace gui
41 } // namespace visualization
42 } // namespace open3d
ImGuiContext * context
Definition: Window.cpp:76
Definition: Checkbox.h:18
bool IsChecked() const
Definition: Checkbox.cpp:41
DrawResult Draw(const DrawContext &context) override
Definition: Checkbox.cpp:61
~Checkbox()
Definition: Checkbox.cpp:39
void SetChecked(bool checked)
Definition: Checkbox.cpp:43
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: Checkbox.cpp:49
Checkbox(const char *name)
Definition: Checkbox.cpp:33
void SetOnChecked(std::function< void(bool)> on_checked)
Definition: Checkbox.cpp:45
Definition: Widget.h:49
DrawResult
Definition: Widget.h:95
std::string name
Definition: FilePCD.cpp:39
Definition: PinholeCameraIntrinsic.cpp:16