![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <Layout.h>


Classes | |
| struct | Impl |
Public Member Functions | |
| CollapsableVert (const char *text) | |
| CollapsableVert (const char *text, int spacing, const Margins &margins=Margins()) | |
| virtual | ~CollapsableVert () |
| void | SetIsOpen (bool is_open) |
| bool | GetIsOpen () |
| Returns true if open and false if collapsed. More... | |
| void | SetText (const char *text) |
| std::string | GetText () const |
| FontId | GetFontId () const |
| void | SetFontId (FontId font_id) |
| Size | CalcPreferredSize (const LayoutContext &context, const Constraints &constraints) const override |
| void | Layout (const LayoutContext &context) override |
| Widget::DrawResult | Draw (const DrawContext &context) override |
Public Member Functions inherited from cloudViewer::visualization::gui::Vert | |
| Vert () | |
| Vert (int spacing, const Margins &margins=Margins()) | |
| Vert (int spacing, const Margins &margins, const std::vector< std::shared_ptr< Widget >> &children) | |
| virtual | ~Vert () |
| int | GetPreferredWidth () const |
| void | SetPreferredWidth (int w) |
Public Member Functions inherited from cloudViewer::visualization::gui::Layout1D | |
| Layout1D (Dir dir, int spacing, const Margins &margins, const std::vector< std::shared_ptr< Widget >> &children) | |
| virtual | ~Layout1D () |
| int | GetSpacing () const |
| const Margins & | GetMargins () const |
| void | SetSpacing (int spacing) |
| void | SetMargins (const Margins &margins) |
| void | AddFixed (int size) |
| Adds a fixed number of pixels after the previously added widget. More... | |
| void | AddStretch () |
Public Member Functions inherited from cloudViewer::visualization::gui::Widget | |
| Widget () | |
| Widget (const std::vector< std::shared_ptr< Widget >> &children) | |
| virtual | ~Widget () |
| virtual void | AddChild (std::shared_ptr< Widget > child) |
| virtual const std::vector< std::shared_ptr< Widget > > | GetChildren () const |
| virtual const Rect & | GetFrame () const |
| Returns the frame size in pixels. More... | |
| virtual void | SetFrame (const Rect &f) |
| virtual const Color & | GetBackgroundColor () const |
| virtual bool | IsDefaultBackgroundColor () const |
| virtual void | SetBackgroundColor (const Color &color) |
| virtual bool | IsVisible () const |
| virtual void | SetVisible (bool vis) |
| virtual bool | IsEnabled () const |
| virtual void | SetEnabled (bool enabled) |
| virtual void | SetTooltip (const char *text) |
| virtual const char * | GetTooltip () const |
| virtual Size | CalcMinimumSize (const LayoutContext &context) const |
| virtual EventResult | Mouse (const MouseEvent &e) |
| virtual EventResult | Key (const KeyEvent &e) |
| virtual DrawResult | Tick (const TickEvent &e) |
This is a vertical layout with a twisty + title that can be clicked on to expand or collapse the layout. Collapsing the layout will hide all the items and shrink the size of the layout to the height of the title.
| cloudViewer::visualization::gui::CollapsableVert::CollapsableVert | ( | const char * | text | ) |
Definition at line 374 of file Layout.cpp.
| cloudViewer::visualization::gui::CollapsableVert::CollapsableVert | ( | const char * | text, |
| int | spacing, | ||
| const Margins & | margins = Margins() |
||
| ) |
Definition at line 377 of file Layout.cpp.
References SetText().
|
virtual |
Definition at line 384 of file Layout.cpp.
|
overridevirtual |
Reimplemented from cloudViewer::visualization::gui::Layout1D.
Definition at line 403 of file Layout.cpp.
References cloudViewer::visualization::gui::Layout1D::CalcPreferredSize(), cloudViewer::utility::ceil(), context, cloudViewer::visualization::gui::Layout1D::GetMargins(), and max().
|
overridevirtual |
Draws the widget. If this is a Dear ImGUI widget, this is where the actual event processing happens. Return NONE if no action needs to be taken, REDRAW if the widget needs to be redrawn (e.g. its value changed), and RELAYOUT if the widget wishes to change size.
Reimplemented from cloudViewer::visualization::gui::Widget.
Definition at line 442 of file Layout.cpp.
References cloudViewer::visualization::gui::colorToImgui(), context, cloudViewer::visualization::gui::Widget::Draw(), frame, cloudViewer::visualization::gui::Widget::GetFrame(), cloudViewer::visualization::gui::Widget::NONE, cloudViewer::visualization::gui::Widget::RELAYOUT, and result.
| FontId cloudViewer::visualization::gui::CollapsableVert::GetFontId | ( | ) | const |
Definition at line 399 of file Layout.cpp.
Referenced by cloudViewer::visualization::gui::pybind_gui_classes().
| bool cloudViewer::visualization::gui::CollapsableVert::GetIsOpen | ( | ) |
Returns true if open and false if collapsed.
Definition at line 388 of file Layout.cpp.
Referenced by cloudViewer::visualization::gui::pybind_gui_classes().
| std::string cloudViewer::visualization::gui::CollapsableVert::GetText | ( | ) | const |
Definition at line 397 of file Layout.cpp.
Referenced by cloudViewer::visualization::gui::pybind_gui_classes().
|
overridevirtual |
Reimplemented from cloudViewer::visualization::gui::Layout1D.
Definition at line 427 of file Layout.cpp.
References cloudViewer::utility::ceil(), context, cloudViewer::visualization::gui::Layout1D::GetMutableMargins(), and cloudViewer::visualization::gui::Layout1D::Layout().
| void cloudViewer::visualization::gui::CollapsableVert::SetFontId | ( | FontId | font_id | ) |
Definition at line 401 of file Layout.cpp.
Referenced by cloudViewer::visualization::gui::pybind_gui_classes().
| void cloudViewer::visualization::gui::CollapsableVert::SetIsOpen | ( | bool | is_open | ) |
You will need to call Window::SetNeedsLayout() after this. (If you call this before the widnows is displayed everything will work out fine, as layout will automatically be called when the window is shown.)
Definition at line 386 of file Layout.cpp.
Referenced by cloudViewer::visualization::gui::pybind_gui_classes().
| void cloudViewer::visualization::gui::CollapsableVert::SetText | ( | const char * | text | ) |
Definition at line 390 of file Layout.cpp.
References patch::to_string().
Referenced by CollapsableVert(), and cloudViewer::visualization::gui::pybind_gui_classes().