Back to index

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

Reflow metrics used to return the frame's desired size and alignment information. More...

#include <nsHTMLReflowMetrics.h>

Collaboration diagram for nsHTMLReflowMetrics:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsHTMLReflowMetrics (PRBool aComputeMEW, PRUint32 aFlags=0)
void SetMEWToActualWidth (nsStyleUnit aWidthUnit)
 set the maxElementWidth to the desired width.
nsHTMLReflowMetricsoperator= (const nsHTMLReflowMetrics &aOther)

Public Attributes

nscoord width
nscoord height
nscoord ascent
nscoord descent
nscoord mMaxElementWidth
nscoord mMaximumWidth
nsCollapsingMargin mCarriedOutBottomMargin
nsRect mOverflowArea
PRUint32 mFlags
PRPackedBool mNothingChanged
PRPackedBool mComputeMEW

Detailed Description

Reflow metrics used to return the frame's desired size and alignment information.

See also:
#Reflow()

Definition at line 139 of file nsHTMLReflowMetrics.h.


Constructor & Destructor Documentation

nsHTMLReflowMetrics::nsHTMLReflowMetrics ( PRBool  aComputeMEW,
PRUint32  aFlags = 0 
) [inline]

Definition at line 181 of file nsHTMLReflowMetrics.h.

                                                               {
    mComputeMEW = aComputeMEW;
    mMaxElementWidth = 0;
    mMaximumWidth = 0;
    mFlags = aFlags;
    mOverflowArea.x = 0;
    mOverflowArea.y = 0;
    mOverflowArea.width = 0;
    mOverflowArea.height = 0;
    mNothingChanged = PR_FALSE;
#ifdef MOZ_MATHML
    mBoundingMetrics.Clear();
#endif

    // XXX These are OUT parameters and so they shouldn't have to be
    // initialized, but there are some bad frame classes that aren't
    // properly setting them when returning from Reflow()...
    width = height = 0;
    ascent = descent = 0;
  }

Member Function Documentation

nsHTMLReflowMetrics& nsHTMLReflowMetrics::operator= ( const nsHTMLReflowMetrics aOther) [inline]

Definition at line 216 of file nsHTMLReflowMetrics.h.

  {
    mMaxElementWidth = aOther.mMaxElementWidth;
    mMaximumWidth = aOther.mMaximumWidth;
    mFlags = aOther.mFlags;
    mCarriedOutBottomMargin = aOther.mCarriedOutBottomMargin;
    mOverflowArea.x = aOther.mOverflowArea.x;
    mOverflowArea.y = aOther.mOverflowArea.y;
    mOverflowArea.width = aOther.mOverflowArea.width;
    mOverflowArea.height = aOther.mOverflowArea.height;
    mNothingChanged = aOther.mNothingChanged;
#ifdef MOZ_MATHML
    mBoundingMetrics = aOther.mBoundingMetrics;
#endif

    width = aOther.width;
    height = aOther.height;
    ascent = aOther.ascent;
    descent = aOther.descent;
    return *this;
  }

set the maxElementWidth to the desired width.

If the frame has a percent width specification it can be shrinked to 0 if the containing frame shrinks so we need to report 0 otherwise the incr. reflow will fail

Parameters:
aWidthUnit- the width unit from the corresponding reflowstate

Definition at line 208 of file nsHTMLReflowMetrics.h.

                                                   {
    if (aWidthUnit != eStyleUnit_Percent) {
      mMaxElementWidth = width;
    } else {
      mMaxElementWidth = 0;
    }
  }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 141 of file nsHTMLReflowMetrics.h.

Definition at line 141 of file nsHTMLReflowMetrics.h.

Definition at line 140 of file nsHTMLReflowMetrics.h.

Definition at line 161 of file nsHTMLReflowMetrics.h.

Definition at line 179 of file nsHTMLReflowMetrics.h.

Definition at line 173 of file nsHTMLReflowMetrics.h.

Definition at line 143 of file nsHTMLReflowMetrics.h.

Definition at line 147 of file nsHTMLReflowMetrics.h.

Definition at line 176 of file nsHTMLReflowMetrics.h.

Definition at line 171 of file nsHTMLReflowMetrics.h.

Definition at line 140 of file nsHTMLReflowMetrics.h.


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