Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsTSDNotifier Class Reference

#include <nsTSDNotifier.h>

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

List of all members.

Public Member Functions

 nsTSDNotifier (nsTextServicesDocument *aDoc)
 The default constructor.
virtual ~nsTSDNotifier ()
 The default destructor.
NS_DECL_ISUPPORTS NS_IMETHOD WillInsertNode (nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition)
NS_IMETHOD DidInsertNode (nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult)
NS_IMETHOD WillDeleteNode (nsIDOMNode *aChild)
NS_IMETHOD DidDeleteNode (nsIDOMNode *aChild, nsresult aResult)
NS_IMETHOD WillSplitNode (nsIDOMNode *aExistingRightNode, PRInt32 aOffset)
NS_IMETHOD DidSplitNode (nsIDOMNode *aExistingRightNode, PRInt32 aOffset, nsIDOMNode *aNewLeftNode, nsresult aResult)
NS_IMETHOD WillJoinNodes (nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent)
NS_IMETHOD DidJoinNodes (nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent, nsresult aResult)
NS_IMETHOD WillCreateNode (const nsAString &aTag, nsIDOMNode *aParent, PRInt32 aPosition)
NS_IMETHOD DidCreateNode (const nsAString &aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult)
NS_IMETHOD WillInsertText (nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString)
NS_IMETHOD DidInsertText (nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString, nsresult aResult)
NS_IMETHOD WillDeleteText (nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength)
NS_IMETHOD DidDeleteText (nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength, nsresult aResult)
NS_IMETHOD WillDeleteSelection (nsISelection *aSelection)
NS_IMETHOD DidDeleteSelection (nsISelection *aSelection)
void WillCreateNode (in DOMString aTag, in nsIDOMNode aParent, in long aPosition)
 Called before the editor creates a node.
void DidCreateNode (in DOMString aTag, in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition, in nsresult aResult)
 Called after the editor creates a node.
void WillInsertNode (in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition)
 Called before the editor inserts a node.
void DidInsertNode (in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition, in nsresult aResult)
 Called after the editor inserts a node.
void WillDeleteNode (in nsIDOMNode aChild)
 Called before the editor deletes a node.
void DidDeleteNode (in nsIDOMNode aChild, in nsresult aResult)
 Called after the editor deletes a node.
void WillSplitNode (in nsIDOMNode aExistingRightNode, in long aOffset)
 Called before the editor splits a node.
void DidSplitNode (in nsIDOMNode aExistingRightNode, in long aOffset, in nsIDOMNode aNewLeftNode, in nsresult aResult)
 Called after the editor splits a node.
void WillJoinNodes (in nsIDOMNode aLeftNode, in nsIDOMNode aRightNode, in nsIDOMNode aParent)
 Called before the editor joins 2 nodes.
void DidJoinNodes (in nsIDOMNode aLeftNode, in nsIDOMNode aRightNode, in nsIDOMNode aParent, in nsresult aResult)
 Called after the editor joins 2 nodes.
void WillInsertText (in nsIDOMCharacterData aTextNode, in long aOffset, in DOMString aString)
 Called before the editor inserts text.
void DidInsertText (in nsIDOMCharacterData aTextNode, in long aOffset, in DOMString aString, in nsresult aResult)
 Called after the editor inserts text.
void WillDeleteText (in nsIDOMCharacterData aTextNode, in long aOffset, in long aLength)
 Called before the editor deletes text.
void DidDeleteText (in nsIDOMCharacterData aTextNode, in long aOffset, in long aLength, in nsresult aResult)
 Called before the editor deletes text.
void WillDeleteSelection (in nsISelection aSelection)
 Called before the editor deletes the selection.
void DidDeleteSelection (in nsISelection aSelection)
 Called after the editor deletes the selection.

Private Attributes

nsTextServicesDocumentmDoc

Detailed Description

Definition at line 46 of file nsTSDNotifier.h.


Constructor & Destructor Documentation

The default constructor.

Definition at line 43 of file nsTSDNotifier.cpp.

                                                         : mDoc(aDoc)
{
}

The default destructor.

Definition at line 47 of file nsTSDNotifier.cpp.

{
  mDoc = 0;
}

Member Function Documentation

