ifm::Rect Class Reference

List of all members.


Detailed Description

Gui toolkit independant representation of rect.

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.

Constructor & Destructor Documentation

ifm::Rect::Rect (  ) 

Default constructor, initializes size and position to 0.

ifm::Rect::Rect ( const Size s  ) 

Constructs a Rect with a position of (0,0) and the given size.

ifm::Rect::Rect ( const GuiSize &  s  ) 

Allows implicit conversions from Size to Rect with a position of (0,0) for gui toolkit compatability.

ifm::Rect::Rect ( const Point p,
const Size s 
)

Constructs a Rect from a position and a size.

Parameters:
p Position
s Size

ifm::Rect::Rect ( const Point p1,
const Point p2 
)

ifm::Rect::Rect ( int  x,
int  y,
int  w,
int  h 
)

Constructs a Rect from a position and size defined by four integers.

Parameters:
x X position
y Y position
w Width
h Height

ifm::Rect::Rect ( const GuiRect &   ) 

Allow implicit conversions for compatability with gui toolkits.


Member Function Documentation

int ifm::Rect::bottom (  )  const

The bottom of the rect is equal to position.y + size.height - 1.

Returns:
The bottom coordinate of the rect

bool ifm::Rect::inside ( const Point p  )  const

Returns:
True if the given Point is inside of this Rect

int ifm::Rect::left (  )  const

The bottom of the rect is equal to position.x.

Returns:
The top coordinate of the rect

ifm::Rect::operator GuiRect (  )  const

Allow implicit conversions for compatability with gui toolkits.

bool ifm::Rect::operator!= ( const Rect r  )  const

Returns:
True if this rect is not equal to the given rect.

bool ifm::Rect::operator== ( const Rect r  )  const

Returns:
True if this rect is equal to the rect r.

int ifm::Rect::right (  )  const

The bottom of the rect is equal to position.x + size.width - 1.

Returns:
The bottom coordinate of the rect

int ifm::Rect::top (  )  const

The bottom of the rect is equal to position.y.

Returns:
The top coordinate of the rect


Member Data Documentation

The position.

The size.


doxygen Get IFM - Interface Management System at SourceForge.net. Fast, secure and Free Open Source software downloads