Clapkit
Loading...
Searching...
No Matches
CKSize Struct Reference

Defines a rectangular area. More...

#include <ckTypes.h>

Public Member Functions

 CKSize (int w, int h)
 
 CKSize ()
 
Point ToOS () const
 
bool operator== (const CKSize &other) const
 
bool operator!= (const CKSize &other) const
 
void Subscribe (std::function< void()> cb)
 

Static Public Member Functions

static CKSize FromOS (Point p)
 

Public Attributes

CKProperty< int > width = 0
 
CKProperty< int > height = 0
 

Detailed Description

Defines a rectangular area.

Note
Use ToOS/FromOS to interact with native version(s) of this.

Constructor & Destructor Documentation

◆ CKSize() [1/2]

CKSize::CKSize ( int  w,
int  h 
)
inline

◆ CKSize() [2/2]

CKSize::CKSize ( )
inline

Member Function Documentation

◆ FromOS()

static CKSize CKSize::FromOS ( Point  p)
inlinestatic

Convert OS-rect to what we use.

◆ operator!=()

bool CKSize::operator!= ( const CKSize other) const
inline

◆ operator==()

bool CKSize::operator== ( const CKSize other) const
inline

◆ Subscribe()

void CKSize::Subscribe ( std::function< void()>  cb)
inline

For change tracking

◆ ToOS()

Point CKSize::ToOS ( ) const
inline

Member Data Documentation

◆ height

CKProperty<int> CKSize::height = 0

◆ width

CKProperty<int> CKSize::width = 0

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