15 namespace visualization {
32 Margins(
int horiz_px,
int vert_px);
33 Margins(
int left_px,
int top_px,
int right_px,
int bottom_px);
51 const Constraints& constraints,
59 const std::vector<std::shared_ptr<Widget>>& children);
72 const Constraints& constraints)
const override;
109 std::unique_ptr<Impl> impl_;
116 static std::shared_ptr<Layout1D::Stretch>
MakeStretch();
124 const std::vector<std::shared_ptr<Widget>>& children);
153 void SetText(
const char* text);
166 std::unique_ptr<Impl> impl_;
178 const std::vector<std::shared_ptr<Widget>>& children);
185 std::unique_ptr<Impl> impl_;
192 static std::shared_ptr<Layout1D::Stretch>
MakeStretch();
193 static std::shared_ptr<Horiz>
MakeCentered(std::shared_ptr<Widget> w);
201 const std::vector<std::shared_ptr<Widget>>& children);
230 std::unique_ptr<Impl> impl_;
ImGuiContext * context
Definition: Window.cpp:76
void SetText(const char *text)
Definition: Layout.cpp:398
FontId GetFontId() const
Definition: Layout.cpp:407
CollapsableVert(const char *text)
Definition: Layout.cpp:382
void SetFontId(FontId font_id)
Definition: Layout.cpp:409
virtual ~CollapsableVert()
Definition: Layout.cpp:392
bool GetIsOpen()
Returns true if open and false if collapsed.
Definition: Layout.cpp:396
void Layout(const LayoutContext &context) override
Definition: Layout.cpp:435
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: Layout.cpp:411
void SetIsOpen(bool is_open)
Definition: Layout.cpp:394
std::string GetText() const
Definition: Layout.cpp:405
Widget::DrawResult Draw(const DrawContext &context) override
Definition: Layout.cpp:450
Lays out widgets horizontally.
Definition: Layout.h:189
static std::shared_ptr< Horiz > MakeCentered(std::shared_ptr< Widget > w)
Definition: Layout.cpp:539
int GetPreferredHeight() const
Definition: Layout.cpp:558
Horiz()
Definition: Layout.cpp:546
void SetPreferredHeight(int h)
Definition: Layout.cpp:559
static std::shared_ptr< Layout1D::Stretch > MakeStretch()
Definition: Layout.cpp:535
~Horiz()
Definition: Layout.cpp:556
static std::shared_ptr< Layout1D::Fixed > MakeFixed(int size)
Definition: Layout.cpp:531
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:47
@ VERT
Definition: Layout.h:47
@ HORIZ
Definition: Layout.h:47
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:578
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition: Layout.cpp:586
VGrid(int num_cols, int spacing=0, const Margins &margins=Margins())
Definition: Layout.cpp:569
const Margins & GetMargins() const
Definition: Layout.cpp:581
void Layout(const LayoutContext &context) override
Definition: Layout.cpp:611
void SetPreferredWidth(int w)
Definition: Layout.cpp:584
int GetSpacing() const
Definition: Layout.cpp:580
int GetPreferredWidth() const
Definition: Layout.cpp:583
Lays out widgets vertically.
Definition: Layout.h:113
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:21
int bottom
Definition: Layout.h:22
int GetVert() const
Convenience function that returns top + bottom.
Definition: Layout.cpp:120
Margins()
Definition: Layout.cpp:111
int left
Definition: Layout.h:19
int top
Definition: Layout.h:20
int GetHoriz() const
Convenience function that returns left + right.
Definition: Layout.cpp:118
Definition: Layout.cpp:562