26#ifndef TGUI_BOX_LAYOUT_HPP
27#define TGUI_BOX_LAYOUT_HPP
29#include <TGUI/Widgets/Group.hpp>
30#include <TGUI/Renderers/BoxLayoutRenderer.hpp>
34TGUI_MODULE_EXPORT
namespace tgui
44 using Ptr = std::shared_ptr<BoxLayout>;
45 using ConstPtr = std::shared_ptr<const BoxLayout>;
55 BoxLayout(
const char* typeName,
bool initRenderer);
80 using Widget::setSize;
147 using Container::get;
178 virtual void updateWidgets() = 0;
184 float m_spaceBetweenWidgetsCached = 0;
Definition BoxLayoutRenderer.hpp:37
Abstract class for box layout containers.
Definition BoxLayout.hpp:41
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.
virtual bool remove(std::size_t index)
Removes a single widget that was added to the container.
TGUI_NODISCARD Widget::Ptr get(std::size_t index) const
Returns the widget at the given index in the layout.
TGUI_NODISCARD BoxLayoutRenderer * getRenderer() override
Returns the renderer, which gives access to functions that determine how the widget is displayed.
std::shared_ptr< const BoxLayout > ConstPtr
Shared constant widget pointer.
Definition BoxLayout.hpp:45
std::shared_ptr< BoxLayout > Ptr
Shared widget pointer.
Definition BoxLayout.hpp:44
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.
TGUI_NODISCARD BoxLayoutRenderer * getSharedRenderer() override
Returns the renderer, which gives access to functions that determine how the widget is displayed.
Group widget.
Definition Group.hpp:44
Class to store the position or size of a widget.
Definition Layout.hpp:289
Wrapper class to store strings.
Definition String.hpp:101
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39