ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
GuiWidgets.cpp
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 
9 
11 
12 namespace cloudViewer {
13 namespace visualization {
14 
15 SmallButton::SmallButton(const char *title) : gui::Button(title) {}
16 
18  const Constraints &constraints) const {
19  auto em = context.theme.font_size;
20  auto size = Super::CalcPreferredSize(context, constraints);
21  return gui::Size(size.width - em, int(std::round(1.2 * em)));
22 }
23 
25  SetToggleable(true);
26 }
27 
28 } // namespace visualization
29 } // namespace cloudViewer
int size
gui::Size CalcPreferredSize(const gui::LayoutContext &context, const Constraints &constraints) const override
Definition: GuiWidgets.cpp:17
ImGuiContext * context
Definition: Window.cpp:76
Generic file read and write utility for python interface.