25#ifndef TGUI_BOX_LAYOUT_HPP
26#define TGUI_BOX_LAYOUT_HPP
28#include <TGUI/Widgets/Group.hpp>
29#include <TGUI/Renderers/BoxLayoutRenderer.hpp>
33TGUI_MODULE_EXPORT
namespace tgui
43 using Ptr = std::shared_ptr<BoxLayout>;
44 using ConstPtr = std::shared_ptr<const BoxLayout>;
53 BoxLayout(
const char* typeName,
bool initRenderer);
75 using Widget::setSize;
132 using Container::get;
159 virtual void updateWidgets() = 0;
164 float m_spaceBetweenWidgetsCached = 0;
Definition BoxLayoutRenderer.hpp:35
Abstract class for box layout containers.
Definition BoxLayout.hpp:40
BoxLayoutRenderer * getSharedRenderer() override
Returns the renderer, which gives access to functions that determine how the widget is displayed.
void add(const Widget::Ptr &widget, const String &widgetName="") override
Adds a widget at the end of the layout.
virtual void insert(std::size_t index, const Widget::Ptr &widget, const String &widgetName="")
Inserts a widget to the layout.
void rendererChanged(const String &property) override
Function called when one of the properties of the renderer is changed.
bool remove(const Widget::Ptr &widget) override
Removes a single widget that was added to the container.
Widget::Ptr get(std::size_t index) const
Returns the widget at the given index in the layout.
virtual bool remove(std::size_t index)
Removes a single widget that was added to the container.
std::shared_ptr< const BoxLayout > ConstPtr
Shared constant widget pointer.
Definition BoxLayout.hpp:44
std::shared_ptr< BoxLayout > Ptr
Shared widget pointer.
Definition BoxLayout.hpp:43
BoxLayoutRenderer * getRenderer() override
Returns the renderer, which gives access to functions that determine how the widget is displayed.
void setSize(const Layout2d &size) override
Changes the size of the group.
virtual bool setWidgetIndex(const Widget::Ptr &widget, std::size_t index) override
Changes the index of a widget in this container.
Group widget.
Definition Group.hpp:42
Class to store the position or size of a widget.
Definition Layout.hpp:323
Wrapper class to store strings.
Definition String.hpp:96
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38