void nsIEditActionListener::DidCreateNode ( in DOMString  aTag,
in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition,
in nsresult  aResult 
) [inherited]

Called after the editor creates a node.

Parameters:
aTagThe tag name of the DOM Node to create.
aNodeThe DOM Node that was created.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResultThe result of the create node operation.
NS_IMETHODIMP nsTSDNotifier::DidCreateNode ( const nsAString &  aTag,
nsIDOMNode aNode,
nsIDOMNode aParent,
PRInt32  aPosition,
nsresult  aResult 
)

Definition at line 177 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}

Definition at line 110 of file nsTSDNotifier.cpp.

{
  if (NS_FAILED(aResult))
    return NS_OK;

  if (!mDoc)
    return NS_ERROR_FAILURE;

  return mDoc->DeleteNode(aChild);
}

Here is the call graph for this function:

void nsIEditActionListener::DidDeleteNode ( in nsIDOMNode  aChild,
in nsresult  aResult 
) [inherited]

Called after the editor deletes a node.

Parameters:
aChildThe node to delete
aResultThe result of the delete node operation.

Definition at line 213 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}

Called after the editor deletes the selection.

Parameters:
aSelectionThe selection, after deletion

Here is the caller graph for this function:

NS_IMETHODIMP nsTSDNotifier::DidDeleteText ( nsIDOMCharacterData aTextNode,
PRInt32  aOffset,
PRInt32  aLength,
nsresult  aResult 
)

Definition at line 201 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}
void nsIEditActionListener::DidDeleteText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in long  aLength,
in nsresult  aResult 
) [inherited]

Called before the editor deletes text.

Parameters:
aTextNodeThis node getting text deleted
aOffsetThe offset in aTextNode to delete at.
aLengthThe amount of text to delete.
aResultThe result of the delete text operation.

Here is the caller graph for this function:

NS_IMETHODIMP nsTSDNotifier::DidInsertNode ( nsIDOMNode aNode,
nsIDOMNode aParent,
PRInt32  aPosition,
nsresult  aResult 
)

Definition at line 89 of file nsTSDNotifier.cpp.

{
  if (NS_FAILED(aResult))
    return NS_OK;

  if (!mDoc)
    return NS_ERROR_FAILURE;

  return mDoc->InsertNode(aNode, aParent, aPosition);
}

Here is the call graph for this function:

void nsIEditActionListener::DidInsertNode ( in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition,
in nsresult  aResult 
) [inherited]

Called after the editor inserts a node.

Parameters:
aNodeThe DOM Node to insert.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResultThe result of the insert node operation.
NS_IMETHODIMP nsTSDNotifier::DidInsertText ( nsIDOMCharacterData aTextNode,
PRInt32  aOffset,
const nsAString &  aString,
nsresult  aResult 
)

Definition at line 189 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}
void nsIEditActionListener::DidInsertText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in DOMString  aString,
in nsresult  aResult 
) [inherited]

Called after the editor inserts text.

Parameters:
aTextNodeThis node getting inserted text
aOffsetThe offset in aTextNode to insert at.
aStringThe string that gets inserted.
aResultThe result of the insert text operation.

Here is the caller graph for this function:

NS_IMETHODIMP nsTSDNotifier::DidJoinNodes ( nsIDOMNode aLeftNode,
nsIDOMNode aRightNode,
nsIDOMNode aParent,
nsresult  aResult 
)

Definition at line 152 of file nsTSDNotifier.cpp.

{
  if (NS_FAILED(aResult))
    return NS_OK;

  if (!mDoc)
    return NS_ERROR_FAILURE;

  return mDoc->JoinNodes(aLeftNode, aRightNode, aParent);
}

Here is the call graph for this function:

void nsIEditActionListener::DidJoinNodes ( in nsIDOMNode  aLeftNode,
in nsIDOMNode  aRightNode,
in nsIDOMNode  aParent,
in nsresult  aResult 
) [inherited]

Called after the editor joins 2 nodes.

Parameters:
aLeftNodeThis node will be merged into the right node
aRightNodeThe node that will be merged into. There is no requirement that the two nodes be of the same type.
aParentThe parent of aRightNode
aResultThe result of the join operation.
NS_IMETHODIMP nsTSDNotifier::DidSplitNode ( nsIDOMNode aExistingRightNode,
PRInt32  aOffset,
nsIDOMNode aNewLeftNode,
nsresult  aResult 
)

