FifeGUI 0.2.0
A C++ GUI library designed for games.
primarypanel.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause
2// SPDX-FileCopyrightText: 2026 Fifengine contributors
3
4// Corresponding header include
5#include "fifechan/widgets/primarypanel.hpp"
6
7// Standard library includes
8#include <string>
9
10namespace fcn
11{
12 PrimaryPanel::PrimaryPanel(std::string const & title)
13 {
14 setTitle(title);
15 setWidth(mDefaultWidth);
16 }
17
19 {
20 mDefaultWidth = width;
21 }
22
24 {
25 return mDefaultWidth;
26 }
27} // namespace fcn
void setTitle(std::string const &title)
Sets the panel title.
Definition panel.cpp:68
int getDefaultWidth() const
Gets the default width of the panel.
PrimaryPanel(std::string const &title="Primary")
Constructor.
void setDefaultWidth(int width)
Sets the default width of the panel.
virtual void setWidth(int width)
Sets the width of the widget.
Definition widget.cpp:243
Used replacement tokens by configure_file():