Added function GetClipView()

git-svn-id: svn://10.0.0.236/trunk@29020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1999-04-24 02:52:58 +00:00
parent ad47378ef2
commit d40fa73ba2
3 changed files with 15 additions and 2 deletions

View File

@@ -203,6 +203,11 @@ public:
*/
NS_IMETHOD ScrollByPages(PRInt32 aNumPages) = 0;
/**
* Returns the clip view
*/
NS_IMETHOD GetClipView(const nsIView** aClipView) const = 0;
private:
NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
NS_IMETHOD_(nsrefcnt) Release(void) = 0;

View File

@@ -607,7 +607,13 @@ NS_IMETHODIMP nsScrollingView :: SetVisibility(nsViewVisibility aVisibility)
}
return rv;
}
NS_IMETHODIMP nsScrollingView :: GetClipView(const nsIView** aClipView) const
{
NS_PRECONDITION(aClipView, "null pointer");
*aClipView = mClipView;
return NS_OK;
}
void nsScrollingView :: HandleScrollEvent(nsGUIEvent *aEvent, PRUint32 aEventFlags)
{
@@ -1087,7 +1093,7 @@ NS_IMETHODIMP nsScrollingView :: ComputeScrollOffsets(PRBool aAdjustWidgets)
// of a problem.
if (0 == oldsizey)
mOffsetY = 0;
else
else
{
mOffsetY = NSIntPixelsToTwips(NSTwipsToIntPixels(nscoord(((float)oldpos * mSizeY) / oldsizey), scale), p2t);

View File

@@ -74,6 +74,8 @@ public:
NS_IMETHOD GetLineHeight(nscoord *aHeight);
NS_IMETHOD ScrollByLines(PRInt32 aNumLines);
NS_IMETHOD ScrollByPages(PRInt32 aNumPages);
NS_IMETHOD GetClipView(const nsIView** aClipView) const;
//locals
void HandleScrollEvent(nsGUIEvent *aEvent, PRUint32 aEventFlags);