ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
StackedWidget.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
11 
12 namespace cloudViewer {
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 cloudViewer
void Layout(const LayoutContext &context) override
int GetSelectedIndex() const
Returns the index of the selected child.
Widget::DrawResult Draw(const DrawContext &context) override
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
void SetSelectedIndex(int index)
Sets the index of the child to draw.
ImGuiContext * context
Definition: Window.cpp:76
Generic file read and write utility for python interface.