FifeGUI 0.2.0
A C++ GUI library designed for games.
spacer.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause
2// SPDX-FileCopyrightText: 2004 - 2008 Olof Naessén and Per Larsson
3// SPDX-FileCopyrightText: 2013 - 2026 Fifengine contributors
4
5#include "fifechan/widgets/spacer.hpp"
6
7#include "fifechan/exception.hpp"
8
9namespace fcn
10{
12 {
15 }
16
17 Spacer::~Spacer() = default;
18
19 void Spacer::resizeToContent(bool recursion)
20 {
21 static_cast<void>(recursion);
23 }
24
25 void Spacer::draw(Graphics* graphics) { }
26}; // namespace fcn
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
Definition graphics.hpp:57
void draw(Graphics *graphics) override
Overrides this so that the spacer doesn't draw nothing.
Definition spacer.cpp:25
void resizeToContent()
Resizes the widget's size to fit the content exactly, calls recursively all childs.
Definition widget.hpp:1417
Spacer()
Initializes the spacer.
Definition spacer.cpp:11
int getWidth() const
Gets the width of the widget.
Definition widget.cpp:170
void setSize(int width, int height)
Sets the size of the widget.
Definition widget.cpp:855
void setHorizontalExpand(bool expand)
Sets the widget to horizontal expandable.
Definition widget.cpp:342
Size const & getMinSize() const
Gets the minimal dimension of the widget.
Definition widget.cpp:277
void setVerticalExpand(bool expand)
Sets the widget to vertical expandable.
Definition widget.cpp:332
int getHeight() const
Gets the height of the widget.
Definition widget.cpp:183