Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsFind.cpp File Reference
#include "nsFind.h"
#include "nsContentCID.h"
#include "nsIEnumerator.h"
#include "nsITextContent.h"
#include "nsIDOMNode.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMDocumentRange.h"
#include "nsIDOMDocumentTraversal.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
#include "nsIPresShell.h"
#include "nsIFrame.h"
#include "nsITextControlFrame.h"
#include "nsIFormControl.h"
#include "nsIEditor.h"
#include "nsIPlaintextEditor.h"
#include "nsIDocument.h"
#include "nsTextFragment.h"
#include "nsString.h"
#include "nsIAtom.h"
#include "nsParserCIID.h"
#include "nsServiceManagerUtils.h"
#include "nsUnicharUtils.h"
#include "nsIDOMElement.h"
#include "nsCRT.h"

Go to the source code of this file.

Classes

class  nsFindContentIterator

Defines

#define CHAR_TO_UNICHAR(c)   ((PRUnichar)(const unsigned char)c)
#define NBSP_CHARCODE   (CHAR_TO_UNICHAR(160))
#define IsSpace(c)   (nsCRT::IsAsciiSpace(c) || (c) == NBSP_CHARCODE)
#define OVERFLOW_PINDEX   (mFindBackward ? pindex < 0 : pindex > patLen)
#define DONE_WITH_PINDEX   (mFindBackward ? pindex <= 0 : pindex >= patLen)
#define ALMOST_DONE_WITH_PINDEX   (mFindBackward ? pindex <= 0 : pindex >= patLen-1)

Functions

static NS_DEFINE_CID (kCContentIteratorCID, NS_CONTENTITERATOR_CID)
static NS_DEFINE_CID (kCPreContentIteratorCID, NS_PRECONTENTITERATOR_CID)
static NS_DEFINE_IID (kRangeCID, NS_RANGE_CID)
nsresult NS_NewFindContentIterator (PRBool aFindBackward, nsIContentIterator **aResult)

Define Documentation

#define ALMOST_DONE_WITH_PINDEX   (mFindBackward ? pindex <= 0 : pindex >= patLen-1)

Definition at line 924 of file nsFind.cpp.

#define CHAR_TO_UNICHAR (   c)    ((PRUnichar)(const unsigned char)c)

Definition at line 69 of file nsFind.cpp.

#define DONE_WITH_PINDEX   (mFindBackward ? pindex <= 0 : pindex >= patLen)

Definition at line 923 of file nsFind.cpp.

#define IsSpace (   c)    (nsCRT::IsAsciiSpace(c) || (c) == NBSP_CHARCODE)

Definition at line 921 of file nsFind.cpp.

Definition at line 920 of file nsFind.cpp.

#define OVERFLOW_PINDEX   (mFindBackward ? pindex < 0 : pindex > patLen)

Definition at line 922 of file nsFind.cpp.


Function Documentation

static NS_DEFINE_CID ( kCContentIteratorCID  ,
NS_CONTENTITERATOR_CID   
) [static]
static NS_DEFINE_CID ( kCPreContentIteratorCID  ,
NS_PRECONTENTITERATOR_CID   
) [static]
static NS_DEFINE_IID ( kRangeCID  ,
NS_RANGE_CID   
) [static]
nsresult NS_NewFindContentIterator ( PRBool  aFindBackward,
nsIContentIterator **  aResult 
)

Definition at line 432 of file nsFind.cpp.

{
  NS_ENSURE_ARG_POINTER(aResult);
  if (!aResult) {
    return NS_ERROR_NULL_POINTER;
  }

  nsFindContentIterator* it = new nsFindContentIterator(aFindBackward);
  if (!it) {
    return NS_ERROR_OUT_OF_MEMORY;
  }
  return it->QueryInterface(NS_GET_IID(nsIContentIterator), (void **)aResult);
}

Here is the caller graph for this function: