Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes
nsCounterChangeNode Struct Reference

#include <nsCounterManager.h>

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

List of all members.

Public Types

enum  Type { RESET, INCREMENT, USE }

Public Member Functions

 nsCounterChangeNode (nsIFrame *aPseudoFrame, nsCounterNode::Type aChangeType, PRInt32 aChangeValue, PRInt32 aPropIndex)
void Calc (nsCounterList *aList)
nsCounterUseNodeUseNode ()
nsCounterChangeNodeChangeNode ()

Public Attributes

PRInt32 mChangeValue
Type mType
PRInt32 mValueAfter
nsCounterNodemScopeStart
nsCounterNodemScopePrev
nsIFrame *const mPseudoFrame
const PRInt32 mContentIndex
nsCOMPtr< nsIDOMCharacterDatamText

Detailed Description

Definition at line 132 of file nsCounterManager.h.


Member Enumeration Documentation

enum nsCounterNode::Type [inherited]
Enumerator:
RESET 
INCREMENT 
USE 

Definition at line 50 of file nsCounterManager.h.

              {
        RESET,     // a "counter number" pair in 'counter-reset'
        INCREMENT, // a "counter number" pair in 'counter-increment'
        USE        // counter() or counters() in 'content'
    };

Constructor & Destructor Documentation

nsCounterChangeNode::nsCounterChangeNode ( nsIFrame aPseudoFrame,
nsCounterNode::Type  aChangeType,
PRInt32  aChangeValue,
PRInt32  aPropIndex 
) [inline]

Definition at line 140 of file nsCounterManager.h.

        : nsCounterNode(aPseudoFrame,
                        // Fake a content index for resets and increments
                        // that comes before all the real content, with
                        // the resets first, in order, and then the increments.
                        aPropIndex + (aChangeType == RESET
                                        ? (PR_INT32_MIN) 
                                        : (PR_INT32_MIN / 2)),
                        aChangeType)
        , mChangeValue(aChangeValue)
    {
        NS_ASSERTION(aPropIndex >= 0, "out of range");
        NS_ASSERTION(aChangeType == INCREMENT || aChangeType == RESET,
                     "bad type");
    }

Member Function Documentation

Reimplemented from nsCounterNode.

Definition at line 54 of file nsCounterManager.cpp.

{
    NS_ASSERTION(!aList->IsDirty(),
                 "Why are we calculating with a dirty list?");
    if (mType == RESET) {
        mValueAfter = mChangeValue;
    } else {
        NS_ASSERTION(mType == INCREMENT, "invalid type");
        mValueAfter = aList->ValueBefore(this) + mChangeValue;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 170 of file nsCounterManager.h.

{
    NS_ASSERTION(mType == INCREMENT || mType == RESET, "wrong type");
    return NS_STATIC_CAST(nsCounterChangeNode*, this);
}

Here is the caller graph for this function:

nsCounterUseNode * nsCounterNode::UseNode ( ) [inline, inherited]

Definition at line 164 of file nsCounterManager.h.

{
    NS_ASSERTION(mType == USE, "wrong type");
    return NS_STATIC_CAST(nsCounterUseNode*, this);
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 133 of file nsCounterManager.h.

Definition at line 56 of file nsGenConList.h.

Definition at line 51 of file nsGenConList.h.

Definition at line 81 of file nsCounterManager.h.

Definition at line 70 of file nsCounterManager.h.

Definition at line 60 of file nsGenConList.h.

Definition at line 56 of file nsCounterManager.h.

Definition at line 59 of file nsCounterManager.h.


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