Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Protected Member Functions | Private Attributes | Friends
nsTreeImageListener Class Reference

#include <nsTreeImageListener.h>

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

List of all members.

Classes

class  InvalidationArea

Public Member Functions

 nsTreeImageListener (nsITreeBoxObject *aTree)
 ~nsTreeImageListener ()
NS_DECL_ISUPPORTS
NS_DECL_IMGIDECODEROBSERVER
NS_DECL_IMGICONTAINEROBSERVER
NS_IMETHOD 
AddCell (PRInt32 aIndex, nsITreeColumn *aCol)
void onStartDecode (in imgIRequest aRequest)
 called as soon as the image begins getting decoded
void onStartContainer (in imgIRequest aRequest, in imgIContainer aContainer)
 called once the image has been inited and therefore has a width and height
void onStartFrame (in imgIRequest aRequest, in gfxIImageFrame aFrame)
 called when each frame is created
void onDataAvailable (in imgIRequest aRequest, in gfxIImageFrame aFrame,[const ] in nsIntRect aRect)
 called when some part of the frame has new data in it
void onStopFrame (in imgIRequest aRequest, in gfxIImageFrame aFrame)
 called when a frame is finished decoding
void onStopContainer (in imgIRequest aRequest, in imgIContainer aContainer)
 probably not needed.
void onStopDecode (in imgIRequest aRequest, in nsresult status, in wstring statusArg)
 called when the decoder is dying off
void frameChanged (in imgIContainer aContainer, in gfxIImageFrame aFrame, in nsIntRect aDirtyRect)

Protected Member Functions

void UnsuppressInvalidation ()
void Invalidate ()

Private Attributes

nsITreeBoxObjectmTree
PRBool mInvalidationSuppressed
InvalidationAreamInvalidationArea

Friends

class nsTreeBodyFrame

Detailed Description

Definition at line 64 of file nsTreeImageListener.h.


Constructor & Destructor Documentation

Definition at line 53 of file nsTreeImageListener.cpp.

{
  delete mInvalidationArea;
}

Member Function Documentation

Implements nsITreeImageListener.

Definition at line 114 of file nsTreeImageListener.cpp.

{
  if (!mInvalidationArea) {
    mInvalidationArea = new InvalidationArea(aCol);
    mInvalidationArea->AddRow(aIndex);
  }
  else {
    InvalidationArea* currArea;
    for (currArea = mInvalidationArea; currArea; currArea = currArea->GetNext()) {
      if (currArea->GetCol() == aCol) {
        currArea->AddRow(aIndex);
        break;
      }
    }
    if (!currArea) {
      currArea = new InvalidationArea(aCol);
      currArea->SetNext(mInvalidationArea);
      mInvalidationArea = currArea;
      mInvalidationArea->AddRow(aIndex);
    }
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void imgIContainerObserver::frameChanged ( in imgIContainer  aContainer,
in gfxIImageFrame  aFrame,
in nsIntRect  aDirtyRect 
) [inherited]

Definition at line 141 of file nsTreeImageListener.cpp.

{
  if (!mInvalidationSuppressed) {
    for (InvalidationArea* currArea = mInvalidationArea; currArea; currArea = currArea->GetNext()) {
      // Loop from min to max, invalidating each cell that was listening for this image.
      for (PRInt32 i = currArea->GetMin(); i <= currArea->GetMax(); ++i) {
        mTree->InvalidateCell(i, currArea->GetCol());
      }
    }
  }
}

Here is the call graph for this function:

void imgIDecoderObserver::onDataAvailable ( in imgIRequest  aRequest,
in gfxIImageFrame  aFrame,
[const ] in nsIntRect  aRect 
) [inherited]

called when some part of the frame has new data in it

void imgIDecoderObserver::onStartContainer ( in imgIRequest  aRequest,
in imgIContainer  aContainer 
) [inherited]

called once the image has been inited and therefore has a width and height

Here is the caller graph for this function:

called as soon as the image begins getting decoded

Here is the caller graph for this function:

void imgIDecoderObserver::onStartFrame ( in imgIRequest  aRequest,
in gfxIImageFrame  aFrame 
) [inherited]

called when each frame is created

void imgIDecoderObserver::onStopContainer ( in imgIRequest  aRequest,
in imgIContainer  aContainer 
) [inherited]

probably not needed.

called right before onStopDecode

Here is the caller graph for this function:

void imgIDecoderObserver::onStopDecode ( in imgIRequest  aRequest,
in nsresult  status,
in wstring  statusArg 
) [inherited]

called when the decoder is dying off

Here is the caller graph for this function:

void imgIDecoderObserver::onStopFrame ( in imgIRequest  aRequest,
in gfxIImageFrame  aFrame 
) [inherited]

called when a frame is finished decoding

Definition at line 79 of file nsTreeImageListener.h.

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class nsTreeBodyFrame [friend]

Definition at line 76 of file nsTreeImageListener.h.


Member Data Documentation

Definition at line 110 of file nsTreeImageListener.h.

Definition at line 86 of file nsTreeImageListener.h.

Definition at line 83 of file nsTreeImageListener.h.


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