FifeGUI 0.2.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#include "fifechan/platform.hpp"
9
10namespace fcn
11{
17 class FIFEGUI_API Size
18 {
19 public:
26 explicit Size(int width = 0, int height = 0);
27
28 ~Size() = default;
29
31 Size(Size const &) = default;
33 Size& operator=(Size const &) = default;
35 Size(Size&&) = default;
37 Size& operator=(Size&&) = default;
38
42 int getWidth() const;
43
47 int getHeight() const;
48
54 void setWidth(int width);
55
61 void setHeight(int height);
62
63 private:
64 // width of the size
65 int mWidth = 0;
66 // height of the size
67 int mHeight = 0;
68 };
69}; // namespace fcn
70
71#endif // INCLUDE_FIFECHAN_SIZE_HPP_
Size(Size &&)=default
Move constructor.
void setHeight(int height)
Sets the height of size.
Definition size.cpp:26
Size(int width=0, int height=0)
Constructor initializes size values.
Definition size.cpp:9
Size(Size const &)=default
Copy constructor.
void setWidth(int width)
Sets the width of size.
Definition size.cpp:21
int getHeight() const
Definition size.cpp:16
int getWidth() const
Definition size.cpp:11
Size & operator=(Size &&)=default
Move assignment operator.
Size & operator=(Size const &)=default
Copy assignment operator.