mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 19:10:36 +00:00
Added GetScrollbarVisibility()
This commit is contained in:
parent
7aa583c57b
commit
391a2f6747
@ -139,6 +139,13 @@ public:
|
||||
*/
|
||||
NS_IMETHOD GetControlInsets(nsMargin &aInsets) const = 0;
|
||||
|
||||
/**
|
||||
* Get information about whether the vertical and horizontal scrollbars
|
||||
* are currently visible
|
||||
*/
|
||||
NS_IMETHOD GetScrollbarVisibility(PRBool *aVerticalVisible,
|
||||
PRBool *aHorizontalVisible) const = 0;
|
||||
|
||||
private:
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
|
||||
NS_IMETHOD_(nsrefcnt) Release(void) = 0;
|
||||
|
@ -1295,6 +1295,14 @@ NS_IMETHODIMP nsScrollingView :: GetControlInsets(nsMargin &aInsets) const
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsScrollingView :: GetScrollbarVisibility(PRBool *aVerticalVisible,
|
||||
PRBool *aHorizontalVisible) const
|
||||
{
|
||||
*aVerticalVisible = mVScrollBarView && ViewIsShowing(mVScrollBarView);
|
||||
*aHorizontalVisible = mHScrollBarView && ViewIsShowing(mHScrollBarView);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsScrollingView :: AdjustChildWidgets(nsScrollingView *aScrolling, nsIView *aView, nscoord aDx, nscoord aDy, float scale)
|
||||
{
|
||||
PRInt32 numkids;
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
NS_IMETHOD ScrollTo(nscoord aX, nscoord aY, PRUint32 aUpdateFlags);
|
||||
NS_IMETHOD SetControlInsets(const nsMargin &aInsets);
|
||||
NS_IMETHOD GetControlInsets(nsMargin &aInsets) const;
|
||||
NS_IMETHOD GetScrollbarVisibility(PRBool *aVerticalVisible,
|
||||
PRBool *aHorizontalVisible) const;
|
||||
|
||||
//private
|
||||
virtual void HandleScrollEvent(nsGUIEvent *aEvent, PRUint32 aEventFlags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user