|
Sparkle 0.0.1
|
Layout arranging elements in a grid by cell position. More...
#include <spk_grid_layout.hpp>


Public Member Functions | |
| void | addElement (const Vector2UInt &p_position, ResizableElement *p_element, const SizePolicy &p_sizePolicy) |
| Adds an element at a grid position. | |
| void | clear () |
| Removes all grid elements. | |
| void | setGeometry (const Extend2D &p_extend) override |
| Sets the layout geometry and positions elements. | |
| Public Member Functions inherited from spk::Layout | |
| void | setPadding (const spk::Vector2UInt &p_padding) |
| Sets layout padding between elements. | |
| const spk::Vector2UInt & | padding () const |
| Returns layout padding. | |
| void | clear () |
| Removes all elements from the layout. | |
| template<typename TExtra> | |
| void | addElement (ResizableElement *p_element, const SizePolicy &p_sizePolicy, TExtra &&p_extra) |
| Adds an element with extra layout data. | |
| void | addElement (ResizableElement *p_element, const SizePolicy &p_sizePolicy) |
| Adds an element with a size policy. | |
| Public Member Functions inherited from spk::ResizableElement | |
| SizeHint & | sizeHint () |
| Returns mutable size hint data. | |
| const SizeHint & | sizeHint () const |
| Returns const size hint data. | |
Additional Inherited Members | |
| Protected Types inherited from spk::Layout | |
| using | ElementContainer = std::vector<Element> |
| Container type used to store elements. | |
| Protected Member Functions inherited from spk::Layout | |
| const ElementContainer & | _elements () const |
| Returns the stored elements. | |
| Protected Attributes inherited from spk::Layout | |
| ElementContainer | _elementContainer |
| Stored layout elements. | |
Layout arranging elements in a grid by cell position.
|
inline |
Adds an element at a grid position.
| p_position | Grid cell coordinates. |
| p_element | Element pointer. |
| p_sizePolicy | Size policy to apply. |

|
inlineoverridevirtual |
Sets the layout geometry and positions elements.
| p_extend | Layout geometry. |
Implements spk::ResizableElement.
