FifeGUI 0.2.0
A C++ GUI library designed for games.
barsection.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/barsection.hpp"
7
8namespace fcn
9{
11 {
12 // Set horizontal layout policy by default
13 setLayout(LayoutPolicy::Horizontal);
14 }
15
16 BarSection::~BarSection() = default;
17
19 {
20 mAlignment = alignment;
21 }
22
27
28 void BarSection::setExpand(bool expand)
29 {
30 mExpand = expand;
31 }
32
34 {
35 return mExpand;
36 }
37} // namespace fcn
void setExpand(bool expand)
Sets whether the section expands to fill available space.
BarSection()
Constructor.
Alignment getAlignment() const
Gets the alignment of children within the section.
bool mExpand
Whether the section expands to fill available space.
bool isExpand() const
Checks if the section expands to fill available space.
Alignment mAlignment
Alignment of children within the section.
Alignment
Alignment options for children within the section.
void setAlignment(Alignment alignment)
Sets the alignment of children within the section.
virtual void setLayout(LayoutPolicy policy)
Sets the layout of the container.
Used replacement tokens by configure_file():