Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes
nsBandTrapezoid Struct Reference

Information about a particular trapezoid within a band. More...

#include <nsSpaceManager.h>

List of all members.

Public Types

enum  State { Available, Occupied, OccupiedMultiple }

Public Member Functions

nscoord GetHeight () const
void GetRect (nsRect &aRect) const
void operator= (const nsRect &aRect)
PRBool Equals (const nsBandTrapezoid &aTrap) const
PRBool EqualGeometry (const nsBandTrapezoid &aTrap) const
 nsBandTrapezoid ()

Public Attributes

nscoord mTopY
nscoord mBottomY
nscoord mTopLeftX
nscoord mBottomLeftX
nscoord mTopRightX
nscoord mBottomRightX
State mState
union nsBandTrapezoid.__unnamed__ 

Detailed Description

Information about a particular trapezoid within a band.

The space described by the trapezoid is in one of three states:

Definition at line 65 of file nsSpaceManager.h.


Member Enumeration Documentation

Enumerator:
Available 
Occupied 
OccupiedMultiple 

Definition at line 66 of file nsSpaceManager.h.


Constructor & Destructor Documentation

Definition at line 92 of file nsSpaceManager.h.

    : mTopY(0),
      mBottomY(0),
      mTopLeftX(0),
      mBottomLeftX(0),
      mTopRightX(0),
      mBottomRightX(0),
      mFrame(nsnull)
  {
  }

Member Function Documentation

Definition at line 137 of file nsSpaceManager.h.

{
  return (
    mTopLeftX == aTrap.mTopLeftX &&
    mBottomLeftX == aTrap.mBottomLeftX &&
    mTopRightX == aTrap.mTopRightX &&
    mBottomRightX == aTrap.mBottomRightX &&
    mTopY == aTrap.mTopY &&
    mBottomY == aTrap.mBottomY
  );
}
PRBool nsBandTrapezoid::Equals ( const nsBandTrapezoid aTrap) const [inline]

Definition at line 123 of file nsSpaceManager.h.

{
  return (
    mTopLeftX == aTrap.mTopLeftX &&
    mBottomLeftX == aTrap.mBottomLeftX &&
    mTopRightX == aTrap.mTopRightX &&
    mBottomRightX == aTrap.mBottomRightX &&
    mTopY == aTrap.mTopY &&
    mBottomY == aTrap.mBottomY &&
    mState == aTrap.mState &&
    mFrame == aTrap.mFrame    
  );
}
nscoord nsBandTrapezoid::GetHeight ( ) const [inline]

Definition at line 78 of file nsSpaceManager.h.

{return mBottomY - mTopY;}
void nsBandTrapezoid::GetRect ( nsRect aRect) const [inline]

Definition at line 104 of file nsSpaceManager.h.

{
  aRect.x = PR_MIN(mTopLeftX, mBottomLeftX);
  aRect.y = mTopY;
  aRect.width = PR_MAX(mTopRightX, mBottomRightX);
  if (NS_MAXSIZE != aRect.width) {
    aRect.width -= aRect.x;
  }
  aRect.height = (NS_MAXSIZE == mBottomY) ? NS_MAXSIZE : mBottomY - mTopY;
}

Here is the caller graph for this function:

void nsBandTrapezoid::operator= ( const nsRect aRect) [inline]

Definition at line 115 of file nsSpaceManager.h.

{
  mTopLeftX = mBottomLeftX = aRect.x;
  mTopRightX = mBottomRightX = aRect.XMost();
  mTopY = aRect.y;
  mBottomY = aRect.YMost();
}

Member Data Documentation

union { ... }

Definition at line 69 of file nsSpaceManager.h.

Definition at line 70 of file nsSpaceManager.h.

Definition at line 68 of file nsSpaceManager.h.

Definition at line 71 of file nsSpaceManager.h.

Definition at line 69 of file nsSpaceManager.h.

Definition at line 70 of file nsSpaceManager.h.

Definition at line 68 of file nsSpaceManager.h.


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