Public Member Functions | |
int | bottom () const |
bool | inside (const Point &p) const |
int | left () const |
operator GuiRect () const | |
bool | operator!= (const Rect &r) const |
bool | operator== (const Rect &r) const |
Rect (const GuiRect &) | |
Rect (int x, int y, int w, int h) | |
Rect (const Point &p1, const Point &p2) | |
Rect (const Point &p, const Size &s) | |
Rect (const GuiSize &s) | |
Rect (const Size &s) | |
Rect () | |
int | right () const |
int | top () const |
Public Attributes | |
Point | position |
The position. | |
Size | size |
The size. |
ifm::Rect::Rect | ( | ) |
Default constructor, initializes size and position to 0.
ifm::Rect::Rect | ( | const GuiSize & | s | ) |
ifm::Rect::Rect | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) |
Constructs a Rect from a position and size defined by four integers.
x | X position | |
y | Y position | |
w | Width | |
h | Height |
ifm::Rect::Rect | ( | const GuiRect & | ) |
Allow implicit conversions for compatability with gui toolkits.
int ifm::Rect::bottom | ( | ) | const |
The bottom of the rect is equal to position.y + size.height - 1.
bool ifm::Rect::inside | ( | const Point & | p | ) | const |
int ifm::Rect::left | ( | ) | const |
The bottom of the rect is equal to position.x.
ifm::Rect::operator GuiRect | ( | ) | const |
Allow implicit conversions for compatability with gui toolkits.
bool ifm::Rect::operator!= | ( | const Rect & | r | ) | const |
bool ifm::Rect::operator== | ( | const Rect & | r | ) | const |
int ifm::Rect::right | ( | ) | const |
The bottom of the rect is equal to position.x + size.width - 1.
int ifm::Rect::top | ( | ) | const |
The bottom of the rect is equal to position.y.
The position.
The size.