зеркало из https://github.com/mozilla/pjs.git
editor/txtsvc/public/nsITextServicesDocument.h
editor/txtsvc/src/nsTextServicesDocument.cpp editor/txtsvc/src/nsTextServicesDocument.h - Added ScrollSelectionIntoView() method to nsITextServicesDocument interface and implementation.
This commit is contained in:
Родитель
ff2c034123
Коммит
6a0bf9b1e4
|
@ -175,6 +175,12 @@ public:
|
|||
|
||||
NS_IMETHOD SetSelection(PRInt32 aOffset, PRInt32 aLength) = 0;
|
||||
|
||||
/**
|
||||
* Scrolls the document so that the current selection is visible.
|
||||
*/
|
||||
|
||||
NS_IMETHOD ScrollSelectionIntoView() = 0;
|
||||
|
||||
/**
|
||||
* Deletes the text selected by SetSelection(). Calling
|
||||
* DeleteSelection with nothing selected, or with a collapsed
|
||||
|
|
|
@ -1697,6 +1697,23 @@ nsTextServicesDocument::SetSelection(PRInt32 aOffset, PRInt32 aLength)
|
|||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextServicesDocument::ScrollSelectionIntoView()
|
||||
{
|
||||
nsresult result;
|
||||
|
||||
if (!mPresShell)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
LOCK_DOC(this);
|
||||
|
||||
result = mPresShell->ScrollSelectionIntoView(SELECTION_NORMAL, SELECTION_FOCUS_REGION);
|
||||
|
||||
UNLOCK_DOC(this);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextServicesDocument::DeleteSelection()
|
||||
{
|
||||
|
|
|
@ -114,6 +114,7 @@ public:
|
|||
NS_IMETHOD NextBlock();
|
||||
NS_IMETHOD IsDone(PRBool *aIsDone);
|
||||
NS_IMETHOD SetSelection(PRInt32 aOffset, PRInt32 aLength);
|
||||
NS_IMETHOD ScrollSelectionIntoView();
|
||||
NS_IMETHOD DeleteSelection();
|
||||
NS_IMETHOD InsertText(const nsString *aText);
|
||||
NS_IMETHOD SetDisplayStyle(TSDDisplayStyle aStyle);
|
||||
|
|
|
@ -175,6 +175,12 @@ public:
|
|||
|
||||
NS_IMETHOD SetSelection(PRInt32 aOffset, PRInt32 aLength) = 0;
|
||||
|
||||
/**
|
||||
* Scrolls the document so that the current selection is visible.
|
||||
*/
|
||||
|
||||
NS_IMETHOD ScrollSelectionIntoView() = 0;
|
||||
|
||||
/**
|
||||
* Deletes the text selected by SetSelection(). Calling
|
||||
* DeleteSelection with nothing selected, or with a collapsed
|
||||
|
|
|
@ -1697,6 +1697,23 @@ nsTextServicesDocument::SetSelection(PRInt32 aOffset, PRInt32 aLength)
|
|||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextServicesDocument::ScrollSelectionIntoView()
|
||||
{
|
||||
nsresult result;
|
||||
|
||||
if (!mPresShell)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
LOCK_DOC(this);
|
||||
|
||||
result = mPresShell->ScrollSelectionIntoView(SELECTION_NORMAL, SELECTION_FOCUS_REGION);
|
||||
|
||||
UNLOCK_DOC(this);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextServicesDocument::DeleteSelection()
|
||||
{
|
||||
|
|
|
@ -114,6 +114,7 @@ public:
|
|||
NS_IMETHOD NextBlock();
|
||||
NS_IMETHOD IsDone(PRBool *aIsDone);
|
||||
NS_IMETHOD SetSelection(PRInt32 aOffset, PRInt32 aLength);
|
||||
NS_IMETHOD ScrollSelectionIntoView();
|
||||
NS_IMETHOD DeleteSelection();
|
||||
NS_IMETHOD InsertText(const nsString *aText);
|
||||
NS_IMETHOD SetDisplayStyle(TSDDisplayStyle aStyle);
|
||||
|
|
Загрузка…
Ссылка в новой задаче