libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::App::WindowGeometry Class Reference

A model of a window's geometry. More...

#include <windowgeometry.h>

Inheritance diagram for Nickvision::App::WindowGeometry:
Nickvision::Helpers::IJsonSerializable

Public Member Functions

 WindowGeometry () noexcept
 Construct a WindowGeometry.
 
 WindowGeometry (const WindowGeometry &) noexcept=default
 
 WindowGeometry (WindowGeometry &&) noexcept=default
 
 WindowGeometry (long width, long height, bool isMaximized) noexcept
 Construct a WindowGeometry.
 
 WindowGeometry (long width, long height, bool isMaximized, long x, long y) noexcept
 Construct a WindowGeometry.
 
 WindowGeometry (boost::json::object json) noexcept
 Constructs a WindowGeometry.
 
long getWidth () const noexcept
 Gets the width of the window.
 
void setWidth (long width) noexcept
 Sets the width of the window.
 
long getHeight () const noexcept
 Gets the height of the window.
 
void setHeight (long height) noexcept
 Sets the height of the window.
 
bool isMaximized () const noexcept
 Gets whether or not the window is maximized.
 
void setIsMaximized (bool isMaximized) noexcept
 Sets 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 getY () const noexcept
 Gets the y position of the window.
 
void setY (long y) noexcept
 Sets the y position of the window.
 
boost::json::value toJson () const noexcept override
 Serializes the object to Json.
 
WindowGeometryoperator= (const WindowGeometry &) noexcept=default
 
WindowGeometryoperator= (WindowGeometry &&) noexcept=default
 
- Public Member Functions inherited from Nickvision::Helpers::IJsonSerializable
virtual ~IJsonSerializable ()=default
 

Detailed Description

A model of a window's geometry.

Constructor & Destructor Documentation

◆ WindowGeometry() [1/6]

Nickvision::App::WindowGeometry::WindowGeometry ( )
noexcept

Construct a WindowGeometry.

◆ WindowGeometry() [2/6]

Nickvision::App::WindowGeometry::WindowGeometry ( const WindowGeometry & )
defaultnoexcept

◆ WindowGeometry() [3/6]

Nickvision::App::WindowGeometry::WindowGeometry ( WindowGeometry && )
defaultnoexcept

◆ WindowGeometry() [4/6]

Nickvision::App::WindowGeometry::WindowGeometry ( long width,
long height,
bool isMaximized )
noexcept

Construct a WindowGeometry.

Parameters
widthThe width of the window
heightThe height of the window
isMaximizedWhether or not the window is maximized

◆ WindowGeometry() [5/6]

Nickvision::App::WindowGeometry::WindowGeometry ( long width,
long height,
bool isMaximized,
long x,
long y )
noexcept

Construct a WindowGeometry.

Parameters
widthThe width of the window
heightThe height of the window
isMaximizedWhether or not the window is maximized
xThe x position of the window
yThe y position of the window

◆ WindowGeometry() [6/6]

Nickvision::App::WindowGeometry::WindowGeometry ( boost::json::object json)
noexcept

Constructs a WindowGeometry.

Parameters
jsonThe json object

Member Function Documentation

◆ getHeight()

long Nickvision::App::WindowGeometry::getHeight ( ) const
noexcept

Gets the height of the window.

Returns
The height of the window

◆ getWidth()

long Nickvision::App::WindowGeometry::getWidth ( ) const
noexcept

Gets the width of the window.

Returns
The width of the window

◆ getX()

long Nickvision::App::WindowGeometry::getX ( ) const
noexcept

Gets the x position of the window.

Returns
The x position of the window

◆ getY()

long Nickvision::App::WindowGeometry::getY ( ) const
noexcept

Gets the y position of the window.

Returns
The y position of the window

◆ isMaximized()

bool Nickvision::App::WindowGeometry::isMaximized ( ) const
noexcept

Gets whether or not the window is maximized.

Returns
True if maximized, else false

◆ operator=() [1/2]

WindowGeometry & Nickvision::App::WindowGeometry::operator= ( const WindowGeometry & )
defaultnoexcept

◆ operator=() [2/2]

WindowGeometry & Nickvision::App::WindowGeometry::operator= ( WindowGeometry && )
defaultnoexcept

◆ setHeight()

void Nickvision::App::WindowGeometry::setHeight ( long height)
noexcept

Sets the height of the window.

Parameters
heightThe new height of the window

◆ setIsMaximized()

void Nickvision::App::WindowGeometry::setIsMaximized ( bool isMaximized)
noexcept

Sets whether or not the window is maximized.

Parameters
isMaximizedTrue if maximized, else false

◆ setWidth()

void Nickvision::App::WindowGeometry::setWidth ( long width)
noexcept

Sets the width of the window.

Parameters
widthThe new width of the window

◆ setX()

void Nickvision::App::WindowGeometry::setX ( long x)
noexcept

Sets the x position of the window.

Parameters
xThe new x position of the window

◆ setY()

void Nickvision::App::WindowGeometry::setY ( long y)
noexcept

Sets the y position of the window.

Parameters
xThe new y position of the window

◆ toJson()

boost::json::value Nickvision::App::WindowGeometry::toJson ( ) const
overridevirtualnoexcept

Serializes the object to Json.

Returns
The Json representation of the object

Implements Nickvision::Helpers::IJsonSerializable.


The documentation for this class was generated from the following file: