Open3D (C++ API)  0.18.0+6e910d9
StackedWidget.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 
11 
12 namespace open3d {
13 namespace visualization {
14 namespace gui {
15 
18 class StackedWidget : public Widget {
19  using Super = Widget;
20 
21 public:
22  StackedWidget();
23  virtual ~StackedWidget();
24 
26  void SetSelectedIndex(int index);
28  int GetSelectedIndex() const;
29 
31  const Constraints& constraints) const override;
32 
33  void Layout(const LayoutContext& context) override;
34 
35  Widget::DrawResult Draw(const DrawContext& context) override;
36 
37 private:
38  struct Impl;
39  std::unique_ptr<Impl> impl_;
40 };
41 
42 } // namespace gui
43 } // namespace visualization
44 } // namespace open3d
ImGuiContext * context
Definition: Window.cpp:76
Definition: StackedWidget.h:18
virtual ~StackedWidget()
Definition: StackedWidget.cpp:22
void Layout(const LayoutContext &context) override
Definition: StackedWidget.cpp:41
Widget::DrawResult Draw(const DrawContext &context) override
Definition: StackedWidget.cpp:50
void SetSelectedIndex(int index)
Sets the index of the child to draw.
Definition: StackedWidget.cpp:24
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: StackedWidget.cpp:30
StackedWidget()
Definition: StackedWidget.cpp:20
int GetSelectedIndex() const
Returns the index of the selected child.
Definition: StackedWidget.cpp:28
Definition: Widget.h:49
Widget()
Definition: Widget.cpp:34
DrawResult
Definition: Widget.h:95
Definition: PinholeCameraIntrinsic.cpp:16
Definition: StackedWidget.cpp:16