FifeGUI 0.3.0
A C++ GUI library designed for games.
spacer.hpp
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#ifndef INCLUDE_FIFECHAN_WIDGETS_SPACER_HPP_
6#define INCLUDE_FIFECHAN_WIDGETS_SPACER_HPP_
7
8// Project headers (subdirs before local)
9#include "fifechan/widget.hpp"
10
11namespace fcn
12{
13 class Graphics;
14
20 class FIFEGUI_API Spacer : public Widget
21 {
22 public:
26 Spacer();
27
28 ~Spacer() override;
29
30 Spacer(Spacer const &) = delete;
31 Spacer& operator=(Spacer const &) = delete;
32 Spacer(Spacer&&) = delete;
33 Spacer& operator=(Spacer&&) = delete;
34
35 // Inherited from Widget
36
38
39 void resizeToContent(bool recursion = true) override;
40
46 void draw(Graphics* graphics) override;
47 };
48}; // namespace fcn
49
50#endif // INCLUDE_FIFECHAN_WIDGETS_SPACER_HPP_
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
Widget()
Constructor.
Definition widget.cpp:52
virtual void resizeToContent(bool recursion=true)
Resizes the widget's size to fit the content exactly, calls recursively all childs.
Definition widget.hpp:1580
Used replacement tokens by configure_file():