FTXUI  5.0.0
C++ functional terminal UI.
Box Struct Reference

Public Member Functions

bool Contain (int x, int y) const
 
bool operator== (const Box &other) const
 
bool operator!= (const Box &other) const
 

Static Public Member Functions

static auto Intersection (Box a, Box b) -> Box
 
static auto Union (Box a, Box b) -> Box
 

Data Fields

int x_min = 0
 
int x_max = 0
 
int y_min = 0
 
int y_max = 0
 

Detailed Description

Definition at line 9 of file box.hpp.

Member Function Documentation

◆ Intersection()

Box Intersection ( Box  a,
Box  b 
) -> Box
static
Returns
the biggest Box contained in both |a| and |b|.

Definition at line 12 of file box.cpp.

◆ Union()

Box Union ( Box  a,
Box  b 
) -> Box
static
Returns
the smallest Box containing both |a| and |b|.

Definition at line 24 of file box.cpp.

◆ Contain()

bool Contain ( int  x,
int  y 
) const
Returns
whether (x,y) is contained inside the box.

Definition at line 35 of file box.cpp.

◆ operator==()

bool operator== ( const Box other) const
Returns
whether |other| is the same as |this|

Definition at line 44 of file box.cpp.

◆ operator!=()

bool operator!= ( const Box other) const
Returns
whether |other| and |this| are different.

Definition at line 51 of file box.cpp.

Field Documentation

◆ x_min

int x_min = 0

Definition at line 10 of file box.hpp.

◆ x_max

int x_max = 0

Definition at line 11 of file box.hpp.

◆ y_min

int y_min = 0

Definition at line 12 of file box.hpp.

◆ y_max

int y_max = 0

Definition at line 13 of file box.hpp.


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