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

Defines a rectangular area at a specific location. More...

#include <ckTypes.h>

Public Member Functions

 CKRect (const CKRect &f)
 
 CKRect (CKPoint o, CKSize s)
 
 CKRect (int x, int y, int w, int h)
 
 CKRect (int w, int h)
 
 CKRect ()
 
Rect ToOS () const
 
Rect * ToOSCopy ()
 
bool IntersectsPoint (CKPoint p)
 
bool IntersectsRect (CKRect r)
 
bool operator== (const CKRect &other) const
 
bool operator!= (const CKRect &other) const
 
void Subscribe (std::function< void()> cb)
 

Static Public Member Functions

static CKRect FromOS (Rect r)
 

Public Attributes

CKProperty< CKPointorigin
 
CKProperty< CKSizesize
 

Detailed Description

Defines a rectangular area at a specific location.

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

Constructor & Destructor Documentation

◆ CKRect() [1/5]

CKRect::CKRect ( const CKRect f)
inline

◆ CKRect() [2/5]

CKRect::CKRect ( CKPoint  o,
CKSize  s 
)
inline

◆ CKRect() [3/5]

CKRect::CKRect ( int  x,
int  y,
int  w,
int  h 
)
inline

◆ CKRect() [4/5]

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

◆ CKRect() [5/5]

CKRect::CKRect ( )
inline

Member Function Documentation

◆ FromOS()

static CKRect CKRect::FromOS ( Rect  r)
inlinestatic

Convert OS-rect to what we use.

◆ IntersectsPoint()

bool CKRect::IntersectsPoint ( CKPoint  p)
inline

Is the CKPoint inside us?

◆ IntersectsRect()

bool CKRect::IntersectsRect ( CKRect  r)
inline

◆ operator!=()

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

◆ operator==()

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

◆ Subscribe()

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

For change tracking

◆ ToOS()

Rect CKRect::ToOS ( ) const
inline

Convert our Rect to what the OS expects.

◆ ToOSCopy()

Rect * CKRect::ToOSCopy ( )
inline

Same as ToOS but returns a Ptr.

Member Data Documentation

◆ origin

CKProperty<CKPoint> CKRect::origin

◆ size

CKProperty<CKSize> CKRect::size

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