Back to index

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

#include <nsCounterManager.h>

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

List of all members.

Public Types

enum  Type { RESET, INCREMENT, USE }

Public Member Functions

 nsCounterUseNode (nsCSSValue::Array *aCounterStyle, nsIFrame *aPseudoFrame, PRUint32 aContentIndex, PRBool aAllCounters)
void Calc (nsCounterList *aList)
void GetText (nsString &aResult)
nsCounterUseNodeUseNode ()
nsCounterChangeNodeChangeNode ()

Public Attributes

nsRefPtr< nsCSSValue::ArraymCounterStyle
PRBool mAllCounters
Type mType
PRInt32 mValueAfter
nsCounterNodemScopeStart
nsCounterNodemScopePrev
nsIFrame *const mPseudoFrame
const PRInt32 mContentIndex
nsCOMPtr< nsIDOMCharacterDatamText

Detailed Description

Definition at line 105 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

nsCounterUseNode::nsCounterUseNode ( nsCSSValue::Array aCounterStyle,
nsIFrame aPseudoFrame,
PRUint32  aContentIndex,
PRBool  aAllCounters 
) [inline]

Definition at line 115 of file nsCounterManager.h.

        : nsCounterNode(aPseudoFrame, aContentIndex, USE)
        , mCounterStyle(aCounterStyle)
        , mAllCounters(aAllCounters)
    {
        NS_ASSERTION(aContentIndex >= 0, "out of range");
    }

Member Function Documentation

Reimplemented from nsCounterNode.

Definition at line 45 of file nsCounterManager.cpp.

{
    NS_ASSERTION(!aList->IsDirty(),
                 "Why are we calculating with a dirty list?");
    mValueAfter = aList->ValueBefore(this);
}

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:

Definition at line 68 of file nsCounterManager.cpp.

{
    aResult.Truncate();

    nsAutoVoidArray stack;
    stack.AppendElement(NS_STATIC_CAST(nsCounterNode*, this));

    if (mAllCounters && mScopeStart)
        for (nsCounterNode *n = mScopeStart; n->mScopePrev; n = n->mScopeStart)
            stack.AppendElement(n->mScopePrev);

    PRInt32 style = mCounterStyle->Item(mAllCounters ? 2 : 1).GetIntValue();
    const PRUnichar* separator;
    if (mAllCounters)
        separator = mCounterStyle->Item(1).GetStringBufferValue();

    for (PRInt32 i = stack.Count() - 1;; --i) {
        nsCounterNode *n = NS_STATIC_CAST(nsCounterNode*, stack[i]);
        nsBulletFrame::AppendCounterText(style, n->mValueAfter, aResult);
        if (i == 0)
            break;
        NS_ASSERTION(mAllCounters, "yikes, separator is uninitalized");
        aResult.Append(separator);
    }
}

Here is the call graph for this function:

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 112 of file nsCounterManager.h.

Definition at line 56 of file nsGenConList.h.

Definition at line 109 of file nsCounterManager.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: