FifeGUI 0.2.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#include "fifechan/widget.hpp"
9
10namespace fcn
11{
12 class Graphics;
13
19 class FIFEGUI_API Spacer : public Widget
20 {
21 public:
25 Spacer();
26
27 ~Spacer() override;
28
29 Spacer(Spacer const &) = delete;
30 Spacer& operator=(Spacer const &) = delete;
31 Spacer(Spacer&&) = delete;
32 Spacer& operator=(Spacer&&) = delete;
33
34 // Inherited from Widget
35
37
38 void resizeToContent(bool recursion) override;
39
45 void draw(Graphics* graphics) override;
46 };
47}; // namespace fcn
48
49#endif // INCLUDE_FIFECHAN_WIDGETS_SPACER_HPP_
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(bool recursion) override
Resize this widget to fit its content.
Definition spacer.cpp:19
Spacer()
Initializes the spacer.
Definition spacer.cpp:11
Widget()
Constructor.
Definition widget.cpp:36
void resizeToContent()
Resizes the widget's size to fit the content exactly, calls recursively all childs.
Definition widget.hpp:1417