Back to index

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

#include <nsStyleStruct.h>

Inheritance diagram for nsStyleFont:
Inheritance graph
[legend]
Collaboration diagram for nsStyleFont:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsStyleFont (void)
 nsStyleFont (const nsFont &aFont)
 nsStyleFont (const nsStyleFont &aStyleFont)
 nsStyleFont (nsPresContext *aPresContext)
 ~nsStyleFont (void)
nsChangeHint CalcDifference (const nsStyleFont &aOther) const
voidoperator new (size_t sz, nsPresContext *aContext) CPP_THROW_NEW
void Destroy (nsPresContext *aContext)

Static Public Member Functions

static nsChangeHint CalcFontDifference (const nsFont &aFont1, const nsFont &aFont2)
static nscoord ZoomText (nsPresContext *aPresContext, nscoord aSize)
static nscoord UnZoomText (nsPresContext *aPresContext, nscoord aSize)

Public Attributes

PRUint8 mFlags
nsFont mFont
nscoord mSize

Detailed Description

Definition at line 100 of file nsStyleStruct.h.


Constructor & Destructor Documentation

Definition at line 176 of file nsStyleStruct.cpp.

  : mFlags(NS_STYLE_FONT_DEFAULT),
    mFont(aFont),
    mSize(aFont.size)
{
}

Definition at line 183 of file nsStyleStruct.cpp.

  : mFlags(aSrc.mFlags),
    mFont(aSrc.mFont),
    mSize(aSrc.mSize)
{
}

Definition at line 191 of file nsStyleStruct.cpp.

Here is the call graph for this function:

Definition at line 105 of file nsStyleStruct.h.

{};

Here is the caller graph for this function:


Member Function Documentation

Definition at line 212 of file nsStyleStruct.cpp.

{
  if (mSize == aOther.mSize) {
    return CalcFontDifference(mFont, aOther.mFont);
  }
  return NS_STYLE_HINT_REFLOW;
}

Here is the call graph for this function:

nsChangeHint nsStyleFont::CalcFontDifference ( const nsFont aFont1,
const nsFont aFont2 
) [static]

Definition at line 240 of file nsStyleStruct.cpp.

{
  if ((aFont1.size == aFont2.size) && 
      (aFont1.sizeAdjust == aFont2.sizeAdjust) && 
      (aFont1.style == aFont2.style) &&
      (aFont1.variant == aFont2.variant) &&
      (aFont1.familyNameQuirks == aFont2.familyNameQuirks) &&
      (aFont1.weight == aFont2.weight) &&
      (aFont1.name == aFont2.name)) {
    if ((aFont1.decorations == aFont2.decorations)) {
      return NS_STYLE_HINT_NONE;
    }
    return NS_STYLE_HINT_VISUAL;
  }
  return NS_STYLE_HINT_REFLOW;
}

Here is the caller graph for this function:

Definition at line 207 of file nsStyleStruct.cpp.

                                            {
  this->~nsStyleFont();
  aContext->FreeToShell(sizeof(nsStyleFont), this);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void * nsStyleFont::operator new ( size_t  sz,
nsPresContext aContext 
)

Definition at line 199 of file nsStyleStruct.cpp.

                                                                          {
  void* result = aContext->AllocateFromShell(sz);
  if (result)
    memset(result, 0, sz);
  return result;
}

Here is the call graph for this function:

nscoord nsStyleFont::UnZoomText ( nsPresContext aPresContext,
nscoord  aSize 
) [static]

Definition at line 235 of file nsStyleStruct.cpp.

{
  return nscoord(float(aSize) / aPresContext->TextZoom());
}

Here is the call graph for this function:

nscoord nsStyleFont::ZoomText ( nsPresContext aPresContext,
nscoord  aSize 
) [static]

Definition at line 229 of file nsStyleStruct.cpp.

{
  return nscoord(float(aSize) * aPresContext->TextZoom());
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 121 of file nsStyleStruct.h.

Definition at line 122 of file nsStyleStruct.h.

Definition at line 123 of file nsStyleStruct.h.


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