Back to index

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

#include <nsGfxUtils.h>

List of all members.

Public Member Functions

 StPortSetter (CGrafPtr newPort)
 StPortSetter (WindowPtr window)
 ~StPortSetter ()

Protected Member Functions

void InitSetter (CGrafPtr newPort)

Protected Attributes

Boolean mPortChanged
CGrafPtr mOldPort
GDHandle mOldDevice

Detailed Description

Definition at line 152 of file nsGfxUtils.h.


Constructor & Destructor Documentation

StPortSetter::StPortSetter ( CGrafPtr  newPort) [inline]

Definition at line 155 of file nsGfxUtils.h.

       {
              InitSetter(newPort);
       }

Here is the call graph for this function:

StPortSetter::StPortSetter ( WindowPtr  window) [inline]

Definition at line 160 of file nsGfxUtils.h.

       {
              InitSetter(GetWindowPort(window));
       }

Here is the call graph for this function:

Definition at line 165 of file nsGfxUtils.h.

       {
         if (mPortChanged)
              ::SetGWorld(mOldPort, mOldDevice);
         NS_ASSERTION(ValidateDrawingState(), "Bad drawing state");
       }

Here is the call graph for this function:


Member Function Documentation

void StPortSetter::InitSetter ( CGrafPtr  newPort) [inline, protected]

Definition at line 173 of file nsGfxUtils.h.

       {
         NS_ASSERTION(ValidateDrawingState(), "Bad drawing state");
         // we assume that if the port has been set, then the port/GDevice are
         // valid, and do nothing (for speed)
         mPortChanged = (newPort != CGrafPtr(GetQDGlobalsThePort()));
         if (mPortChanged)
         {
              ::GetGWorld(&mOldPort, &mOldDevice);
              ::SetGWorld(newPort, ::IsPortOffscreen(newPort) ? nsnull : ::GetMainDevice());
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

GDHandle StPortSetter::mOldDevice [protected]

Definition at line 189 of file nsGfxUtils.h.

Definition at line 188 of file nsGfxUtils.h.

Definition at line 187 of file nsGfxUtils.h.


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