FifeGUI 0.3.0
A C++ GUI library designed for games.
size.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_SIZE_HPP_
6#define INCLUDE_FIFECHAN_SIZE_HPP_
7
8// Standard library includes
9
10// Platform config include
11#include "fifechan/platform.hpp"
12
13namespace fcn
14{
20 class FIFEGUI_API Size
21 {
22 public:
29 explicit Size(int width = 0, int height = 0);
30
34 ~Size() = default;
35
39 Size(Size const &) = default;
40
44 Size& operator=(Size const &) = default;
45
49 Size(Size&&) = default;
50
54 Size& operator=(Size&&) = default;
55
59 int getWidth() const;
60
64 int getHeight() const;
65
71 void setWidth(int width);
72
78 void setHeight(int height);
79
80 private:
81 // width of the size
82 int mWidth = 0;
83 // height of the size
84 int mHeight = 0;
85 };
86}; // namespace fcn
87
88#endif // INCLUDE_FIFECHAN_SIZE_HPP_
Size(Size &&)=default
Move constructor.
void setHeight(int height)
Sets the height of size.
Definition size.cpp:29
Size(int width=0, int height=0)
Constructor initializes size values.
Definition size.cpp:10
Size(Size const &)=default
Copy constructor.
void setWidth(int width)
Sets the width of size.
Definition size.cpp:24
int getHeight() const
Definition size.cpp:19
int getWidth() const
Definition size.cpp:14
Size & operator=(Size &&)=default
Move assignment operator.
~Size()=default
Destructor.
Size & operator=(Size const &)=default
Copy assignment operator.
Used replacement tokens by configure_file():