| Methods Index |
Subclasses: None
CBounds is a utility class representing an integer rectangle. In contrast to CRect, CBounds uses integer coordinates, which are more suitable for some applications, such as table-cell addressing. CBounds uses long for its coordinate representation so that it can support large coordinate spaces.
CBounds does not require that Bottom be greater than or equal to Top, nor that Right be greater than or equal to Left. Any rectangle is considered empty if Bottom is less than or equal to Top or if Right is less than or equal to Left.
|
|
|
long
|
itsTop;
|
long
|
itsLeft;
|
long
|
itsBottom;
|
long
|
itsRight;
|
CBounds(); CBounds(
long theTop, long theLeft,
long theBottom, long theRight);
long Top() const; long Left() const; long Bottom() const; long Right() const; void Top(long theTop); void Left(long theLeft); void Bottom(long theBottom); void Right(long theRight);
long Height() const;
Right to be Left + Width.
long Width() const;
Bottom to be Top + Height.
CCell TopLeft() const; CCell TopRight() const; CCell BottomLeft() const; CCell BottomRight() const;
CAttachmentFrame.
BOOLEAN Contains(const CCell& theBounds) const;
theBounds. Edges may be equal. For example, a CBounds contains itself.
BOOLEAN IsEqual(const CBounds& theBounds) const; int operator==(const CBounds& theBounds) const;
BOOLEAN IsEmpty() const;
Bottom <= Top or Right <= Left.
CBounds Intersection(const CBounds& theBounds) const;
Right/Bottom and maximum of Top/Left.
CBounds Union(const CBounds& theBounds) const;
Right/Bottom and minimum of Top/Left.
CBounds Union(const CCell& theCell) const;
CBounds to include theCell.
const CBounds& operator+=(const CCell& theCell);
CBounds to the right by theCell.H() and down by theCell.V().
const CBounds& operator-=(const CCell& theCell);
CBounds left by theCell.H() and up by theCell.V().