FifeGUI 0.2.0
A C++ GUI library designed for games.
barsection.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause
2// SPDX-FileCopyrightText: 2026 Fifengine contributors
3
4#ifndef INCLUDE_FIFECHAN_WIDGETS_BARSECTION_HPP_
5#define INCLUDE_FIFECHAN_WIDGETS_BARSECTION_HPP_
6
7// Platform config include
8#include "fifechan/platform.hpp"
9
10// Project headers (subdirs before local)
11#include "fifechan/widgets/container.hpp"
12
13namespace fcn
14{
26 class FIFEGUI_API BarSection : public Container
27 {
28 public:
36 enum class Alignment : uint8_t
37 {
38 Start = 0,
39 Center,
40 End
41 };
42
48 BarSection();
49
50 ~BarSection() override;
51
52 BarSection(BarSection const &) = delete;
53 BarSection& operator=(BarSection const &) = delete;
54 BarSection(BarSection&&) = delete;
55 BarSection& operator=(BarSection&&) = delete;
56
63 void setAlignment(Alignment alignment);
64
71 Alignment getAlignment() const;
72
79 void setExpand(bool expand);
80
87 bool isExpand() const;
88
89 protected:
93 Alignment mAlignment{Alignment::Start};
94
98 bool mExpand{false};
99 };
100} // namespace fcn
101
102#endif // INCLUDE_FIFECHAN_WIDGETS_BARSECTION_HPP_
A container section for use within HorizontalBar or VerticalBar widgets.
BarSection()
Constructor.
bool mExpand
Whether the section expands to fill available space.
Alignment mAlignment
Alignment of children within the section.
Alignment
Alignment options for children within the section.
Container()
Constructor.
Used replacement tokens by configure_file():