Back to index

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

#include <celldata.h>

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

List of all members.

Public Member Functions

 BCCellData (nsTableCellFrame *aOrigCell)
 ~BCCellData ()
void Init (nsTableCellFrame *aCellFrame)
 Initialize the mOrigCell pointer.
PRBool IsOrig () const
 does a cell originate from here
PRBool IsDead () const
 is the celldata valid
PRBool IsSpan () const
 is the entry spanned by row- or a colspan
PRBool IsRowSpan () const
 is the entry spanned by rowspan
PRBool IsZeroRowSpan () const
 is the entry spanned by a zero rowspan zero rowspans span all cells starting from the originating cell down to the end of the rowgroup or a cell originating in the same column
void SetZeroRowSpan (PRBool aIsZero)
 mark the current entry as spanned by a zero rowspan
PRUint32 GetRowSpanOffset () const
 get the distance from the current entry to the corresponding origin of the rowspan
void SetRowSpanOffset (PRUint32 aSpan)
 set the distance from the current entry to the corresponding origin of the rowspan
PRBool IsColSpan () const
 is the entry spanned by colspan
PRBool IsZeroColSpan () const
 is the entry spanned by a zero colspan zero colspans span all cells starting from the originating cell towards the end of the colgroup or a cell originating in the same row or a rowspanned entry
void SetZeroColSpan (PRBool aIsZero)
 mark the current entry as spanned by a zero colspan
PRUint32 GetColSpanOffset () const
 get the distance from the current entry to the corresponding origin of the colspan
void SetColSpanOffset (PRUint32 aSpan)
 set the distance from the current entry to the corresponding origin of the colspan
PRBool IsOverlap () const
 is the entry spanned by a row- and a colspan
void SetOverlap (PRBool aOverlap)
 mark the current entry as spanned by a row- and a colspan
nsTableCellFrameGetCellFrame () const
 get the table cell frame for this entry

Public Attributes

BCData mData
PRInt32 mID

Protected Attributes

union {
nsTableCellFramemOrigCell
unsigned long mBits
}; 

Detailed Description

Definition at line 259 of file celldata.h.


Constructor & Destructor Documentation

Definition at line 64 of file nsCellMap.cpp.

Definition at line 70 of file nsCellMap.cpp.


Member Function Documentation

nsTableCellFrame * CellData::GetCellFrame ( ) const [inline, inherited]

get the table cell frame for this entry

Returns:
a pointer to the cellframe, this will be nsnull when the entry is only a spanned entry

Definition at line 280 of file celldata.h.

{
  if (SPAN != (SPAN & mBits)) {
    return mOrigCell;
  }
  return nsnull;
}

Here is the caller graph for this function:

PRUint32 CellData::GetColSpanOffset ( ) const [inline, inherited]

get the distance from the current entry to the corresponding origin of the colspan

Returns:
containing the distance in the row to the originating cell

Definition at line 374 of file celldata.h.

{
  if ((SPAN == (SPAN & mBits)) && ((COL_SPAN == (COL_SPAN & mBits)))) {
    return (PRUint32)((mBits & COL_SPAN_OFFSET) >> COL_SPAN_SHIFT);
  }
  return 0;
}

Here is the caller graph for this function:

PRUint32 CellData::GetRowSpanOffset ( ) const [inline, inherited]

get the distance from the current entry to the corresponding origin of the rowspan

Returns:
containing the distance in the column to the originating cell

Definition at line 333 of file celldata.h.

{
  if ((SPAN == (SPAN & mBits)) && ((ROW_SPAN == (ROW_SPAN & mBits)))) {
    return (PRUint32)((mBits & ROW_SPAN_OFFSET) >> ROW_SPAN_SHIFT);
  }
  return 0;
}

Here is the caller graph for this function:

void CellData::Init ( nsTableCellFrame aCellFrame) [inline, inherited]

Initialize the mOrigCell pointer.

Parameters:
aOrigCellthe table cell frame which will be stored in mOrigCell.

Definition at line 288 of file celldata.h.

{
  mOrigCell = aCellFrame;
}

Here is the caller graph for this function:

PRBool CellData::IsColSpan ( ) const [inline, inherited]

is the entry spanned by colspan

Returns:
is true if the entry is spanned by a colspan

Definition at line 349 of file celldata.h.

{
  return (SPAN     == (SPAN & mBits)) && 
         (COL_SPAN == (COL_SPAN & mBits));
}

Here is the caller graph for this function:

PRBool CellData::IsDead ( ) const [inline, inherited]

is the celldata valid

Returns:
is true if no cell originates and the cell is not spanned by a row- or colspan. mBits are 0 in this case and mOrigCell is nsnull

Definition at line 298 of file celldata.h.

{
  return (0 == mBits);
}

Here is the caller graph for this function:

PRBool CellData::IsOrig ( ) const [inline, inherited]

does a cell originate from here

Returns:
is true if a cell corresponds to this cellmap entry

Definition at line 293 of file celldata.h.

