Open3D (C++ API)  0.19.0
Loading...
Searching...
No Matches
Checkbox.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2024 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8#pragma once
9
10#include <functional>
11
13
14namespace open3d {
15namespace visualization {
16namespace gui {
17
18class Checkbox : public Widget {
19public:
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
35private:
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
void SetOnChecked(std::function< void(bool)> on_checked)
Definition Checkbox.cpp:45
DrawResult
Definition Widget.h:95
std::string name
Definition FilePCD.cpp:39
Definition PinholeCameraIntrinsic.cpp:16