adding in selection of non text frames in editor only

This commit is contained in:
mjudge@netscape.com
1999-05-17 00:21:18 +00:00
parent 218d1edbda
commit d1520ed3dc
17 changed files with 502 additions and 338 deletions

View File

@@ -336,6 +336,9 @@ public:
NS_IMETHOD GetCaret(nsICaret **outCaret);
NS_IMETHOD SetCaretEnabled(PRBool inEnable);
NS_IMETHOD SetDisplayNonTextSelection(PRBool inEnable);
NS_IMETHOD GetDisplayNonTextSelection(PRBool *inEnable);
// nsIDOMSelectionListener interface
NS_IMETHOD NotifySelectionChanged();
@@ -382,6 +385,7 @@ protected:
nsCOMPtr<nsIFrameSelection> mSelection;
nsCOMPtr<nsICaret> mCaret;
PRBool mDisplayNonTextSelection;
PRBool mScrollingEnabled; //used to disable programmable scrolling from outside
FrameHashTable* mPlaceholderMap;
private:
@@ -454,6 +458,7 @@ PresShell::PresShell()
//XXX joki 11/17 - temporary event hack.
mIsDestroying = PR_FALSE;
mCaretEnabled = PR_FALSE;
mDisplayNonTextSelection = PR_FALSE;
EnableScrolling();
}
@@ -1001,6 +1006,20 @@ NS_IMETHODIMP PresShell::SetCaretEnabled(PRBool inEnable)
return result;
}
NS_IMETHODIMP PresShell::SetDisplayNonTextSelection(PRBool inEnable)
{
mDisplayNonTextSelection = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP PresShell::GetDisplayNonTextSelection(PRBool *inEnable)
{
if (!inEnable)
return NS_ERROR_NULL_POINTER;
*inEnable = mDisplayNonTextSelection;
return NS_OK;
}
/*implementation of the nsIDOMSelectionListener
it will invoke the resetselection to update the presentation shell's frames