summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-20 14:05:50 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-05-22 06:32:35 +0000
commite929194317a7debb1c5467282230cbbabe61a710 (patch)
tree89f7bfe3a00003c0fa96113b77abbf76c92f80bf /vcl/source
parentedcd1d5a9c88455fd1d52ab25815fc8d439f31ec (diff)
convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19 Reviewed-on: https://gerrit.libreoffice.org/15825 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/edit.cxx4
-rw-r--r--vcl/source/control/fixedhyper.cxx2
-rw-r--r--vcl/source/edit/vclmedit.cxx2
-rw-r--r--vcl/source/window/brdwin.cxx20
-rw-r--r--vcl/source/window/mouse.cxx6
-rw-r--r--vcl/source/window/scrwnd.cxx48
-rw-r--r--vcl/source/window/split.cxx4
-rw-r--r--vcl/source/window/splitwin.cxx12
-rw-r--r--vcl/source/window/toolbox.cxx18
-rw-r--r--vcl/source/window/winproc.cxx4
10 files changed, 60 insertions, 60 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 1cc602be1b51..1ab836427781 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -355,7 +355,7 @@ void Edit::ImplInit(vcl::Window* pParent, WinBits nStyle)
SetCursor( new vcl::Cursor );
- SetPointer( Pointer( POINTER_TEXT ) );
+ SetPointer( Pointer( PointerStyle::Text ) );
uno::Reference< datatransfer::dnd::XDragGestureListener> xDGL( mxDnDListener, uno::UNO_QUERY );
uno::Reference< datatransfer::dnd::XDragGestureRecognizer > xDGR = GetDragGestureRecognizer();
@@ -2712,7 +2712,7 @@ void Edit::SetSubEdit(Edit* pEdit)
if (mpSubEdit)
{
- SetPointer(POINTER_ARROW); // Nur das SubEdit hat den BEAM...
+ SetPointer(PointerStyle::Arrow); // Nur das SubEdit hat den BEAM...
mpSubEdit->mbIsSubEdit = true;
mpSubEdit->SetReadOnly(mbReadOnly);
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 74309848605a..4fb5af42c491 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -68,7 +68,7 @@ void FixedHyperlink::MouseMove( const MouseEvent& rMEvt )
{
// changes the pointer if the control is enabled and the mouse is over the text.
if ( !rMEvt.IsLeaveWindow() && IsEnabled() && ImplIsOverText(GetPointerPosPixel()) )
- SetPointer( POINTER_REFHAND );
+ SetPointer( PointerStyle::RefHand );
else
SetPointer( m_aOldPointer );
}
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 66ae92933be6..8f27b0334d29 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -713,7 +713,7 @@ TextWindow::TextWindow( vcl::Window* pParent ) : Window( pParent )
mbSelectOnTab = true;
mbTextSelectable = true;
- SetPointer( Pointer( POINTER_TEXT ) );
+ SetPointer( Pointer( PointerStyle::Text ) );
mpExtTextEngine = new ExtTextEngine;
mpExtTextEngine->SetMaxTextLen(EDIT_NOLIMIT);
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 0777ad34587a..5d19d6dd8cb8 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -296,23 +296,23 @@ bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous
Point aMousePos = rMEvt.GetPosPixel();
sal_uInt16 nHitTest = ImplHitTest( pData, aMousePos );
- PointerStyle ePtrStyle = POINTER_ARROW;
+ PointerStyle ePtrStyle = PointerStyle::Arrow;
if ( nHitTest & BORDERWINDOW_HITTEST_LEFT )
- ePtrStyle = POINTER_WINDOW_WSIZE;
+ ePtrStyle = PointerStyle::WindowWSize;
else if ( nHitTest & BORDERWINDOW_HITTEST_RIGHT )
- ePtrStyle = POINTER_WINDOW_ESIZE;
+ ePtrStyle = PointerStyle::WindowESize;
else if ( nHitTest & BORDERWINDOW_HITTEST_TOP )
- ePtrStyle = POINTER_WINDOW_NSIZE;
+ ePtrStyle = PointerStyle::WindowNSize;
else if ( nHitTest & BORDERWINDOW_HITTEST_BOTTOM )
- ePtrStyle = POINTER_WINDOW_SSIZE;
+ ePtrStyle = PointerStyle::WindowSSize;
else if ( nHitTest & BORDERWINDOW_HITTEST_TOPLEFT )
- ePtrStyle = POINTER_WINDOW_NWSIZE;
+ ePtrStyle = PointerStyle::WindowNWSize;
else if ( nHitTest & BORDERWINDOW_HITTEST_BOTTOMRIGHT )
- ePtrStyle = POINTER_WINDOW_SESIZE;
+ ePtrStyle = PointerStyle::WindowSESize;
else if ( nHitTest & BORDERWINDOW_HITTEST_TOPRIGHT )
- ePtrStyle = POINTER_WINDOW_NESIZE;
+ ePtrStyle = PointerStyle::WindowNESize;
else if ( nHitTest & BORDERWINDOW_HITTEST_BOTTOMLEFT )
- ePtrStyle = POINTER_WINDOW_SWSIZE;
+ ePtrStyle = PointerStyle::WindowSWSize;
else if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE )
pData->mnCloseState |= DrawButtonFlags::Highlight;
else if ( nHitTest & BORDERWINDOW_HITTEST_MENU )
@@ -746,7 +746,7 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
if ( pData->mnHitTest & BORDERWINDOW_HITTEST_TITLE )
{
- pData->mpBorderWindow->SetPointer( Pointer( POINTER_MOVE ) );
+ pData->mpBorderWindow->SetPointer( Pointer( PointerStyle::Move ) );
Point aPos = pBorderWindow->GetPosPixel();
aPos.X() += aMousePos.X();
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 6dd6014f0df8..6aabd81653f2 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -98,7 +98,7 @@ PointerStyle Window::ImplGetMousePointer() const
if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() )
ePointerStyle = GetPointer().GetStyle();
else
- ePointerStyle = POINTER_ARROW;
+ ePointerStyle = PointerStyle::Arrow;
const vcl::Window* pWindow = this;
do
@@ -106,13 +106,13 @@ PointerStyle Window::ImplGetMousePointer() const
// when the pointer is not visible stop the search, as
// this status should not be overwritten
if ( pWindow->mpWindowImpl->mbNoPtrVisible )
- return POINTER_NULL;
+ return PointerStyle::Null;
if ( !bWait )
{
if ( pWindow->mpWindowImpl->mnWaitCount )
{
- ePointerStyle = POINTER_WAIT;
+ ePointerStyle = PointerStyle::Wait;
bWait = true;
}
else
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index da613bd330ae..8ddc748891e7 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -246,11 +246,11 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY )
if( mnActDist < WHEEL_RADIUS )
{
if( bHorz && bVert )
- eStyle = POINTER_AUTOSCROLL_NSWE;
+ eStyle = PointerStyle::AutoScrollNSWE;
else if( bHorz )
- eStyle = POINTER_AUTOSCROLL_WE;
+ eStyle = PointerStyle::AutoScrollWE;
else
- eStyle = POINTER_AUTOSCROLL_NS;
+ eStyle = PointerStyle::AutoScrollNS;
}
else
{
@@ -262,40 +262,40 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY )
if( bHorz && bVert )
{
if( fAngle >= 22.5 && fAngle <= 67.5 )
- eStyle = POINTER_AUTOSCROLL_NE;
+ eStyle = PointerStyle::AutoScrollNE;
else if( fAngle >= 67.5 && fAngle <= 112.5 )
- eStyle = POINTER_AUTOSCROLL_N;
+ eStyle = PointerStyle::AutoScrollN;
else if( fAngle >= 112.5 && fAngle <= 157.5 )
- eStyle = POINTER_AUTOSCROLL_NW;
+ eStyle = PointerStyle::AutoScrollNW;
else if( fAngle >= 157.5 && fAngle <= 202.5 )
- eStyle = POINTER_AUTOSCROLL_W;
+ eStyle = PointerStyle::AutoScrollW;
else if( fAngle >= 202.5 && fAngle <= 247.5 )
- eStyle = POINTER_AUTOSCROLL_SW;
+ eStyle = PointerStyle::AutoScrollSW;
else if( fAngle >= 247.5 && fAngle <= 292.5 )
- eStyle = POINTER_AUTOSCROLL_S;
+ eStyle = PointerStyle::AutoScrollS;
else if( fAngle >= 292.5 && fAngle <= 337.5 )
- eStyle = POINTER_AUTOSCROLL_SE;
+ eStyle = PointerStyle::AutoScrollSE;
else
- eStyle = POINTER_AUTOSCROLL_E;
+ eStyle = PointerStyle::AutoScrollE;
}
else if( bHorz )
{
if( fAngle >= 270. || fAngle <= 90. )
- eStyle = POINTER_AUTOSCROLL_E;
+ eStyle = PointerStyle::AutoScrollE;
else
- eStyle = POINTER_AUTOSCROLL_W;
+ eStyle = PointerStyle::AutoScrollW;
}
else
{
if( fAngle >= 0. && fAngle <= 180. )
- eStyle = POINTER_AUTOSCROLL_N;
+ eStyle = PointerStyle::AutoScrollN;
else
- eStyle = POINTER_AUTOSCROLL_S;
+ eStyle = PointerStyle::AutoScrollS;
}
}
}
else
- eStyle = POINTER_ARROW;
+ eStyle = PointerStyle::Arrow;
return eStyle;
}
@@ -325,14 +325,14 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt )
{
switch( eActStyle )
{
- case( POINTER_AUTOSCROLL_N ): mnActDeltaX = +0L, mnActDeltaY = +1L; break;
- case( POINTER_AUTOSCROLL_S ): mnActDeltaX = +0L, mnActDeltaY = -1L; break;
- case( POINTER_AUTOSCROLL_W ): mnActDeltaX = +1L, mnActDeltaY = +0L; break;
- case( POINTER_AUTOSCROLL_E ): mnActDeltaX = -1L, mnActDeltaY = +0L; break;
- case( POINTER_AUTOSCROLL_NW ): mnActDeltaX = +1L, mnActDeltaY = +1L; break;
- case( POINTER_AUTOSCROLL_NE ): mnActDeltaX = -1L, mnActDeltaY = +1L; break;
- case( POINTER_AUTOSCROLL_SW ): mnActDeltaX = +1L, mnActDeltaY = -1L; break;
- case( POINTER_AUTOSCROLL_SE ): mnActDeltaX = -1L, mnActDeltaY = -1L; break;
+ case( PointerStyle::AutoScrollN ): mnActDeltaX = +0L, mnActDeltaY = +1L; break;
+ case( PointerStyle::AutoScrollS ): mnActDeltaX = +0L, mnActDeltaY = -1L; break;
+ case( PointerStyle::AutoScrollW ): mnActDeltaX = +1L, mnActDeltaY = +0L; break;
+ case( PointerStyle::AutoScrollE ): mnActDeltaX = -1L, mnActDeltaY = +0L; break;
+ case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1L, mnActDeltaY = +1L; break;
+ case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1L, mnActDeltaY = +1L; break;
+ case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1L, mnActDeltaY = -1L; break;
+ case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1L, mnActDeltaY = -1L; break;
default:
break;
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 026b40fbbbb2..6c97de76aa5c 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -74,12 +74,12 @@ void Splitter::ImplInitHorVer(bool bNew)
if ( mbHorzSplit )
{
- ePointerStyle = POINTER_HSPLIT;
+ ePointerStyle = PointerStyle::HSplit;
SetSizePixel( Size( rSettings.GetSplitSize(), rSettings.GetScrollBarSize() ) );
}
else
{
- ePointerStyle = POINTER_VSPLIT;
+ ePointerStyle = PointerStyle::VSplit;
SetSizePixel( Size( rSettings.GetScrollBarSize(), rSettings.GetSplitSize() ) );
}
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index ac4ca2a3a68e..55108d670cf9 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2184,11 +2184,11 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
}
mnMStartPos = mnMSplitPos;
- PointerStyle eStyle = POINTER_ARROW;
+ PointerStyle eStyle = PointerStyle::Arrow;
if ( mnSplitTest & SPLIT_HORZ )
- eStyle = POINTER_HSPLIT;
+ eStyle = PointerStyle::HSplit;
else if ( mnSplitTest & SPLIT_VERT )
- eStyle = POINTER_VSPLIT;
+ eStyle = PointerStyle::VSplit;
Pointer aPtr( eStyle );
SetPointer( aPtr );
@@ -2286,7 +2286,7 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
ImplSplitSet* pTempSplitSet;
sal_uInt16 nTempSplitPos;
sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
- PointerStyle eStyle = POINTER_ARROW;
+ PointerStyle eStyle = PointerStyle::Arrow;
Rectangle aAutoHideRect;
Rectangle aFadeInRect;
Rectangle aFadeOutRect;
@@ -2301,9 +2301,9 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
if ( nSplitTest && !(nSplitTest & SPLIT_NOSPLIT) )
{
if ( nSplitTest & SPLIT_HORZ )
- eStyle = POINTER_HSPLIT;
+ eStyle = PointerStyle::HSplit;
else if ( nSplitTest & SPLIT_VERT )
- eStyle = POINTER_VSPLIT;
+ eStyle = PointerStyle::VSplit;
}
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 09d5403ad63a..4034b8c6b11e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1395,7 +1395,7 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
mbChangingHighlight = false;
meButtonType = ButtonType::SYMBOLONLY;
meAlign = WINDOWALIGN_TOP;
- meLastStyle = POINTER_ARROW;
+ meLastStyle = PointerStyle::Arrow;
mnWinStyle = nStyle;
meLayoutMode = TBX_LAYOUT_NORMAL;
mnLastFocusItemId = 0;
@@ -3666,12 +3666,12 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
return;
}
- PointerStyle eStyle = POINTER_ARROW;
+ PointerStyle eStyle = PointerStyle::Arrow;
// change mouse cursor over drag area
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( pWrapper && pWrapper->GetDragArea().IsInside( rMEvt.GetPosPixel() ) )
- eStyle = POINTER_MOVE;
+ eStyle = PointerStyle::Move;
if ( (mnWinStyle & TB_WBLINESIZING) == TB_WBLINESIZING )
{
@@ -3681,21 +3681,21 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if ( nLinePtr & DOCK_LINEHSIZE )
{
if ( meAlign == WINDOWALIGN_LEFT )
- eStyle = POINTER_WINDOW_ESIZE;
+ eStyle = PointerStyle::WindowESize;
else
- eStyle = POINTER_WINDOW_WSIZE;
+ eStyle = PointerStyle::WindowWSize;
}
else if ( nLinePtr & DOCK_LINEVSIZE )
{
if ( meAlign == WINDOWALIGN_TOP )
- eStyle = POINTER_WINDOW_SSIZE;
+ eStyle = PointerStyle::WindowSSize;
else
- eStyle = POINTER_WINDOW_NSIZE;
+ eStyle = PointerStyle::WindowNSize;
}
}
}
- if ( (eStyle == POINTER_ARROW) && mbCustomizeMode )
+ if ( (eStyle == PointerStyle::Arrow) && mbCustomizeMode )
{
// search the item which was clicked
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
@@ -3707,7 +3707,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if ( it->maRect.IsInside( aMousePos ) )
{
if ( it->maRect.Right()-TB_RESIZE_OFFSET <= aMousePos.X() )
- eStyle = POINTER_HSIZEBAR;
+ eStyle = PointerStyle::HSizeBar;
break;
}
}
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index ccbbb620fc61..d314ebd112ae 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -86,7 +86,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo
{
if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp )
ImplDestroyHelpWindow( true );
- pChild->ImplGetFrame()->SetPointer( POINTER_ARROW );
+ pChild->ImplGetFrame()->SetPointer( PointerStyle::Arrow );
return true;
}
}
@@ -191,7 +191,7 @@ static void ImplSetMousePointer( vcl::Window* pChild )
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maHelpData.mbExtHelpMode )
- pChild->ImplGetFrame()->SetPointer( POINTER_HELP );
+ pChild->ImplGetFrame()->SetPointer( PointerStyle::Help );
else
pChild->ImplGetFrame()->SetPointer( pChild->ImplGetMousePointer() );
}