Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsBoxSize Class Reference

#include <nsSprocketLayout.h>

Collaboration diagram for nsBoxSize:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsBoxSize ()
void Clear ()
void Add (const nsSize &minSize, const nsSize &prefSize, const nsSize &maxSize, nscoord ascent, nscoord flex, PRBool aIsHorizontal)
void Add (const nsMargin &aMargin, PRBool aIsHorizontal)
voidoperator new (size_t sz, nsBoxLayoutState &aState) CPP_THROW_NEW
void operator delete (void *aPtr, size_t sz)

Public Attributes

nscoord pref
nscoord min
nscoord max
nscoord ascent
nscoord flex
nscoord left
nscoord right
PRBool collapsed
PRBool bogus
nsBoxSizenext

Detailed Description

Definition at line 44 of file nsSprocketLayout.h.


Constructor & Destructor Documentation

Definition at line 1760 of file nsSprocketLayout.cpp.

{
  Clear();
}

Here is the call graph for this function:


Member Function Documentation

void nsBoxSize::Add ( const nsSize minSize,
const nsSize prefSize,
const nsSize maxSize,
nscoord  ascent,
nscoord  flex,
PRBool  aIsHorizontal 
)

Definition at line 1691 of file nsSprocketLayout.cpp.

{
  nscoord pref2;
  nscoord min2;
  nscoord max2;

  if (aIsHorizontal) {
    pref2 = prefSize.width;
    min2  = minSize.width;
    max2  = maxSize.width;
  } else {
    pref2 = prefSize.height;
    min2  = minSize.height;
    max2  = maxSize.height;
  }

  if (min2 > min)
    min = min2;

  if (pref2 > pref)
    pref = pref2;

  if (max2 < max)
    max = max2;

  flex = aFlex;

  if (!aIsHorizontal) {
    if (aAscent > ascent)
      ascent = aAscent;
    }
}
void nsBoxSize::Add ( const nsMargin aMargin,
PRBool  aIsHorizontal 
)

Definition at line 1730 of file nsSprocketLayout.cpp.

{
  if (aIsHorizontal) {
    left  += aMargin.left;
    right += aMargin.right;
    pref -= (aMargin.left + aMargin.right);
  } else {
    left  += aMargin.top;
    right += aMargin.bottom;
    pref -= (aMargin.top + aMargin.bottom);
  }

  if (pref < min)
     min = pref;
}

Definition at line 1766 of file nsSprocketLayout.cpp.

{
  pref = 0;
  min = 0;
  max = NS_INTRINSICSIZE;
  collapsed = PR_FALSE;
  ascent = 0;
  left = 0;
  right = 0;
  flex = 0;
  next = nsnull;
  bogus = PR_FALSE;
}

Here is the caller graph for this function:

void nsBoxSize::operator delete ( void aPtr,
size_t  sz 
)

Definition at line 1791 of file nsSprocketLayout.cpp.

{
}
void * nsBoxSize::operator new ( size_t  sz,
nsBoxLayoutState aState 
)

Definition at line 1782 of file nsSprocketLayout.cpp.

{
   void* mem = 0;
   aState.AllocateStackMemory(sz,&mem);
   return mem;
}

Member Data Documentation

Definition at line 53 of file nsSprocketLayout.h.

Definition at line 58 of file nsSprocketLayout.h.

Definition at line 57 of file nsSprocketLayout.h.

Definition at line 54 of file nsSprocketLayout.h.

Definition at line 55 of file nsSprocketLayout.h.

Definition at line 52 of file nsSprocketLayout.h.

Definition at line 51 of file nsSprocketLayout.h.

Definition at line 60 of file nsSprocketLayout.h.

Definition at line 50 of file nsSprocketLayout.h.

Definition at line 56 of file nsSprocketLayout.h.


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