diff options
26 files changed, 72 insertions, 65 deletions
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index c57676d67b5b..4dd4fff2268d 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -807,7 +807,7 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel(); m_aSizingRect = m_pSizingWin->getSizingRect(aMousePos,m_aOutputSize); Update(); - ShowTracking( m_aSizingRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW ); + ShowTracking( m_aSizingRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } } } @@ -1072,7 +1072,7 @@ void OJoinTableView::ScrollWhileDragging() // redraw DraggingRect m_aDragRect = Rectangle(m_ptPrevDraggingPos - m_aDragOffset, m_pDragWin->GetSizePixel()); Update(); - ShowTracking( m_aDragRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW ); + ShowTracking( m_aDragRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } IMPL_LINK_NOARG_TYPED(OJoinTableView, OnDragScrollTimer, Idle *, void) diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 50d15e8cb188..f55eb08ba21c 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -277,13 +277,20 @@ namespace o3tl } // Flags for ShowTracking() -#define SHOWTRACK_SMALL ((sal_uInt16)0x0001) -#define SHOWTRACK_BIG ((sal_uInt16)0x0002) -#define SHOWTRACK_SPLIT ((sal_uInt16)0x0003) -#define SHOWTRACK_OBJECT ((sal_uInt16)0x0004) -#define SHOWTRACK_WINDOW ((sal_uInt16)0x1000) -#define SHOWTRACK_CLIP ((sal_uInt16)0x2000) -#define SHOWTRACK_STYLE ((sal_uInt16)0x000F) +enum class ShowTrackFlags { + NONE = 0x0000, + Small = 0x0001, + Big = 0x0002, + Split = 0x0003, + Object = 0x0004, + StyleMask = 0x000F, + TrackWindow = 0x1000, + Clip = 0x2000, +}; +namespace o3tl +{ + template<> struct typed_flags<ShowTrackFlags> : is_typed_flags<ShowTrackFlags, 0x300a> {}; +} // Flags for StartTracking() enum class StartTrackingFlags @@ -1187,11 +1194,11 @@ public: void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, Color* pSelectionTextColor, Color* pPaintColor ); void ShowTracking( const Rectangle& rRect, - sal_uInt16 nFlags = SHOWTRACK_SMALL ); + ShowTrackFlags nFlags = ShowTrackFlags::Small ); void HideTracking(); void InvertTracking( const Rectangle& rRect, - sal_uInt16 nFlags = SHOWTRACK_SMALL ); - void InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags = 0 ); + ShowTrackFlags nFlags = ShowTrackFlags::Small ); + void InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags = ShowTrackFlags::NONE ); void StartTracking( StartTrackingFlags nFlags = StartTrackingFlags::NONE ); void EndTracking( TrackingEventFlags nFlags = TrackingEventFlags::NONE ); diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 514cd469245f..10ac5464cc4e 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -1351,7 +1351,7 @@ void ScCsvGrid::ImplDrawTrackingRect( sal_uInt32 nColIndex ) sal_Int32 nX1 = std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1; sal_Int32 nX2 = std::min( GetColumnX( nColIndex + 1 ) - sal_Int32( 1 ), GetLastX() ); sal_Int32 nY2 = std::min( GetY( GetLastVisLine() + 1 ), GetHeight() ) - 1; - InvertTracking( Rectangle( nX1, 0, nX2, nY2 ), SHOWTRACK_SMALL | SHOWTRACK_WINDOW ); + InvertTracking( Rectangle( nX1, 0, nX2, nY2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } } diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index f26827417ce1..17ac609a9eb1 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -640,7 +640,7 @@ void ScCsvRuler::ImplDrawTrackingRect() { if( HasFocus() ) InvertTracking( Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ), - SHOWTRACK_SMALL | SHOWTRACK_WINDOW ); + ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } void ScCsvRuler::ImplSetMousePointer( sal_Int32 nPos ) diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index 721f7285d68b..57b1feacfbc6 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -578,7 +578,7 @@ void ScOutlineWindow::ShowFocus() bool bClip = (mnFocusEntry != SC_OL_HEADERENTRY); if ( bClip ) SetEntryAreaClipRegion(); - InvertTracking( maFocusRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW ); + InvertTracking( maFocusRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); if ( bClip ) SetClipRegion(); } @@ -593,7 +593,7 @@ void ScOutlineWindow::HideFocus() bool bClip = (mnFocusEntry != SC_OL_HEADERENTRY); if ( bClip ) SetEntryAreaClipRegion(); - InvertTracking( maFocusRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW ); + InvertTracking( maFocusRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); if ( bClip ) SetClipRegion(); maFocusRect.SetEmpty(); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index c4b9f5758e16..917daa212afa 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -451,7 +451,7 @@ void ViewShell::DrawMarkRect(const Rectangle& rRect) const { if (mpContentWindow.get() != nullptr) { - mpContentWindow->InvertTracking(rRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW); + mpContentWindow->InvertTracking(rRect, ShowTrackFlags::Object | ShowTrackFlags::TrackWindow); } } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index e9a6fc57860b..1b7fe46e6de5 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -304,7 +304,7 @@ void SmGraphicWindow::ShowCursor(bool bShow) bool bInvert = bShow != IsCursorVisible(); if (bInvert) - InvertTracking(aCursorRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW); + InvertTracking(aCursorRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow); SetIsCursorVisible(bShow); } diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx index c3729d7bb966..5f957b93d9b5 100644 --- a/svtools/inc/table/tablecontrolinterface.hxx +++ b/svtools/inc/table/tablecontrolinterface.hxx @@ -230,7 +230,7 @@ namespace svt { namespace table virtual long pixelWidthToAppFont( long const i_pixels ) const = 0; /// shows a tracking rectangle - virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) = 0; + virtual void showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) = 0; /// hides a prviously shown tracking rectangle virtual void hideTracking() = 0; diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 3625d24af2b4..45fa1c448e79 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -1422,7 +1422,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt ) // draw new auxiliary line pDataWin->ShowTracking( Rectangle( Point( nDragX, 0 ), Size( 1, pDataWin->GetSizePixel().Height() ) ), - SHOWTRACK_SPLIT|SHOWTRACK_WINDOW ); + ShowTrackFlags::Split|ShowTrackFlags::TrackWindow ); } } diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index e22acfe95d33..68c7d9404f54 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -341,7 +341,7 @@ void SvSimpleTable::HBarStartDrag() SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); - ShowTracking( aSizeRect, SHOWTRACK_SPLIT ); + ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } void SvSimpleTable::HBarDrag() @@ -353,7 +353,7 @@ void SvSimpleTable::HBarDrag() SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); - ShowTracking( aSizeRect, SHOWTRACK_SPLIT ); + ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } void SvSimpleTable::HBarEndDrag() diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index b3281241d23d..c7ffa20a97d0 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -690,7 +690,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, bool bCommand ) else { Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); - ShowTracking( aSizeRect, SHOWTRACK_SPLIT ); + ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } else @@ -797,7 +797,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) else { Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); - ShowTracking( aSizeRect, SHOWTRACK_SPLIT ); + ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index 3d88c1574e85..676b9791dab6 100644 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -74,7 +74,7 @@ namespace svt { namespace table Point( aPoint.X(), 0 ), Size( 1, tableSize.Height() ) ), - SHOWTRACK_SPLIT | SHOWTRACK_WINDOW + ShowTrackFlags::Split | ShowTrackFlags::TrackWindow ); (void)i_event; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index f2efd758fa49..b8eb95c5bf7b 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1826,7 +1826,7 @@ namespace svt { namespace table } - void TableControl_Impl::showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) + void TableControl_Impl::showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) { m_pDataWindow->ShowTracking( i_location, i_flags ); } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 28ddc6b89800..cecbe4a0d947 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -258,7 +258,7 @@ namespace svt { namespace table virtual void invalidate( TableArea const i_what ) override; virtual long pixelWidthToAppFont( long const i_pixels ) const override; virtual void hideTracking() override; - virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) override; + virtual void showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) override; RowPos getRowAtPoint( const Point& rPoint ) const; ColPos getColAtPoint( const Point& rPoint ) const; virtual TableCell hitTest( const Point& rPoint ) const override; diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index ecd0ebf47626..9f5e9cfe752a 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -689,7 +689,7 @@ void FrameSelectorImpl::DrawAllTrackingRects() aPPoly.Optimize(PolyOptimizeFlags::CLOSE); for(sal_uInt16 nIdx = 0, nCount = aPPoly.Count(); nIdx < nCount; ++nIdx) - mrFrameSel.InvertTracking(aPPoly.GetObject(nIdx), SHOWTRACK_SMALL | SHOWTRACK_WINDOW); + mrFrameSel.InvertTracking(aPPoly.GetObject(nIdx), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow); } Point FrameSelectorImpl::GetDevPosFromMousePos( const Point& rMousePos ) const diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 38d59412bee6..efe4de316bd3 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1587,7 +1587,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) pEditWin->InvertTracking( Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight)), - SHOWTRACK_SPLIT | SHOWTRACK_CLIP ); + ShowTrackFlags::Split | ShowTrackFlags::Clip ); } if( nNew & 1 ) { @@ -1599,7 +1599,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) pEditWin->InvertTracking( Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight) ), - SHOWTRACK_CLIP | SHOWTRACK_SPLIT ); + ShowTrackFlags::Clip | ShowTrackFlags::Split ); } } else @@ -1611,7 +1611,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) pEditWin->InvertTracking( Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X() + nWidth, lTabPosition)), - SHOWTRACK_SPLIT | SHOWTRACK_CLIP ); + ShowTrackFlags::Split | ShowTrackFlags::Clip ); } if(nNew & 1) @@ -1624,7 +1624,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) pEditWin->InvertTracking( Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X()+nWidth, lTabPosition)), - SHOWTRACK_CLIP | SHOWTRACK_SPLIT ); + ShowTrackFlags::Clip | ShowTrackFlags::Split ); } } } diff --git a/vcl/inc/window.h b/vcl/inc/window.h index a883f7cdf217..701ad431dd44 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -94,7 +94,7 @@ struct ImplWinData long mnCompositionCharRects; Rectangle* mpFocusRect; Rectangle* mpTrackRect; - sal_uInt16 mnTrackFlags; + ShowTrackFlags mnTrackFlags; sal_uInt16 mnIsTopWindow; bool mbMouseOver; //< tracks mouse over for native widget paint effect bool mbEnableNativeWidget; //< toggle native widget rendering diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 006b3753b15b..57f7e0c892b3 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1251,7 +1251,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) { maFrameData.mnTrackX = aPos.X(); maFrameData.mnTrackY = aPos.Y(); - pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), SHOWTRACK_BIG ); + pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big ); } } else @@ -1362,7 +1362,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) maFrameData.mnTrackY = aNewRect.Top(); maFrameData.mnTrackWidth = aNewRect.GetWidth(); maFrameData.mnTrackHeight = aNewRect.GetHeight(); - pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), SHOWTRACK_BIG ); + pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big ); } } } diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 7e9172fd9481..1b8ef138bc6a 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -129,7 +129,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockTimerHdl, Idle *, void) } else { - mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); + mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow ); maDockIdle.Start(); } } @@ -209,7 +209,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockingHdl, void*, void) // indicates that the window could be docked at maDockRect maDockRect.SetPos( mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ScreenToOutputPixel( maDockRect.TopLeft() ) ); - mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); + mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow ); maEndDockIdle.Stop(); DockTimerHdl( nullptr ); } @@ -949,11 +949,11 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) mbLastFloatMode = bFloatMode; } - sal_uInt16 nTrackStyle; + ShowTrackFlags nTrackStyle; if ( bFloatMode ) - nTrackStyle = SHOWTRACK_OBJECT; + nTrackStyle = ShowTrackFlags::Object; else - nTrackStyle = SHOWTRACK_BIG; + nTrackStyle = ShowTrackFlags::Big; Rectangle aShowTrackRect = aTrackRect; aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) ); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index aad8795d44e1..984d713959f6 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -148,7 +148,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockTimerHdl, Idle *, void) } else { - mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); + mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow ); maDockIdle.Start(); } } @@ -176,7 +176,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockingHdl, void*, void) bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); if( ! bFloatMode ) { - mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW ); + mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Object | ShowTrackFlags::TrackWindow ); DockTimerHdl( nullptr ); } else @@ -583,11 +583,11 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) } else { - sal_uInt16 nTrackStyle; + ShowTrackFlags nTrackStyle; if ( bFloatMode ) - nTrackStyle = SHOWTRACK_BIG; + nTrackStyle = ShowTrackFlags::Big; else - nTrackStyle = SHOWTRACK_OBJECT; + nTrackStyle = ShowTrackFlags::Object; Rectangle aShowTrackRect = aTrackRect; aShowTrackRect.SetPos( ImplFrameToOutput( aShowTrackRect.TopLeft() ) ); ShowTracking( aShowTrackRect, nTrackStyle ); diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 516b6ed7e9fc..19cdc7334cbc 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -178,7 +178,7 @@ IMPL_LINK_NOARG_TYPED(Window, ImplGenerateMouseMoveHdl, void*, void) void Window::ImplInvertFocus( const Rectangle& rRect ) { - InvertTracking( rRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW ); + InvertTracking( rRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } static bool IsWindowFocused(const WindowImpl& rWinImpl) diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index fc94b76c5fda..789dac60e858 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -551,7 +551,7 @@ PaintHelper::~PaintHelper() } } - if ( pWindowImpl->mpWinData && pWindowImpl->mbTrackVisible && (pWindowImpl->mpWinData->mnTrackFlags & SHOWTRACK_WINDOW) ) + if ( pWindowImpl->mpWinData && pWindowImpl->mbTrackVisible && (pWindowImpl->mpWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) ) /* #98602# need to invert the tracking rect AFTER * the children have painted */ @@ -1618,7 +1618,7 @@ void Window::ImplScroll( const Rectangle& rRect, { if ( mpWindowImpl->mbFocusVisible ) ImplInvertFocus( *(mpWindowImpl->mpWinData->mpFocusRect) ); - if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & SHOWTRACK_WINDOW) ) + if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) ) InvertTracking( *(mpWindowImpl->mpWinData->mpTrackRect), mpWindowImpl->mpWinData->mnTrackFlags ); } #ifndef IOS @@ -1654,7 +1654,7 @@ void Window::ImplScroll( const Rectangle& rRect, { if ( mpWindowImpl->mbFocusVisible ) ImplInvertFocus( *(mpWindowImpl->mpWinData->mpFocusRect) ); - if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & SHOWTRACK_WINDOW) ) + if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) ) InvertTracking( *(mpWindowImpl->mpWinData->mpTrackRect), mpWindowImpl->mpWinData->mnTrackFlags ); } } diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index a39f30bc81e8..d2590cacd6c8 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -136,7 +136,7 @@ void Splitter::ImplDrawSplitter() aInvRect.Bottom() = maDragPos.Y() + 1; } - mpRefWin->InvertTracking( mpRefWin->PixelToLogic(aInvRect), SHOWTRACK_SPLIT ); + mpRefWin->InvertTracking( mpRefWin->PixelToLogic(aInvRect), ShowTrackFlags::Split ); } Splitter::Splitter( vcl::Window* pParent, WinBits nStyle ) : diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index b19c625de95f..108251ca1f4c 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -1295,7 +1295,7 @@ void SplitWindow::ImplDrawSplitTracking(const Point& rPos) aRect.Bottom() += SPLITWIN_SPLITSIZEEXLN; } } - ShowTracking(aRect, SHOWTRACK_SPLIT); + ShowTracking(aRect, ShowTrackFlags::Split); } void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index de678c506131..695967ad3ab4 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -749,7 +749,7 @@ ImplWinData::ImplWinData() : mpCompositionCharRects(nullptr), mpFocusRect(nullptr), mpTrackRect(nullptr), - mnTrackFlags(0), + mnTrackFlags(ShowTrackFlags::NONE), mnIsTopWindow((sal_uInt16) ~0), // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) mbMouseOver(false) { diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index d38603f9467c..2b9b5e6e7dc6 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -127,11 +127,11 @@ void Window::HideFocus() mpWindowImpl->mbInHideFocus = false; } -void Window::ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags ) +void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags ) { ImplWinData* pWinData = ImplGetWinData(); - if ( !mpWindowImpl->mbInPaint || !(nFlags & SHOWTRACK_WINDOW) ) + if ( !mpWindowImpl->mbInPaint || !(nFlags & ShowTrackFlags::TrackWindow) ) { if ( mpWindowImpl->mbTrackVisible ) { @@ -158,13 +158,13 @@ void Window::HideTracking() if ( mpWindowImpl->mbTrackVisible ) { ImplWinData* pWinData = ImplGetWinData(); - if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & SHOWTRACK_WINDOW) ) + if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) ) InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags ); mpWindowImpl->mbTrackVisible = false; } } -void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) +void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags ) { OutputDevice *pOutDev = GetOutDev(); Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) ); @@ -175,7 +175,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) SalGraphics* pGraphics; - if ( nFlags & SHOWTRACK_WINDOW ) + if ( nFlags & ShowTrackFlags::TrackWindow ) { if ( !IsDeviceOutputNecessary() ) return; @@ -199,7 +199,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) { pGraphics = ImplGetFrameGraphics(); - if ( nFlags & SHOWTRACK_CLIP ) + if ( nFlags & ShowTrackFlags::Clip ) { Point aPoint( mnOutOffX, mnOutOffY ); vcl::Region aRegion( Rectangle( aPoint, @@ -209,15 +209,15 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) } } - sal_uInt16 nStyle = nFlags & SHOWTRACK_STYLE; - if ( nStyle == SHOWTRACK_OBJECT ) + ShowTrackFlags nStyle = nFlags & ShowTrackFlags::StyleMask; + if ( nStyle == ShowTrackFlags::Object ) pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::TrackFrame, this ); - else if ( nStyle == SHOWTRACK_SPLIT ) + else if ( nStyle == ShowTrackFlags::Split ) pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::N50, this ); else { long nBorder = 1; - if ( nStyle == SHOWTRACK_BIG ) + if ( nStyle == ShowTrackFlags::Big ) nBorder = 5; pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), nBorder, SalInvert::N50, this ); pGraphics->Invert( aRect.Left(), aRect.Bottom()-nBorder+1, aRect.GetWidth(), nBorder, SalInvert::N50, this ); @@ -226,7 +226,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) } } -void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags ) +void Window::InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags ) { sal_uInt16 nPoints = rPoly.GetSize(); @@ -239,7 +239,7 @@ void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags ) SalGraphics* pGraphics; - if ( nFlags & SHOWTRACK_WINDOW ) + if ( nFlags & ShowTrackFlags::TrackWindow ) { if ( !IsDeviceOutputNecessary() ) return; @@ -263,7 +263,7 @@ void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags ) { pGraphics = ImplGetFrameGraphics(); - if ( nFlags & SHOWTRACK_CLIP ) + if ( nFlags & ShowTrackFlags::Clip ) { Point aPoint( mnOutOffX, mnOutOffY ); vcl::Region aRegion( Rectangle( aPoint, |