Back to index

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

#include <nsTableFrame.h>

Collaboration diagram for nsTableIterator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsTableIterator (nsIFrame &aSource, nsTableIteration aType)
 nsTableIterator (nsFrameList &aSource, nsTableIteration aType)
nsIFrameFirst ()
nsIFrameNext ()
PRBool IsLeftToRight ()
PRInt32 Count ()

Protected Member Functions

void Init (nsIFrame *aFirstChild, nsTableIteration aType)

Protected Attributes

PRBool mLeftToRight
nsIFramemFirstListChild
nsIFramemFirstChild
nsIFramemCurrentChild
PRInt32 mCount

Detailed Description

Definition at line 1099 of file nsTableFrame.h.


Constructor & Destructor Documentation

Definition at line 4482 of file nsTableFrame.cpp.

{
  nsIFrame* firstChild = aSource.GetFirstChild(nsnull);
  Init(firstChild, aType);
}

Here is the call graph for this function:

Definition at line 4489 of file nsTableFrame.cpp.

{
  nsIFrame* firstChild = aSource.FirstChild();
  Init(firstChild, aType);
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 4564 of file nsTableFrame.cpp.

{
  if (-1 == mCount) {
    mCount = 0;
    nsIFrame* child = mFirstListChild;
    while (nsnull != child) {
      mCount++;
      child = child->GetNextSibling();
    }
  }
  return mCount;
}

Here is the call graph for this function:

Definition at line 4531 of file nsTableFrame.cpp.

Here is the caller graph for this function:

void nsTableIterator::Init ( nsIFrame aFirstChild,
nsTableIteration  aType 
) [protected]

Definition at line 4496 of file nsTableFrame.cpp.

{
  mFirstListChild = aFirstChild;
  mFirstChild     = aFirstChild;
  mCurrentChild   = nsnull;
  mLeftToRight    = (eTableRTL == aType) ? PR_FALSE : PR_TRUE; 
  mCount          = -1;

  if (!mFirstChild) {
    return;
  }
  if (eTableDIR == aType) {
    nsTableFrame* table = nsnull;
    nsresult rv = nsTableFrame::GetTableFrame(mFirstChild, table);
    if (NS_SUCCEEDED(rv) && (table != nsnull)) {
      mLeftToRight = (NS_STYLE_DIRECTION_LTR ==
                      table->GetStyleVisibility()->mDirection);
    }
    else {
      NS_ASSERTION(PR_FALSE, "source of table iterator is not part of a table");
      return;
    }
  }
  if (!mLeftToRight) {
    mCount = 0;
    nsIFrame* nextChild = mFirstChild->GetNextSibling();
    while (nsnull != nextChild) {
      mCount++;
      mFirstChild = nextChild;
      nextChild = nextChild->GetNextSibling();
    }
  } 
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 4559 of file nsTableFrame.cpp.

{
  return mLeftToRight;
}

Here is the caller graph for this function:

Definition at line 4537 of file nsTableFrame.cpp.

{
  if (!mCurrentChild) {
    return nsnull;
  }

  if (mLeftToRight) {
    mCurrentChild = mCurrentChild->GetNextSibling();
    return mCurrentChild;
  }
  else {
    nsIFrame* targetChild = mCurrentChild;
    mCurrentChild = nsnull;
    nsIFrame* child = mFirstListChild;
    while (child && (child != targetChild)) {
      mCurrentChild = child;
      child = child->GetNextSibling();
    }
    return mCurrentChild;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 1118 of file nsTableFrame.h.

Definition at line 1117 of file nsTableFrame.h.

Definition at line 1116 of file nsTableFrame.h.

Definition at line 1115 of file nsTableFrame.h.

Definition at line 1114 of file nsTableFrame.h.


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