libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
windowgeometry.h
Go to the documentation of this file.
1
22
23#ifndef WINDOWGEOMETRY_H
24#define WINDOWGEOMETRY_H
25
26#include <boost/json.hpp>
28
29namespace Nickvision::App
30{
35 {
36 public:
40 WindowGeometry() noexcept;
41 WindowGeometry(const WindowGeometry&) noexcept = default;
42 WindowGeometry(WindowGeometry&&) noexcept = default;
49 WindowGeometry(long width, long height, bool isMaximized) noexcept;
58 WindowGeometry(long width, long height, bool isMaximized, long x, long y) noexcept;
63 WindowGeometry(boost::json::object json) noexcept;
68 long getWidth() const noexcept;
73 void setWidth(long width) noexcept;
78 long getHeight() const noexcept;
83 void setHeight(long height) noexcept;
88 bool isMaximized() const noexcept;
93 void setIsMaximized(bool isMaximized) noexcept;
98 long getX() const noexcept;
103 void setX(long x) noexcept;
108 long getY() const noexcept;
113 void setY(long y) noexcept;
118 boost::json::value toJson() const noexcept override;
119 WindowGeometry& operator=(const WindowGeometry&) noexcept = default;
120 WindowGeometry& operator=(WindowGeometry&&) noexcept = default;
121
122 private:
123 long m_width;
124 long m_height;
125 bool m_isMaximized;
126 long m_x;
127 long m_y;
128 };
129}
130
131#endif //WINDOWGEOMETRY_H
void setWidth(long width) noexcept
Sets the width of the window.
bool isMaximized() const noexcept
Gets whether or not the window is maximized.
long getX() const noexcept
Gets the x position of the window.
void setX(long x) noexcept
Sets the x position of the window.
long getWidth() const noexcept
Gets the width of the window.
void setIsMaximized(bool isMaximized) noexcept
Sets whether or not the window is maximized.
long getY() const noexcept
Gets the y position of the window.
boost::json::value toJson() const noexcept override
Serializes the object to Json.
void setHeight(long height) noexcept
Sets the height of the window.
long getHeight() const noexcept
Gets the height of the window.
WindowGeometry() noexcept
Construct a WindowGeometry.
void setY(long y) noexcept
Sets the y position of the window.
An interface for objects serializable to Json.
Definition ijsonserializable.h:14
Definition appinfo.h:32