13 namespace visualization {
30 Margins(
int horiz_px,
int vert_px);
31 Margins(
int left_px,
int top_px,
int right_px,
int bottom_px);
49 const Constraints& constraints,
57 const std::vector<std::shared_ptr<Widget>>& children);
70 const Constraints& constraints)
const override;
107 std::unique_ptr<Impl> impl_;
114 static std::shared_ptr<Layout1D::Stretch>
MakeStretch();
122 const std::vector<std::shared_ptr<Widget>>& children);
161 std::unique_ptr<Impl> impl_;
173 const std::vector<std::shared_ptr<Widget>>& children);
180 std::unique_ptr<Impl> impl_;
187 static std::shared_ptr<Layout1D::Stretch>
MakeStretch();
188 static std::shared_ptr<Horiz>
MakeCentered(std::shared_ptr<Widget> w);
196 const std::vector<std::shared_ptr<Widget>>& children);
225 std::unique_ptr<Impl> impl_;
ImGuiContext * context
Definition: Window.cpp:76
FontId GetFontId() const
Definition: Layout.cpp:401
CollapsableVert(const char *text)
Definition: Layout.cpp:382
void SetFontId(FontId font_id)
Definition: Layout.cpp:403
virtual ~CollapsableVert()
Definition: Layout.cpp:395
bool GetIsOpen()
Returns true if open and false if collapsed.
Definition: Layout.cpp:399
void Layout(const LayoutContext &context) override
Definition: Layout.cpp:429
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: Layout.cpp:405
void SetIsOpen(bool is_open)
Definition: Layout.cpp:397
Widget::DrawResult Draw(const DrawContext &context) override
Definition: Layout.cpp:444
Lays out widgets horizontally.
Definition: Layout.h:184
static std::shared_ptr< Horiz > MakeCentered(std::shared_ptr< Widget > w)
Definition: Layout.cpp:533
int GetPreferredHeight() const
Definition: Layout.cpp:552
Horiz()
Definition: Layout.cpp:540
void SetPreferredHeight(int h)
Definition: Layout.cpp:553
static std::shared_ptr< Layout1D::Stretch > MakeStretch()
Definition: Layout.cpp:529
~Horiz()
Definition: Layout.cpp:550
static std::shared_ptr< Layout1D::Fixed > MakeFixed(int size)
Definition: Layout.cpp:525
Fixed(int size, Dir dir)
Definition: Layout.cpp:177
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: Layout.cpp:179
const Margins & GetMargins() const
Definition: Layout.cpp:206
int GetSpacing() const
Definition: Layout.cpp:205
Layout1D(Dir dir, int spacing, const Margins &margins, const std::vector< std::shared_ptr< Widget >> &children)
Definition: Layout.cpp:193
void SetMargins(const Margins &margins)
Definition: Layout.cpp:218
static void debug_PrintPreferredSizes(Layout1D *layout, const LayoutContext &context, const Constraints &constraints, int depth=0)
Definition: Layout.cpp:130
Margins & GetMutableMargins()
Definition: Layout.cpp:207
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: Layout.cpp:234
void AddStretch()
Definition: Layout.cpp:232
void SetSpacing(int spacing)
Definition: Layout.cpp:217
virtual ~Layout1D()
Definition: Layout.cpp:203
Dir
Definition: Layout.h:45
@ VERT
Definition: Layout.h:45
@ HORIZ
Definition: Layout.h:45
void Layout(const LayoutContext &context) override
Definition: Layout.cpp:258
std::vector< std::shared_ptr< Widget > > GetVisibleChildren() const
Definition: Layout.cpp:208
void SetMinorAxisPreferredSize(int size)
Definition: Layout.cpp:228
void AddFixed(int size)
Adds a fixed number of pixels after the previously added widget.
Definition: Layout.cpp:220
int GetMinorAxisPreferredSize() const
Definition: Layout.cpp:224
virtual ~VGrid()
Definition: Layout.cpp:572
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: Layout.cpp:580
VGrid(int num_cols, int spacing=0, const Margins &margins=Margins())
Definition: Layout.cpp:563
const Margins & GetMargins() const
Definition: Layout.cpp:575
void Layout(const LayoutContext &context) override
Definition: Layout.cpp:605
void SetPreferredWidth(int w)
Definition: Layout.cpp:578
int GetSpacing() const
Definition: Layout.cpp:574
int GetPreferredWidth() const
Definition: Layout.cpp:577
Lays out widgets vertically.
Definition: Layout.h:111
static std::shared_ptr< Layout1D::Stretch > MakeStretch()
Definition: Layout.cpp:355
Vert()
Definition: Layout.cpp:359
static std::shared_ptr< Layout1D::Fixed > MakeFixed(int size)
Definition: Layout.cpp:351
void SetPreferredWidth(int w)
Definition: Layout.cpp:372
int GetPreferredWidth() const
Definition: Layout.cpp:371
virtual ~Vert()
Definition: Layout.cpp:369
unsigned int FontId
Definition: Gui.h:68
Definition: PinholeCameraIntrinsic.cpp:16
Definition: Layout.cpp:375
Definition: Layout.cpp:123
int right
Definition: Layout.h:19
int bottom
Definition: Layout.h:20
int GetVert() const
Convenience function that returns top + bottom.
Definition: Layout.cpp:120
Margins()
Definition: Layout.cpp:111
int left
Definition: Layout.h:17
int top
Definition: Layout.h:18
int GetHoriz() const
Convenience function that returns left + right.
Definition: Layout.cpp:118
Definition: Layout.cpp:556