summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-26 08:29:52 +0200
committerNoel Grandin <noel@peralex.com>2015-05-26 08:30:19 +0200
commit204d147b8a887d17e6457f795e8b8f4d632213ae (patch)
tree97d0bfc08eff025958add5731e96fbe44d84976e /vcl
parent79aa1ab00a8361c44b8caf73294f841e6553eb72 (diff)
convert SCROLL constants to scoped enum
Change-Id: I5696fa39b2d032735cea7abe039349d4f83cf68d
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/menufloatingwindow.cxx4
-rw-r--r--vcl/source/window/paint.cxx28
-rw-r--r--vcl/source/window/window.cxx6
3 files changed, 19 insertions, 19 deletions
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index ad7bd0ffc27b..a4b70b4a8234 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -599,7 +599,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
Invalidate();
}
- Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP );
+ Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), ScrollFlags::Clip );
}
else if ( bScrollDown && !bUp )
{
@@ -623,7 +623,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
Invalidate();
}
- Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP );
+ Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), ScrollFlags::Clip );
}
Invalidate();
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index f97c2a632e91..a68d6bc14e21 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1479,7 +1479,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
}
void Window::ImplScroll( const Rectangle& rRect,
- long nHorzScroll, long nVertScroll, sal_uInt16 nFlags )
+ long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
if ( !IsDeviceOutputNecessary() )
return;
@@ -1497,18 +1497,18 @@ void Window::ImplScroll( const Rectangle& rRect,
if ( mpWindowImpl->mpCursor )
mpWindowImpl->mpCursor->ImplSuspend();
- sal_uInt16 nOrgFlags = nFlags;
- if ( !(nFlags & (SCROLL_CHILDREN | SCROLL_NOCHILDREN)) )
+ ScrollFlags nOrgFlags = nFlags;
+ if ( !(nFlags & (ScrollFlags::Children | ScrollFlags::NoChildren)) )
{
if ( GetStyle() & WB_CLIPCHILDREN )
- nFlags |= SCROLL_NOCHILDREN;
+ nFlags |= ScrollFlags::NoChildren;
else
- nFlags |= SCROLL_CHILDREN;
+ nFlags |= ScrollFlags::Children;
}
vcl::Region aInvalidateRegion;
- bool bScrollChildren = (nFlags & SCROLL_CHILDREN) != 0;
- bool bErase = (nFlags & SCROLL_NOERASE) == 0;
+ bool bScrollChildren(nFlags & ScrollFlags::Children);
+ bool bErase(nFlags & ScrollFlags::NoErase);
if ( !mpWindowImpl->mpFirstChild )
bScrollChildren = false;
@@ -1529,7 +1529,7 @@ void Window::ImplScroll( const Rectangle& rRect,
// adapt paint areas
ImplMoveAllInvalidateRegions( aRectMirror, nHorzScroll, nVertScroll, bScrollChildren );
- if ( !(nFlags & SCROLL_NOINVALIDATE) )
+ if ( !(nFlags & ScrollFlags::NoInvalidate) )
{
ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, true, false );
@@ -1543,7 +1543,7 @@ void Window::ImplScroll( const Rectangle& rRect,
aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll );
bErase = true;
}
- if ( !(nFlags & SCROLL_NOWINDOWINVALIDATE) )
+ if ( !(nFlags & ScrollFlags::NoWindowInvalidate) )
{
Rectangle aDestRect( aRectMirror );
aDestRect.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll );
@@ -1556,7 +1556,7 @@ void Window::ImplScroll( const Rectangle& rRect,
Point aPoint( mnOutOffX, mnOutOffY );
vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
- if ( nFlags & SCROLL_CLIP )
+ if ( nFlags & ScrollFlags::Clip )
aRegion.Intersect( rRect );
if ( mpWindowImpl->mbWinRegion )
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -1566,12 +1566,12 @@ void Window::ImplScroll( const Rectangle& rRect,
ImplClipBoundaries( aRegion, false, true );
if ( !bScrollChildren )
{
- if ( nOrgFlags & SCROLL_NOCHILDREN )
+ if ( nOrgFlags & ScrollFlags::NoChildren )
ImplClipAllChildren( aRegion );
else
ImplClipChildren( aRegion );
}
- if ( mbClipRegion && (nFlags & SCROLL_USECLIPREGION) )
+ if ( mbClipRegion && (nFlags & ScrollFlags::UseClipRegion) )
aRegion.Intersect( maRegion );
if ( !aRegion.IsEmpty() )
{
@@ -1629,7 +1629,7 @@ void Window::ImplScroll( const Rectangle& rRect,
nPaintFlags |= InvalidateFlags::NoErase;
if ( !bScrollChildren )
{
- if ( nOrgFlags & SCROLL_NOCHILDREN )
+ if ( nOrgFlags & ScrollFlags::NoChildren )
ImplClipAllChildren( aInvalidateRegion );
else
ImplClipChildren( aInvalidateRegion );
@@ -1650,7 +1650,7 @@ void Window::ImplScroll( const Rectangle& rRect,
}
}
- if ( nFlags & SCROLL_UPDATE )
+ if ( nFlags & ScrollFlags::Update )
Update();
if ( mpWindowImpl->mpCursor )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 27b9f6976a42..297572e2eeca 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3095,16 +3095,16 @@ Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bo
return Rectangle( aPos, aSize );
}
-void Window::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags )
+void Window::Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
ImplScroll( Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
- nHorzScroll, nVertScroll, nFlags & ~SCROLL_CLIP );
+ nHorzScroll, nVertScroll, nFlags & ~ScrollFlags::Clip );
}
void Window::Scroll( long nHorzScroll, long nVertScroll,
- const Rectangle& rRect, sal_uInt16 nFlags )
+ const Rectangle& rRect, ScrollFlags nFlags )
{
OutputDevice *pOutDev = GetOutDev();