Back to index

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

#include <nsGfxUtils.h>

List of all members.

Public Member Functions

 StTextStyleSetter (SInt16 fontID, SInt16 fontSize, SInt16 fontFace)
 StTextStyleSetter (TextStyle &theStyle)
 ~StTextStyleSetter ()

Protected Member Functions

void SetPortFontStyle (SInt16 fontID, SInt16 fontSize, SInt16 fontFace)

Protected Attributes

SInt16 mFontID
SInt16 mFontSize
SInt16 mFontFace

Detailed Description

Definition at line 262 of file nsGfxUtils.h.


Constructor & Destructor Documentation

StTextStyleSetter::StTextStyleSetter ( SInt16  fontID,
SInt16  fontSize,
SInt16  fontFace 
) [inline]

Definition at line 265 of file nsGfxUtils.h.

       {
         SetPortFontStyle(fontID, fontSize, fontFace);
       }

Here is the call graph for this function:

StTextStyleSetter::StTextStyleSetter ( TextStyle &  theStyle) [inline]

Definition at line 270 of file nsGfxUtils.h.

       {
         SetPortFontStyle(theStyle.tsFont, theStyle.tsSize, theStyle.tsFace);
       }

Here is the call graph for this function:

Definition at line 275 of file nsGfxUtils.h.

       {
       ::TextFont(mFontID);
       ::TextSize(mFontSize);
       ::TextFace(mFontFace);
       }

Member Function Documentation

void StTextStyleSetter::SetPortFontStyle ( SInt16  fontID,
SInt16  fontSize,
SInt16  fontFace 
) [inline, protected]

Definition at line 284 of file nsGfxUtils.h.

       {
         CGrafPtr curPort;
         ::GetPort((GrafPtr*)&curPort);
         
         NS_ASSERTION(ValidateDrawingState(), "Bad drawing state");

    mFontID = ::GetPortTextFont(curPort);
    mFontSize = ::GetPortTextSize(curPort);
    mFontFace = ::GetPortTextFace(curPort);
         
       ::TextFont(fontID);
       ::TextSize(fontSize);
       ::TextFace(fontFace);

       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

SInt16 StTextStyleSetter::mFontFace [protected]

Definition at line 304 of file nsGfxUtils.h.

SInt16 StTextStyleSetter::mFontID [protected]

Definition at line 302 of file nsGfxUtils.h.

SInt16 StTextStyleSetter::mFontSize [protected]

Definition at line 303 of file nsGfxUtils.h.


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