зеркало из https://github.com/mozilla/pjs.git
Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor.
This commit is contained in:
Родитель
3854e3bfb8
Коммит
b5a8cb2fc4
|
@ -777,6 +777,21 @@ NS_IMETHODIMP nsEditor::SelectAll()
|
|||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditor::Cut()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditor::Copy()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditor::Paste()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
nsString & nsIEditor::GetTextNodeTag()
|
||||
{
|
||||
static nsString gTextNodeTag("special text node tag");
|
||||
|
|
|
@ -155,6 +155,13 @@ public:
|
|||
|
||||
NS_IMETHOD SelectAll();
|
||||
|
||||
NS_IMETHOD Cut();
|
||||
|
||||
NS_IMETHOD Copy();
|
||||
|
||||
NS_IMETHOD Paste();
|
||||
|
||||
|
||||
/*END nsIEditor interfaces*/
|
||||
|
||||
|
||||
|
|
|
@ -208,6 +208,21 @@ NS_IMETHODIMP nsHTMLEditor::ScrollIntoView(PRBool aScrollToBegin)
|
|||
return Inherited::ScrollIntoView(aScrollToBegin);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Cut()
|
||||
{
|
||||
return Inherited::Cut();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Copy()
|
||||
{
|
||||
return Inherited::Copy();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Paste()
|
||||
{
|
||||
return Inherited::Paste();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Insert(nsIInputStream *aInputStream)
|
||||
{
|
||||
return Inherited::Insert(aInputStream);
|
||||
|
|
|
@ -81,6 +81,11 @@ public:
|
|||
NS_IMETHOD ScrollDown(nsIAtom *aIncrement);
|
||||
NS_IMETHOD ScrollIntoView(PRBool aScrollToBegin);
|
||||
|
||||
// cut, copy & paste
|
||||
NS_IMETHOD Cut();
|
||||
NS_IMETHOD Copy();
|
||||
NS_IMETHOD Paste();
|
||||
|
||||
// Input/Output
|
||||
NS_IMETHOD Insert(nsIInputStream *aInputStream);
|
||||
NS_IMETHOD OutputText(nsString& aOutputString);
|
||||
|
|
|
@ -523,6 +523,21 @@ NS_IMETHODIMP nsTextEditor::ScrollIntoView(PRBool aScrollToBegin)
|
|||
return Inherited::ScrollIntoView(aScrollToBegin);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsTextEditor::Cut()
|
||||
{
|
||||
return Inherited::Cut();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsTextEditor::Copy()
|
||||
{
|
||||
return Inherited::Copy();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsTextEditor::Paste()
|
||||
{
|
||||
return Inherited::Paste();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsTextEditor::Insert(nsIInputStream *aInputStream)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
|
|
@ -82,6 +82,11 @@ public:
|
|||
NS_IMETHOD ScrollDown(nsIAtom *aIncrement);
|
||||
NS_IMETHOD ScrollIntoView(PRBool aScrollToBegin);
|
||||
|
||||
// cut, copy & paste
|
||||
NS_IMETHOD Cut();
|
||||
NS_IMETHOD Copy();
|
||||
NS_IMETHOD Paste();
|
||||
|
||||
// Input/Output
|
||||
NS_IMETHOD Insert(nsIInputStream *aInputStream);
|
||||
NS_IMETHOD OutputText(nsString& aOutputString);
|
||||
|
|
|
@ -777,6 +777,21 @@ NS_IMETHODIMP nsEditor::SelectAll()
|
|||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditor::Cut()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditor::Copy()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditor::Paste()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
nsString & nsIEditor::GetTextNodeTag()
|
||||
{
|
||||
static nsString gTextNodeTag("special text node tag");
|
||||
|
|
|
@ -155,6 +155,13 @@ public:
|
|||
|
||||
NS_IMETHOD SelectAll();
|
||||
|
||||
NS_IMETHOD Cut();
|
||||
|
||||
NS_IMETHOD Copy();
|
||||
|
||||
NS_IMETHOD Paste();
|
||||
|
||||
|
||||
/*END nsIEditor interfaces*/
|
||||
|
||||
|
||||
|
|
|
@ -208,6 +208,21 @@ NS_IMETHODIMP nsHTMLEditor::ScrollIntoView(PRBool aScrollToBegin)
|
|||
return Inherited::ScrollIntoView(aScrollToBegin);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Cut()
|
||||
{
|
||||
return Inherited::Cut();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Copy()
|
||||
{
|
||||
return Inherited::Copy();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Paste()
|
||||
{
|
||||
return Inherited::Paste();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLEditor::Insert(nsIInputStream *aInputStream)
|
||||
{
|
||||
return Inherited::Insert(aInputStream);
|
||||
|
|
|
@ -81,6 +81,11 @@ public:
|
|||
NS_IMETHOD ScrollDown(nsIAtom *aIncrement);
|
||||
NS_IMETHOD ScrollIntoView(PRBool aScrollToBegin);
|
||||
|
||||
// cut, copy & paste
|
||||
NS_IMETHOD Cut();
|
||||
NS_IMETHOD Copy();
|
||||
NS_IMETHOD Paste();
|
||||
|
||||
// Input/Output
|
||||
NS_IMETHOD Insert(nsIInputStream *aInputStream);
|
||||
NS_IMETHOD OutputText(nsString& aOutputString);
|
||||
|
|
|
@ -307,6 +307,25 @@ public:
|
|||
/** sets the document selection to the entire contents of the document */
|
||||
NS_IMETHOD SelectAll()=0;
|
||||
|
||||
/** cut the currently selected text, putting it into the OS clipboard
|
||||
* What if no text is selected?
|
||||
* What about mixed selections?
|
||||
* What are the clipboard formats?
|
||||
*/
|
||||
NS_IMETHOD Cut()=0;
|
||||
|
||||
/** copy the currently selected text, putting it into the OS clipboard
|
||||
* What if no text is selected?
|
||||
* What about mixed selections?
|
||||
* What are the clipboard formats?
|
||||
*/
|
||||
NS_IMETHOD Copy()=0;
|
||||
|
||||
/** paste the text in the OS clipboard at the cursor position, replacing
|
||||
* the selected text (if any)
|
||||
*/
|
||||
NS_IMETHOD Paste()=0;
|
||||
|
||||
};
|
||||
|
||||
#endif //nsIEditor_h__
|
||||
|
|
|
@ -71,6 +71,9 @@ public:
|
|||
NS_IMETHOD ScrollUp(nsIAtom *aIncrement)=0;
|
||||
NS_IMETHOD ScrollDown(nsIAtom *aIncrement)=0;
|
||||
NS_IMETHOD ScrollIntoView(PRBool aScrollToBegin)=0;
|
||||
NS_IMETHOD Cut()=0;
|
||||
NS_IMETHOD Copy()=0;
|
||||
NS_IMETHOD Paste()=0;
|
||||
|
||||
NS_IMETHOD Insert(nsIInputStream *aInputStream)=0;
|
||||
NS_IMETHOD OutputText(nsString& aOutputString)=0;
|
||||
|
|
|
@ -215,6 +215,25 @@ public:
|
|||
/** select the entire contents of the document */
|
||||
NS_IMETHOD SelectAll()=0;
|
||||
|
||||
/** cut the currently selected text, putting it into the OS clipboard
|
||||
* What if no text is selected?
|
||||
* What about mixed selections?
|
||||
* What are the clipboard formats?
|
||||
*/
|
||||
NS_IMETHOD Cut()=0;
|
||||
|
||||
/** copy the currently selected text, putting it into the OS clipboard
|
||||
* What if no text is selected?
|
||||
* What about mixed selections?
|
||||
* What are the clipboard formats?
|
||||
*/
|
||||
NS_IMETHOD Copy()=0;
|
||||
|
||||
/** paste the text in the OS clipboard at the cursor position, replacing
|
||||
* the selected text (if any)
|
||||
*/
|
||||
NS_IMETHOD Paste()=0;
|
||||
|
||||
/** scroll the viewport up (towards the beginning of the document.)
|
||||
* @param aIncrement the amount to scroll
|
||||
* legal values are nsIEditor::Line, nsIEditor::Page
|
||||
|
|
Загрузка…
Ссылка в новой задаче