Definition at line 129 of file nsTSDNotifier.cpp.

{
  if (NS_FAILED(aResult))
    return NS_OK;

  if (!mDoc)
    return NS_ERROR_FAILURE;

  return mDoc->SplitNode(aExistingRightNode, aOffset, aNewLeftNode);
}

Here is the call graph for this function:

void nsIEditActionListener::DidSplitNode ( in nsIDOMNode  aExistingRightNode,
in long  aOffset,
in nsIDOMNode  aNewLeftNode,
in nsresult  aResult 
) [inherited]

Called after the editor splits a node.

Parameters:
aExistingRightNodethe node to split. It will become the new node's next sibling.
aOffsetthe offset of aExistingRightNode's content|children to do the split at
aNewLeftNode[OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.
void nsIEditActionListener::WillCreateNode ( in DOMString  aTag,
in nsIDOMNode  aParent,
in long  aPosition 
) [inherited]

Called before the editor creates a node.

Parameters:
aTagThe tag name of the DOM Node to create.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
NS_IMETHODIMP nsTSDNotifier::WillCreateNode ( const nsAString &  aTag,
nsIDOMNode aParent,
PRInt32  aPosition 
)

Definition at line 171 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}

Definition at line 104 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}

Called before the editor deletes a node.

Parameters:
aChildThe node to delete

Definition at line 207 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}

Called before the editor deletes the selection.

Parameters:
aSelectionThe selection to be deleted

Here is the caller graph for this function:

Definition at line 195 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}
void nsIEditActionListener::WillDeleteText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in long  aLength 
) [inherited]

Called before the editor deletes text.

Parameters:
aTextNodeThis node getting text deleted
aOffsetThe offset in aTextNode to delete at.
aLengthThe amount of text to delete.

Here is the caller graph for this function:

NS_IMETHODIMP nsTSDNotifier::WillInsertNode ( nsIDOMNode aNode,
nsIDOMNode aParent,
PRInt32  aPosition 
)

Definition at line 81 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}
void nsIEditActionListener::WillInsertNode ( in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition 
) [inherited]

Called before the editor inserts a node.

Parameters:
aNodeThe DOM Node to insert.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
NS_IMETHODIMP nsTSDNotifier::WillInsertText ( nsIDOMCharacterData aTextNode,
PRInt32  aOffset,
const nsAString &  aString 
)

Definition at line 183 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}
void nsIEditActionListener::WillInsertText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in DOMString  aString 
) [inherited]

Called before the editor inserts text.

Parameters:
aTextNodeThis node getting inserted text
aOffsetThe offset in aTextNode to insert at.
aStringThe string that gets inserted.

Here is the caller graph for this function:

NS_IMETHODIMP nsTSDNotifier::WillJoinNodes ( nsIDOMNode aLeftNode,
nsIDOMNode aRightNode,
nsIDOMNode aParent 
)

Definition at line 144 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}
void nsIEditActionListener::WillJoinNodes ( in nsIDOMNode  aLeftNode,
in nsIDOMNode  aRightNode,
in nsIDOMNode  aParent 
) [inherited]

Called before the editor joins 2 nodes.

Parameters:
aLeftNodeThis node will be merged into the right node
aRightNodeThe node that will be merged into. There is no requirement that the two nodes be of the same type.
aParentThe parent of aRightNode
NS_IMETHODIMP nsTSDNotifier::WillSplitNode ( nsIDOMNode aExistingRightNode,
PRInt32  aOffset 
)

Definition at line 122 of file nsTSDNotifier.cpp.

{
  return NS_OK;
}
void nsIEditActionListener::WillSplitNode ( in nsIDOMNode  aExistingRightNode,
in long  aOffset 
) [inherited]

Called before the editor splits a node.

Parameters:
aExistingRightNodethe node to split. It will become the new node's next sibling.
aOffsetthe offset of aExistingRightNode's content|children to do the split at
aNewLeftNode[OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.

Member Data Documentation

Definition at line 50 of file nsTSDNotifier.h.


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