{
  return ((nsnull != mOrigCell) && (SPAN != (SPAN & mBits)));
}

Here is the caller graph for this function:

PRBool CellData::IsOverlap ( ) const [inline, inherited]

is the entry spanned by a row- and a colspan

Returns:
is true if the entry is spanned by a row- and a colspan

Definition at line 391 of file celldata.h.

{
  return (SPAN == (SPAN & mBits)) && (OVERLAP == (OVERLAP & mBits));
}

Here is the caller graph for this function:

PRBool CellData::IsRowSpan ( ) const [inline, inherited]

is the entry spanned by rowspan

Returns:
is true if the entry is spanned by a rowspan

Definition at line 308 of file celldata.h.

{
  return (SPAN     == (SPAN & mBits)) && 
         (ROW_SPAN == (ROW_SPAN & mBits));
}

Here is the caller graph for this function:

PRBool CellData::IsSpan ( ) const [inline, inherited]

is the entry spanned by row- or a colspan

Returns:
is true if the entry is spanned by a row- or colspan

Definition at line 303 of file celldata.h.

{
  return (SPAN == (SPAN & mBits));
}

Here is the caller graph for this function:

PRBool CellData::IsZeroColSpan ( ) const [inline, inherited]

is the entry spanned by a zero colspan zero colspans span all cells starting from the originating cell towards the end of the colgroup or a cell originating in the same row or a rowspanned entry

Returns:
is true if the entry is spanned by a zero colspan

Definition at line 355 of file celldata.h.

{
  return (SPAN       == (SPAN & mBits))     && 
         (COL_SPAN   == (COL_SPAN & mBits)) &&
         (COL_SPAN_0 == (COL_SPAN_0 & mBits));
}

Here is the caller graph for this function:

PRBool CellData::IsZeroRowSpan ( ) const [inline, inherited]

is the entry spanned by a zero rowspan zero rowspans span all cells starting from the originating cell down to the end of the rowgroup or a cell originating in the same column

Returns:
is true if the entry is spanned by a zero rowspan

Definition at line 314 of file celldata.h.

{
  return (SPAN       == (SPAN & mBits))     && 
         (ROW_SPAN   == (ROW_SPAN & mBits)) &&
         (ROW_SPAN_0 == (ROW_SPAN_0 & mBits));
}

Here is the caller graph for this function:

void CellData::SetColSpanOffset ( PRUint32  aSpan) [inline, inherited]

set the distance from the current entry to the corresponding origin of the colspan

Parameters:
thedistance in the column to the originating cell

Definition at line 382 of file celldata.h.

{
  mBits &= ~COL_SPAN_OFFSET;
  mBits |= (aSpan << COL_SPAN_SHIFT);

  mBits |= SPAN;
  mBits |= COL_SPAN;
}

Here is the caller graph for this function:

void CellData::SetOverlap ( PRBool  aOverlap) [inline, inherited]

mark the current entry as spanned by a row- and a colspan

Parameters:
aOverlapif true mark the entry as covered by a row- and a colspan

Definition at line 396 of file celldata.h.

{
  if (SPAN == (SPAN & mBits)) {
    if (aOverlap) {
      mBits |= OVERLAP;
    }
    else {
      mBits &= ~OVERLAP;
    }
  }
}

Here is the caller graph for this function:

void CellData::SetRowSpanOffset ( PRUint32  aSpan) [inline, inherited]

set the distance from the current entry to the corresponding origin of the rowspan

Parameters:
thedistance in the column to the originating cell

Definition at line 341 of file celldata.h.

{
  mBits &= ~ROW_SPAN_OFFSET;
  mBits |= (aSpan << ROW_SPAN_SHIFT);
  mBits |= SPAN;
  mBits |= ROW_SPAN;
}

Here is the caller graph for this function:

void CellData::SetZeroColSpan ( PRBool  aIsZero) [inline, inherited]

mark the current entry as spanned by a zero colspan

Parameters:
aIsZeroif true mark the entry as covered by a zero colspan

Definition at line 362 of file celldata.h.

{
  if (SPAN == (SPAN & mBits)) {
    if (aIsZeroSpan) {
      mBits |= COL_SPAN_0;
    }
    else {
      mBits &= ~COL_SPAN_0;
    }
  }
}

Here is the caller graph for this function:

void CellData::SetZeroRowSpan ( PRBool  aIsZero) [inline, inherited]

mark the current entry as spanned by a zero rowspan

Parameters:
aIsZeroif true mark the entry as covered by a zero rowspan

Definition at line 321 of file celldata.h.

{
  if (SPAN == (SPAN & mBits)) {
    if (aIsZeroSpan) {
      mBits |= ROW_SPAN_0;
    }
    else {
      mBits &= ~ROW_SPAN_0;
    }
  }
}

Here is the caller graph for this function:


Member Data Documentation

union { ... } [protected, inherited]

Definition at line 265 of file celldata.h.

PRInt32 CellData::mID [inherited]

Definition at line 46 of file CellMapTest.cpp.


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