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

Defines a point on the screen. More...

#include <ckTypes.h>

Public Member Functions

 CKPoint (int x, int y)
 
 CKPoint ()
 
Point ToOS () const
 
Point * ToOSPtr ()
 
bool operator== (const CKPoint &other) const
 
bool operator!= (const CKPoint &other) const
 
void Subscribe (std::function< void()> cb)
 

Static Public Member Functions

static CKPoint FromOS (Point p)
 

Public Attributes

CKProperty< int > x = 0
 
CKProperty< int > y = 0
 

Detailed Description

Defines a point on the screen.

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

Constructor & Destructor Documentation

◆ CKPoint() [1/2]

CKPoint::CKPoint ( int  x,
int  y 
)
inline

◆ CKPoint() [2/2]

CKPoint::CKPoint ( )
inline

Member Function Documentation

◆ FromOS()

static CKPoint CKPoint::FromOS ( Point  p)
inlinestatic

Convert OS-rect to what we use.

◆ operator!=()

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

◆ operator==()

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

◆ Subscribe()

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

For change tracking

◆ ToOS()

Point CKPoint::ToOS ( ) const
inline

Convert our Rect to what the OS expects.

◆ ToOSPtr()

Point * CKPoint::ToOSPtr ( )
inline

Convert our Rect to what the OS expects.

Member Data Documentation

◆ x

CKProperty<int> CKPoint::x = 0

◆ y

CKProperty<int> CKPoint::y = 0

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