FX::FXRectangle Class Reference

#include <FXRectangle.h>

List of all members.


Detailed Description

Rectangle.

Public Member Functions

 FXRectangle ()
 FXRectangle (FXshort xx, FXshort yy, FXshort ww, FXshort hh)
 FXRectangle (const FXPoint &p, const FXSize &s)
 FXRectangle (const FXPoint &topleft, const FXPoint &bottomright)
bool empty () const
bool operator! () const
bool operator== (const FXRectangle &r) const
bool operator!= (const FXRectangle &r) const
bool operator< (const FXRectangle &r) const
bool operator> (const FXRectangle &r) const
bool contains (const FXPoint &p) const
bool contains (FXshort xx, FXshort yy) const
bool contains (const FXRectangle &r) const
FXRectanglemove (const FXPoint &p)
FXRectanglemove (FXshort dx, FXshort dy)
FXRectanglegrow (FXshort margin)
FXRectanglegrow (FXshort hormargin, FXshort vermargin)
FXRectanglegrow (FXshort leftmargin, FXshort rightmargin, FXshort topmargin, FXshort bottommargin)
FXRectangleshrink (FXshort margin)
FXRectangleshrink (FXshort hormargin, FXshort vermargin)
FXRectangleshrink (FXshort leftmargin, FXshort rightmargin, FXshort topmargin, FXshort bottommargin)
FXPoint tl () const
FXPoint tr () const
FXPoint bl () const
FXPoint br () const
FXRectangleoperator= (const FXRectangle &r)
FXRectangleset (const FXRectangle &r)
FXRectangleset (const FXPoint &p, const FXSize &s)
FXRectangleset (const FXPoint &topleft, const FXPoint &bottomright)
FXRectangleset (FXshort xx, FXshort yy, FXshort ww, FXshort hh)
FXRectangleoperator+= (const FXRectangle &r)
FXRectangleoperator*= (const FXRectangle &r)
FXRectangle operator+ (const FXRectangle &r) const
FXRectangle operator* (const FXRectangle &r) const

Public Attributes

FXshort x
FXshort y
FXshort w
FXshort h

Friends

bool overlap (const FXRectangle &a, const FXRectangle &b)
FXAPI FXStreamoperator<< (FXStream &store, const FXRectangle &r)
FXAPI FXStreamoperator>> (FXStream &store, FXRectangle &r)

Constructor & Destructor Documentation

FX::FXRectangle::FXRectangle (  )  [inline]

Constructors.


Member Function Documentation

bool FX::FXRectangle::empty (  )  const [inline]

Test if empty.

bool FX::FXRectangle::operator! (  )  const [inline]

Test if zero.

bool FX::FXRectangle::operator== ( const FXRectangle r  )  const [inline]

Equality.

References h, w, x, and y.

bool FX::FXRectangle::operator< ( const FXRectangle r  )  const [inline]

Comparison.

References h, and w.

bool FX::FXRectangle::contains ( const FXPoint p  )  const [inline]

Point in rectangle.

References FX::FXPoint::x, and FX::FXPoint::y.

bool FX::FXRectangle::contains ( const FXRectangle r  )  const [inline]

Rectangle properly contained in rectangle.

References h, w, x, and y.

FXRectangle& FX::FXRectangle::move ( const FXPoint p  )  [inline]

Return moved rectangle.

References FX::FXPoint::x, and FX::FXPoint::y.

FXRectangle& FX::FXRectangle::grow ( FXshort  margin  ) 

Grow by amount.

FXRectangle& FX::FXRectangle::shrink ( FXshort  margin  ) 

Shrink by amount.

FXPoint FX::FXRectangle::tl (  )  const [inline]

Corners.

FXRectangle& FX::FXRectangle::operator= ( const FXRectangle r  )  [inline]

Assignment.

References h, w, x, and y.

FXRectangle& FX::FXRectangle::set ( const FXRectangle r  )  [inline]

Set value from another rectangle.

FXRectangle& FX::FXRectangle::set ( const FXPoint p,
const FXSize s 
) [inline]

Set from point and size.

FXRectangle& FX::FXRectangle::set ( const FXPoint topleft,
const FXPoint bottomright 
) [inline]

Set from corners.

FXRectangle& FX::FXRectangle::set ( FXshort  xx,
FXshort  yy,
FXshort  ww,
FXshort  hh 
) [inline]

Set value from components.

FXRectangle& FX::FXRectangle::operator+= ( const FXRectangle r  ) 

Union and intersection with rectangle.

FXRectangle FX::FXRectangle::operator+ ( const FXRectangle r  )  const

Union and intersection between rectangles.


Friends And Related Function Documentation

bool overlap ( const FXRectangle a,
const FXRectangle b 
) [friend]

Rectangles overlap.

FXAPI FXStream& operator<< ( FXStream store,
const FXRectangle r 
) [friend]

Save object to a stream.

FXAPI FXStream& operator>> ( FXStream store,
FXRectangle r 
) [friend]

Load object from a stream.


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:11:38 2008 for TnFOX by doxygen v1.5.6