FifeGUI 0.3.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// Corresponding header include
6#include "fifechan/widgets/spacer.hpp"
7
8// Project headers (subdirs before local)
9#include "fifechan/exception.hpp"
10
11namespace fcn
12{
14 {
17 }
18
19 Spacer::~Spacer() = default;
20
21 void Spacer::resizeToContent(bool recursion)
22 {
23 static_cast<void>(recursion);
25 }
26
27 void Spacer::draw(Graphics* graphics)
28 {
29 }
30}; // namespace fcn
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
Definition graphics.hpp:58
void resizeToContent(bool recursion=true) override
Resizes the widget's size to fit the content exactly, calls recursively all childs.
Definition spacer.cpp:21
void draw(Graphics *graphics) override
Overrides this so that the spacer doesn't draw nothing.
Definition spacer.cpp:27
Spacer()
Initializes the spacer.
Definition spacer.cpp:13
int getWidth() const
Gets the width of the widget.
Definition widget.cpp:252
virtual void setSize(int width, int height)
Sets the size of the widget.
Definition widget.cpp:1065
void setHorizontalExpand(bool expand)
Sets the widget to horizontal expandable.
Definition widget.cpp:435
Size const & getMinSize() const
Gets the minimal dimension of the widget.
Definition widget.cpp:369
void setVerticalExpand(bool expand)
Sets the widget to vertical expandable.
Definition widget.cpp:425
int getHeight() const
Gets the height of the widget.
Definition widget.cpp:265
Used replacement tokens by configure_file():