mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
Removing files which are redundant with the idl files. r=brade, sr=kin
This commit is contained in:
parent
b2618d9ca4
commit
402bfeea35
@ -1,54 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef nsICiter_h__
|
||||
#define nsICiter_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsString;
|
||||
|
||||
#define NS_ICITER_IID \
|
||||
{ /* a6cf9102-15b3-11d2-932e-00805f8add32 */ \
|
||||
0xa6cf9102, 0x15b3, 0x11d2, \
|
||||
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
|
||||
|
||||
/** Handle plaintext citations, as in mail quoting.
|
||||
* Used by the editor but not dependant on it.
|
||||
*/
|
||||
class nsICiter : public nsISupports
|
||||
{
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ICITER_IID; return iid; }
|
||||
|
||||
NS_IMETHOD GetCiteString(const nsString& aInString, nsString& aOutString) = 0;
|
||||
|
||||
NS_IMETHOD StripCites(const nsString& aInString, nsString& aOutString) = 0;
|
||||
|
||||
NS_IMETHOD Rewrap(const nsString& aInString,
|
||||
PRUint32 aWrapCol, PRUint32 aFirstLineOffset,
|
||||
PRBool aRespectNewlines,
|
||||
nsString& aOutString) = 0;
|
||||
};
|
||||
|
||||
#endif //nsICiter_h__
|
||||
|
@ -1,227 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef nsIEditActionListener_h__
|
||||
#define nsIEditActionListener_h__
|
||||
#include "nsISupports.h"
|
||||
#include "nscore.h"
|
||||
|
||||
class nsIDOMNode;
|
||||
class nsString;
|
||||
class nsIDOMCharacterData;
|
||||
class nsISelection;
|
||||
|
||||
/*
|
||||
Editor Action Listener interface to outside world
|
||||
*/
|
||||
|
||||
#define NS_IEDITACTIONLISTENER_IID \
|
||||
{/* B22907B1-EE93-11d2-8D50-000064657374*/ \
|
||||
0xb22907b1, 0xee93, 0x11d2, \
|
||||
{ 0x8d, 0x50, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74} }
|
||||
|
||||
/**
|
||||
* A generic editor action listener interface.
|
||||
* <P>
|
||||
* nsIEditActionListener is the interface used by applications wishing to be notified
|
||||
* when the editor modifies the DOM tree.
|
||||
*
|
||||
* Note: this is the wrong class to implement if you are interested in generic
|
||||
* change notifications. For generic notifications, you should implement
|
||||
* nsIDocumentObserver.
|
||||
*/
|
||||
class nsIEditActionListener : public nsISupports{
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IEDITACTIONLISTENER_IID; return iid; }
|
||||
|
||||
/**
|
||||
* Called before the editor creates a node.
|
||||
* @param aTag The tag name of the DOM Node to create.
|
||||
* @param aParent The node to insert the new object into
|
||||
* @param aPosition The place in aParent to insert the new node
|
||||
* 0=first child, 1=second child, etc.
|
||||
* any number > number of current children = last child
|
||||
*/
|
||||
NS_IMETHOD WillCreateNode(const nsString& aTag,
|
||||
nsIDOMNode *aParent,
|
||||
PRInt32 aPosition)=0;
|
||||
|
||||
/**
|
||||
* Called after the editor creates a node.
|
||||
* @param aTag The tag name of the DOM Node to create.
|
||||
* @param aNode The DOM Node that was created.
|
||||
* @param aParent The node to insert the new object into
|
||||
* @param aPosition The place in aParent to insert the new node
|
||||
* 0=first child, 1=second child, etc.
|
||||
* any number > number of current children = last child
|
||||
* @param aResult The result of the create node operation.
|
||||
*/
|
||||
NS_IMETHOD DidCreateNode(const nsString& aTag,
|
||||
nsIDOMNode *aNode,
|
||||
nsIDOMNode *aParent,
|
||||
PRInt32 aPosition,
|
||||
nsresult aResult)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor inserts a node.
|
||||
* @param aNode The DOM Node to insert.
|
||||
* @param aParent The node to insert the new object into
|
||||
* @param aPosition The place in aParent to insert the new node
|
||||
* 0=first child, 1=second child, etc.
|
||||
* any number > number of current children = last child
|
||||
*/
|
||||
NS_IMETHOD WillInsertNode(nsIDOMNode *aNode,
|
||||
nsIDOMNode *aParent,
|
||||
PRInt32 aPosition)=0;
|
||||
|
||||
/**
|
||||
* Called after the editor inserts a node.
|
||||
* @param aNode The DOM Node to insert.
|
||||
* @param aParent The node to insert the new object into
|
||||
* @param aPosition The place in aParent to insert the new node
|
||||
* 0=first child, 1=second child, etc.
|
||||
* any number > number of current children = last child
|
||||
* @param aResult The result of the insert node operation.
|
||||
*/
|
||||
NS_IMETHOD DidInsertNode(nsIDOMNode *aNode,
|
||||
nsIDOMNode *aParent,
|
||||
PRInt32 aPosition,
|
||||
nsresult aResult)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor deletes a node.
|
||||
* @param aChild The node to delete
|
||||
*/
|
||||
NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild)=0;
|
||||
|
||||
/**
|
||||
* Called after the editor deletes a node.
|
||||
* @param aChild The node to delete
|
||||
* @param aResult The result of the delete node operation.
|
||||
*/
|
||||
NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor splits a node.
|
||||
* @param aExistingRightNode the node to split. It will become the new node's next sibling.
|
||||
* @param aOffset the offset of aExistingRightNode's content|children to do the split at
|
||||
* @param aNewLeftNode [OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.
|
||||
*/
|
||||
NS_IMETHOD WillSplitNode(nsIDOMNode *aExistingRightNode,
|
||||
PRInt32 aOffset)=0;
|
||||
|
||||
/**
|
||||
* Called after the editor splits a node.
|
||||
* @param aExistingRightNode the node to split. It will become the new node's next sibling.
|
||||
* @param aOffset the offset of aExistingRightNode's content|children to do the split at
|
||||
* @param aNewLeftNode [OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.
|
||||
*/
|
||||
NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode,
|
||||
PRInt32 aOffset,
|
||||
nsIDOMNode *aNewLeftNode,
|
||||
nsresult aResult)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor joins 2 nodes.
|
||||
* @param aLeftNode This node will be merged into the right node
|
||||
* @param aRightNode The node that will be merged into.
|
||||
* There is no requirement that the two nodes be of
|
||||
* the same type.
|
||||
* @param aParent The parent of aRightNode
|
||||
*/
|
||||
NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode,
|
||||
nsIDOMNode *aRightNode,
|
||||
nsIDOMNode *aParent)=0;
|
||||
|
||||
/**
|
||||
* Called after the editor joins 2 nodes.
|
||||
* @param aLeftNode This node will be merged into the right node
|
||||
* @param aRightNode The node that will be merged into.
|
||||
* There is no requirement that the two nodes be of
|
||||
* the same type.
|
||||
* @param aParent The parent of aRightNode
|
||||
* @param aResult The result of the join operation.
|
||||
*/
|
||||
NS_IMETHOD DidJoinNodes(nsIDOMNode *aLeftNode,
|
||||
nsIDOMNode *aRightNode,
|
||||
nsIDOMNode *aParent,
|
||||
nsresult aResult)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor inserts text.
|
||||
* @param aTextNode This node getting inserted text
|
||||
* @param aOffset The offset in aTextNode to insert at.
|
||||
* @param aString The string that gets inserted.
|
||||
*/
|
||||
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode,
|
||||
PRInt32 aOffset,
|
||||
const nsString &aString)=0;
|
||||
|
||||
/**
|
||||
* Called after the editor inserts text.
|
||||
* @param aTextNode This node getting inserted text
|
||||
* @param aOffset The offset in aTextNode to insert at.
|
||||
* @param aString The string that gets inserted.
|
||||
* @param aResult The result of the insert text operation.
|
||||
*/
|
||||
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode,
|
||||
PRInt32 aOffset,
|
||||
const nsString &aString,
|
||||
nsresult aResult)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor deletes text.
|
||||
* @param aTextNode This node getting text deleted
|
||||
* @param aOffset The offset in aTextNode to delete at.
|
||||
* @param aLength The amount of text to delete.
|
||||
*/
|
||||
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode,
|
||||
PRInt32 aOffset,
|
||||
PRInt32 aLength)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor deletes text.
|
||||
* @param aTextNode This node getting text deleted
|
||||
* @param aOffset The offset in aTextNode to delete at.
|
||||
* @param aLength The amount of text to delete.
|
||||
* @param aResult The result of the delete text operation.
|
||||
*/
|
||||
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode,
|
||||
PRInt32 aOffset,
|
||||
PRInt32 aLength,
|
||||
nsresult aResult)=0;
|
||||
|
||||
/**
|
||||
* Called before the editor deletes the selection.
|
||||
* @param aSelection The selection to be deleted
|
||||
*/
|
||||
NS_IMETHOD WillDeleteSelection(nsISelection *aSelection)=0;
|
||||
|
||||
/**
|
||||
* Called after the editor deletes the selection.
|
||||
* @param aSelection The selection, after deletion
|
||||
*/
|
||||
NS_IMETHOD DidDeleteSelection(nsISelection *aSelection)=0;
|
||||
};
|
||||
|
||||
#endif //nsIEditActionListener_h__
|
||||
|
@ -1,60 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef NS_IEDITOR_CONTROLLER_H
|
||||
#define NS_IEDITOR_CONTROLLER_H
|
||||
|
||||
#define NS_IEDITORCONTROLLER_IID_STR "075F6CB1-B26D-11d3-9933-00108301233C"
|
||||
|
||||
#define NS_IEDITORCONTROLLER_IID \
|
||||
{ 0x75f6cb1, 0xb26d, 0x11d3, \
|
||||
{ 0x99, 0x33, 0x0, 0x10, 0x83, 0x1, 0x23, 0x3c }}
|
||||
|
||||
|
||||
class nsIEditor;
|
||||
class nsCString;
|
||||
|
||||
class nsIEditorController : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IEDITORCONTROLLER_IID)
|
||||
|
||||
/** init the controller
|
||||
* aCommandRefCon = a cookie that is passed to commands
|
||||
*/
|
||||
NS_IMETHOD Init(nsISupports *aCommandRefCon) = 0;
|
||||
|
||||
/** Set the cookie that is passed to commands
|
||||
*/
|
||||
NS_IMETHOD SetCommandRefCon(nsISupports *aCommandRefCon) = 0;
|
||||
|
||||
/** Execute the command identified by the ID string
|
||||
* @param aCommandName ID string of the command
|
||||
*/
|
||||
NS_IMETHOD DoCommand(const PRUnichar *aCommandName)=0;
|
||||
/* Should we expose nsEditorController::IsCommandEnabled() as well? */
|
||||
};
|
||||
|
||||
|
||||
#endif //NS_IEDITOR_CONTROLLER_H
|
||||
|
||||
|
@ -1,79 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef nsIEditorIMESupport_h__
|
||||
#define nsIEditorIMESupport_h__
|
||||
|
||||
|
||||
#define NS_IEDITORIMESUPPORT_IID \
|
||||
{ /* {4805e680-49b9-11d3-9ce4-ed60bd6cb5bc} */ \
|
||||
0x4805e680, 0x49b9, 0x11d3, \
|
||||
{ 0x9c, 0xe4, 0xed, 0x60, 0xbd, 0x6c, 0xb5, 0xbc } }
|
||||
|
||||
|
||||
class nsIPrivateTextRangeList;
|
||||
struct nsTextEventReply;
|
||||
struct nsReconversionEventReply;
|
||||
|
||||
class nsIEditorIMESupport : public nsISupports
|
||||
{
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IEDITORIMESUPPORT_IID; return iid; }
|
||||
|
||||
|
||||
/**
|
||||
* BeginComposition(nsTextEventReply* aReply) Handles the start of inline input composition.
|
||||
*/
|
||||
|
||||
NS_IMETHOD BeginComposition(nsTextEventReply *aReply) = 0;
|
||||
|
||||
/**
|
||||
* SetCompositionString() Sets the inline input composition string.
|
||||
* BeginComposition must be called prior to this.
|
||||
*/
|
||||
|
||||
NS_IMETHOD SetCompositionString(const nsString& aCompositionString, nsIPrivateTextRangeList* aTextRange, nsTextEventReply* aReply) = 0;
|
||||
|
||||
/**
|
||||
* EndComposition() Handles the end of inline input composition.
|
||||
*/
|
||||
|
||||
NS_IMETHOD EndComposition(void) = 0;
|
||||
|
||||
/**
|
||||
* QueryComposition() Get the composition position
|
||||
*/
|
||||
NS_IMETHOD QueryComposition(nsTextEventReply *aReply) = 0;
|
||||
|
||||
/**
|
||||
* ForceCompositionEnd() force the composition end
|
||||
*/
|
||||
NS_IMETHOD ForceCompositionEnd() = 0;
|
||||
|
||||
/**
|
||||
* GetReconvertionString() Get the reconvertion string
|
||||
*/
|
||||
NS_IMETHOD GetReconversionString(nsReconversionEventReply *aReply) = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif // nsIEditorIMESupport_h__
|
@ -1,56 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef nsIEditorObserver_h__
|
||||
#define nsIEditorObserver_h__
|
||||
#include "nsISupports.h"
|
||||
#include "nscore.h"
|
||||
|
||||
/*
|
||||
Editor Observer interface to outside world
|
||||
*/
|
||||
|
||||
#define NS_IEDITOROBSERVER_IID \
|
||||
{/* a6cf9125-15b3-11d2-932e-00805f8add32 */ \
|
||||
0xa6cf9125, 0x15b3, 0x11d2, \
|
||||
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
|
||||
|
||||
/**
|
||||
* A generic editor observer interface.
|
||||
* <P>
|
||||
* nsIEditorObserver is the interface used by applications wishing to be notified
|
||||
* when the editor has completed a user action.
|
||||
*
|
||||
*/
|
||||
class nsIEditorObserver : public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IEDITOROBSERVER_IID; return iid; }
|
||||
|
||||
/**
|
||||
* Called after the editor completes a user action.
|
||||
*/
|
||||
NS_IMETHOD EditAction()=0;
|
||||
};
|
||||
|
||||
|
||||
#endif //nsIEditorObserver_h__
|
||||
|
@ -1,406 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
|
||||
#ifndef nsIHTMLEditor_h__
|
||||
#define nsIHTMLEditor_h__
|
||||
|
||||
|
||||
#define NS_IHTMLEDITOR_IID \
|
||||
{ /* 4805e683-49b9-11d3-9ce4-ed60bd6cb5bc} */ \
|
||||
0x4805e683, 0x49b9, 0x11d3, \
|
||||
{ 0x9c, 0xe4, 0xed, 0x60, 0xbd, 0x6c, 0xb5, 0xbc } }
|
||||
|
||||
#define NS_EDITOR_ELEMENT_NOT_FOUND \
|
||||
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_EDITOR, 1)
|
||||
|
||||
class nsString;
|
||||
class nsStringArray;
|
||||
class nsSupportsArray;
|
||||
|
||||
class nsIAtom;
|
||||
class nsIDOMNode;
|
||||
class nsIDOMElement;
|
||||
|
||||
class nsIHTMLEditor : public nsISupports
|
||||
{
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IHTMLEDITOR_IID; return iid; }
|
||||
|
||||
// used by GetAlignment()
|
||||
typedef enum {
|
||||
eLeft,
|
||||
eCenter,
|
||||
eRight,
|
||||
eJustify
|
||||
} EAlignment;
|
||||
|
||||
/* ------------ Inline property methods -------------- */
|
||||
|
||||
|
||||
/**
|
||||
* SetInlineProperty() sets the aggregate properties on the current selection
|
||||
*
|
||||
* @param aProperty the property to set on the selection
|
||||
* @param aAttribute the attribute of the property, if applicable. May be null.
|
||||
* Example: aProperty="font", aAttribute="color"
|
||||
* @param aValue if aAttribute is not null, the value of the attribute. May be null.
|
||||
* Example: aProperty="font", aAttribute="color", aValue="0x00FFFF"
|
||||
*/
|
||||
NS_IMETHOD SetInlineProperty(nsIAtom *aProperty,
|
||||
const nsString *aAttribute,
|
||||
const nsString *aValue)=0;
|
||||
|
||||
/**
|
||||
* GetInlineProperty() gets the aggregate properties of the current selection.
|
||||
* All object in the current selection are scanned and their attributes are
|
||||
* represented in a list of Property object.
|
||||
*
|
||||
* @param aProperty the property to get on the selection
|
||||
* @param aAttribute the attribute of the property, if applicable. May be null.
|
||||
* Example: aProperty="font", aAttribute="color"
|
||||
* @param aValue if aAttribute is not null, the value of the attribute. May be null.
|
||||
* Example: aProperty="font", aAttribute="color", aValue="0x00FFFF"
|
||||
* @param aFirst [OUT] PR_TRUE if the first text node in the selection has the property
|
||||
* @param aAny [OUT] PR_TRUE if any of the text nodes in the selection have the property
|
||||
* @param aAll [OUT] PR_TRUE if all of the text nodes in the selection have the property
|
||||
*/
|
||||
NS_IMETHOD GetInlineProperty(nsIAtom *aProperty,
|
||||
const nsString *aAttribute,
|
||||
const nsString *aValue,
|
||||
PRBool &aFirst, PRBool &aAny, PRBool &aAll)=0;
|
||||
|
||||
NS_IMETHOD GetInlinePropertyWithAttrValue(nsIAtom *aProperty,
|
||||
const nsString *aAttribute,
|
||||
const nsString *aValue,
|
||||
PRBool &aFirst, PRBool &aAny, PRBool &aAll,
|
||||
nsString *outValue)=0;
|
||||
|
||||
/**
|
||||
* RemoveAllInlineProperties() deletes all the inline properties from all
|
||||
* text in the current selection.
|
||||
*/
|
||||
NS_IMETHOD RemoveAllInlineProperties()=0;
|
||||
|
||||
|
||||
/**
|
||||
* RemoveInlineProperty() deletes the properties from all text in the current selection.
|
||||
* If aProperty is not set on the selection, nothing is done.
|
||||
*
|
||||
* @param aProperty the property to remove from the selection
|
||||
* All atoms are for normal HTML tags (e.g.: nsIEditorProptery::font)
|
||||
* except when you want to remove just links and not named anchors
|
||||
* For that, use nsIEditorProperty::href
|
||||
* @param aAttribute the attribute of the property, if applicable. May be null.
|
||||
* Example: aProperty=nsIEditorProptery::font, aAttribute="color"
|
||||
* nsIEditProperty::allAttributes is special. It indicates that
|
||||
* all content-based text properties are to be removed from the selection.
|
||||
*/
|
||||
NS_IMETHOD RemoveInlineProperty(nsIAtom *aProperty, const nsString *aAttribute)=0;
|
||||
|
||||
/**
|
||||
* Increase font size for text in selection by 1 HTML unit
|
||||
* All existing text is scanned for existing <FONT SIZE> attributes
|
||||
* so they will be incremented instead of inserting new <FONT> tag
|
||||
*/
|
||||
NS_IMETHOD IncreaseFontSize()=0;
|
||||
|
||||
/**
|
||||
* Decrease font size for text in selection by 1 HTML unit
|
||||
* All existing text is scanned for existing <FONT SIZE> attributes
|
||||
* so they will be decreased instead of inserting new <FONT> tag
|
||||
*/
|
||||
NS_IMETHOD DecreaseFontSize()=0;
|
||||
|
||||
/* ------------ HTML content methods -------------- */
|
||||
|
||||
/**
|
||||
* Tests if a node is a BLOCK element according the the HTML 4.0 DTD
|
||||
* This does NOT consider CSS effect on display type
|
||||
*
|
||||
* @param aNode the node to test
|
||||
*/
|
||||
NS_IMETHOD NodeIsBlock(nsIDOMNode *aNode, PRBool &aIsBlock)=0;
|
||||
|
||||
/**
|
||||
* Insert some HTML source at the current location
|
||||
*
|
||||
* @param aInputString the string to be inserted
|
||||
*/
|
||||
NS_IMETHOD InsertHTML(const nsString &aInputString)=0;
|
||||
|
||||
|
||||
/** Rebuild the entire document from source HTML
|
||||
* Needed to be able to edit HEAD and other outside-of-BODY content
|
||||
*
|
||||
* @param aSourceString HTML source string of the entire new document
|
||||
*/
|
||||
NS_IMETHOD RebuildDocumentFromSource(const nsString& aSourceString)=0;
|
||||
|
||||
/**
|
||||
* Insert some HTML source, interpreting
|
||||
* the string argument according to the given charset.
|
||||
*
|
||||
* @param aInputString the string to be inserted
|
||||
* @param aCharset Charset of string
|
||||
* @param aParentNode Parent to insert under.
|
||||
* If null, insert at the current location.
|
||||
*/
|
||||
NS_IMETHOD InsertHTMLWithCharset(const nsString &aInputString,
|
||||
const nsString& aCharset)=0;
|
||||
|
||||
|
||||
/** Insert an element, which may have child nodes, at the selection
|
||||
* Used primarily to insert a new element for various insert element dialogs,
|
||||
* but it enforces the HTML 4.0 DTD "CanContain" rules, so it should
|
||||
* be useful for other elements.
|
||||
*
|
||||
* @param aElement The element to insert
|
||||
* @param aDeleteSelection Delete the selection before inserting
|
||||
* If aDeleteSelection is PR_FALSE, then the element is inserted
|
||||
* after the end of the selection for all element except
|
||||
* Named Anchors, which insert before the selection
|
||||
*/
|
||||
NS_IMETHOD InsertElementAtSelection(nsIDOMElement* aElement, PRBool aDeleteSelection)=0;
|
||||
|
||||
/** Set the documents title.
|
||||
*/
|
||||
NS_IMETHOD SetDocumentTitle(const PRUnichar *aTitle)=0;
|
||||
|
||||
/**
|
||||
* Find all the nodes in the document which contain references
|
||||
* to outside URIs (e.g. a href, img src, script src, etc.)
|
||||
* The objects in the array will be type nsIURIRefObject.
|
||||
*
|
||||
* @return aNodeList the linked nodes found
|
||||
*/
|
||||
NS_IMETHOD GetLinkedObjects(nsISupportsArray** aNodeList)=0;
|
||||
|
||||
/* ------------ Selection manipulation -------------- */
|
||||
/* Should these be moved to nsISelection? */
|
||||
|
||||
/** Set the selection at the suppled element
|
||||
*
|
||||
* @param aElement An element in the document
|
||||
*/
|
||||
NS_IMETHOD SelectElement(nsIDOMElement* aElement)=0;
|
||||
|
||||
/** Create a collapsed selection just after aElement
|
||||
*
|
||||
* XXX could we parameterize SelectElement(before/select/after>?
|
||||
*
|
||||
* The selection is set to parent-of-aElement with an
|
||||
* offset 1 greater than aElement's offset
|
||||
* but it enforces the HTML 4.0 DTD "CanContain" rules, so it should
|
||||
* be useful for other elements.
|
||||
*
|
||||
* @param aElement An element in the document
|
||||
*/
|
||||
NS_IMETHOD SetCaretAfterElement(nsIDOMElement* aElement)=0;
|
||||
|
||||
/**
|
||||
* SetParagraphFormat Insert a block paragraph tag around selection
|
||||
* @param aParagraphFormat "p", "h1" to "h6", "address", "pre", or "blockquote"
|
||||
*/
|
||||
NS_IMETHOD SetParagraphFormat(const nsString& aParagraphFormat)=0;
|
||||
|
||||
/**
|
||||
* GetParagraphState returns what block tag paragraph format is in the selection.
|
||||
* @param aMixed True if there is more than one format
|
||||
* @param outState Name of block tag. "" is returned for none.
|
||||
*/
|
||||
NS_IMETHOD GetParagraphState(PRBool &aMixed, nsString &outState)=0;
|
||||
|
||||
/**
|
||||
* GetFontFaceState returns what font face is in the selection.
|
||||
* @param aMixed True if there is more than one font face
|
||||
* @param outFace Name of face. Note: "tt" is returned for
|
||||
* tt tag. "" is returned for none.
|
||||
*/
|
||||
NS_IMETHOD GetFontFaceState(PRBool &aMixed, nsString &outFont)=0;
|
||||
|
||||
/**
|
||||
* GetFontColorState returns what font face is in the selection.
|
||||
* @param aMixed True if there is more than one font color
|
||||
* @param outColor Color string. "" is returned for none.
|
||||
*/
|
||||
NS_IMETHOD GetFontColorState(PRBool &aMixed, nsString &outColor)=0;
|
||||
|
||||
/**
|
||||
* GetFontColorState returns what font face is in the selection.
|
||||
* @param aMixed True if there is more than one font color
|
||||
* @param outColor Color string. "" is returned for none.
|
||||
*/
|
||||
NS_IMETHOD GetBackgroundColorState(PRBool &aMixed, nsString &outColor)=0;
|
||||
|
||||
/**
|
||||
* GetListState returns what list type is in the selection.
|
||||
* @param aMixed True if there is more than one type of list, or
|
||||
* if there is some list and non-list
|
||||
* @param aOL The company that employs me. No, really, it's
|
||||
* true if an "ol" list is selected.
|
||||
* @param aUL true if an "ul" list is selected.
|
||||
* @param aDL true if a "dl" list is selected.
|
||||
*/
|
||||
NS_IMETHOD GetListState(PRBool &aMixed, PRBool &aOL, PRBool &aUL, PRBool &aDL)=0;
|
||||
|
||||
/**
|
||||
* GetListItemState returns what list item type is in the selection.
|
||||
* @param aMixed True if there is more than one type of list item, or
|
||||
* if there is some list and non-list
|
||||
* @param aLI true if "li" list items are selected.
|
||||
* @param aDT true if "dt" list items are selected.
|
||||
* @param aDD true if "dd" list items are selected.
|
||||
*/
|
||||
NS_IMETHOD GetListItemState(PRBool &aMixed, PRBool &aLI, PRBool &aDT, PRBool &aDD)=0;
|
||||
|
||||
/**
|
||||
* GetAlignment returns what alignment is in the selection.
|
||||
* @param aMixed True if there is more than one type of list item, or
|
||||
* if there is some list and non-list
|
||||
* @param aAlign enum value for first encountered alignment (left/center/right)
|
||||
*/
|
||||
NS_IMETHOD GetAlignment(PRBool &aMixed, EAlignment &aAlign)=0;
|
||||
|
||||
/**
|
||||
* Document me!
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD GetIndentState(PRBool &aCanIndent, PRBool &aCanOutdent)=0;
|
||||
|
||||
/**
|
||||
* Document me!
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD MakeOrChangeList(const nsString& aListType, PRBool entireList)=0;
|
||||
|
||||
/**
|
||||
* Document me!
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD RemoveList(const nsString& aListType)=0;
|
||||
|
||||
/**
|
||||
* Document me!
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD Indent(const nsString& aIndent)=0;
|
||||
|
||||
/**
|
||||
* Document me!
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD Align(const nsString& aAlign)=0;
|
||||
|
||||
/** Return the input node or a parent matching the given aTagName,
|
||||
* starting the search at the supplied node.
|
||||
* An example of use is for testing if a node is in a table cell
|
||||
* given a selection anchor node.
|
||||
*
|
||||
* @param aTagName The HTML tagname
|
||||
* Special input values:
|
||||
* Use "href" to get a link node
|
||||
* (an "A" tag with the "href" attribute set)
|
||||
* Use "anchor" or "namedanchor" to get a named anchor node
|
||||
* (an "A" tag with the "name" attribute set)
|
||||
* Use "list" to get an OL, UL, or DL list node
|
||||
* Use "td" to get either a TD or TH cell node
|
||||
*
|
||||
* @param aNode The node in the document to start the search
|
||||
* If it is null, the anchor node of the current selection is used
|
||||
* Returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found (passes NS_SUCCEEDED macro)
|
||||
*/
|
||||
NS_IMETHOD GetElementOrParentByTagName(const nsAReadableString& aTagName, nsIDOMNode *aNode, nsIDOMElement** aReturn)=0;
|
||||
|
||||
/** Return an element only if it is the only node selected,
|
||||
* such as an image, horizontal rule, etc.
|
||||
* The exception is a link, which is more like a text attribute:
|
||||
* The Anchor tag is returned if the selection is within the textnode(s)
|
||||
* that are children of the "A" node.
|
||||
* This could be a collapsed selection, i.e., a caret within the link text.
|
||||
*
|
||||
* @param aTagName The HTML tagname or and empty string
|
||||
* to get any element (but only if it is the only element selected)
|
||||
* Special input values for Links and Named anchors:
|
||||
* Use "href" to get a link node
|
||||
* (an "A" tag with the "href" attribute set)
|
||||
* Use "anchor" or "namedanchor" to get a named anchor node
|
||||
* (an "A" tag with the "name" attribute set)
|
||||
* Returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found (passes NS_SUCCEEDED macro)
|
||||
*/
|
||||
NS_IMETHOD GetSelectedElement(const nsString& aTagName, nsIDOMElement** aReturn)=0;
|
||||
|
||||
/** Output the contents of the <HEAD> section as text/HTML format
|
||||
*/
|
||||
NS_IMETHOD GetHeadContentsAsHTML(nsString& aOutputString)=0;
|
||||
|
||||
/** Replace all children of <HEAD> with string of HTML source
|
||||
*/
|
||||
NS_IMETHOD ReplaceHeadContentsWithHTML(const nsString &aSourceToInsert)=0;
|
||||
|
||||
/** Return a new element with default attribute values
|
||||
*
|
||||
* This does not rely on the selection, and is not sensitive to context.
|
||||
*
|
||||
* Used primarily to supply new element for various insert element dialogs
|
||||
* (Image, Link, NamedAnchor, Table, and HorizontalRule
|
||||
* are the only returned elements as of 7/25/99)
|
||||
*
|
||||
* @param aTagName The HTML tagname
|
||||
* Special input values for Links and Named anchors:
|
||||
* Use "href" to get a link node
|
||||
* (an "A" tag with the "href" attribute set)
|
||||
* Use "anchor" or "namedanchor" to get a named anchor node
|
||||
* (an "A" tag with the "name" attribute set)
|
||||
*/
|
||||
NS_IMETHOD CreateElementWithDefaults(const nsAReadableString& aTagName, nsIDOMElement** aReturn)=0;
|
||||
|
||||
/** Insert an link element as the parent of the current selection
|
||||
*
|
||||
* @param aElement An "A" element with a non-empty "href" attribute
|
||||
*/
|
||||
NS_IMETHOD InsertLinkAroundSelection(nsIDOMElement* aAnchorElement)=0;
|
||||
|
||||
/** Set the value of the "bgcolor" attribute on the document's <body> element
|
||||
*
|
||||
* @param aColor The HTML color string, such as "#ffccff" or "yellow"
|
||||
*/
|
||||
NS_IMETHOD SetBackgroundColor(const nsString& aColor)=0;
|
||||
|
||||
|
||||
/** Set an attribute on the document's <body> element
|
||||
* such as text, link, background colors
|
||||
*
|
||||
* 8/31/00 THIS ISN'T BEING USED? SHOULD WE DROP IT?
|
||||
*
|
||||
* @param aAttr The attribute to be set
|
||||
* @param aValue The value of the attribute
|
||||
*/
|
||||
NS_IMETHOD SetBodyAttribute(const nsString& aAttr, const nsString& aValue)=0;
|
||||
|
||||
//XXX Used to suppress spurious drag/drop events to workaround bug 50703
|
||||
// Don't use this method! It will go away after first release!
|
||||
NS_IMETHOD IgnoreSpuriousDragEvent(PRBool aIgnoreSpuriousDragEvent)=0;
|
||||
|
||||
};
|
||||
|
||||
#endif // nsIHTMLEditor_h__
|
Loading…
x
Reference in New Issue
Block a user