diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-21 13:51:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-22 10:37:59 +0200 |
commit | 321b34419160da6829e30fc67f3d107fcb936390 (patch) | |
tree | 56ba938925bf854233453b349894c0087bdce158 /vcl/source | |
parent | fc36c689cad5b76a3b256f19cf7caeaa9359560c (diff) |
convert TITLE_BUTTON constants to scoped enum
Change-Id: Ibfee4c394724570d9f64098d3703a08b7246ad2c
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 24 | ||||
-rw-r--r-- | vcl/source/window/dockwin.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 16 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 2 |
6 files changed, 32 insertions, 32 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 1229bbd7600d..ba281fd7070d 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -365,7 +365,7 @@ bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons if ( pBorderWindow->ImplGetClientWindow()->IsSystemWindow() ) { SystemWindow* pClientWindow = static_cast<SystemWindow*>(pBorderWindow->ImplGetClientWindow()); - pClientWindow->TitleButtonClick( TITLE_BUTTON_MENU ); + pClientWindow->TitleButtonClick( TitleButton::Menu ); } } else if ( pData->mnHitTest & BORDERWINDOW_HITTEST_HIDE ) @@ -416,7 +416,7 @@ bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons { SystemWindow* pClientWindow = static_cast<SystemWindow*>(pBorderWindow->ImplGetClientWindow()); if ( true /*pBorderWindow->mbDockBtn*/ ) // always perform docking on double click, no button required - pClientWindow->TitleButtonClick( TITLE_BUTTON_DOCKING ); + pClientWindow->TitleButtonClick( TitleButton::Docking ); else if ( pBorderWindow->GetStyle() & WB_ROLLABLE ) { if ( pClientWindow->IsRollUp() ) @@ -511,7 +511,7 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track if ( pBorderWindow->ImplGetClientWindow()->IsSystemWindow() ) { SystemWindow* pClientWindow = static_cast<SystemWindow*>(pBorderWindow->ImplGetClientWindow()); - pClientWindow->TitleButtonClick( TITLE_BUTTON_DOCKING ); + pClientWindow->TitleButtonClick( TitleButton::Docking ); } } } @@ -539,7 +539,7 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track if ( pBorderWindow->ImplGetClientWindow()->IsSystemWindow() ) { SystemWindow* pClientWindow = static_cast<SystemWindow*>(pBorderWindow->ImplGetClientWindow()); - pClientWindow->TitleButtonClick( TITLE_BUTTON_HIDE ); + pClientWindow->TitleButtonClick( TitleButton::Hide ); } } } diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 96b776c051ab..b9bfd03b3f84 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -61,7 +61,7 @@ public: virtual void Move() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; - virtual void TitleButtonClick( sal_uInt16 nButton ) SAL_OVERRIDE; + virtual void TitleButtonClick( TitleButton nButton ) SAL_OVERRIDE; virtual void Pin() SAL_OVERRIDE; virtual void Roll() SAL_OVERRIDE; virtual void PopupModeEnd() SAL_OVERRIDE; @@ -257,7 +257,7 @@ void ImplDockFloatWin2::Resize() } } -void ImplDockFloatWin2::TitleButtonClick( sal_uInt16 nButton ) +void ImplDockFloatWin2::TitleButtonClick( TitleButton nButton ) { FloatingWindow::TitleButtonClick( nButton ); mpDockWin->TitleButtonClick( nButton ); @@ -1061,9 +1061,9 @@ void ImplDockingWindowWrapper::ToggleFloatingMode() mbStartDockingEnabled = false; } -void ImplDockingWindowWrapper::TitleButtonClick( sal_uInt16 nType ) +void ImplDockingWindowWrapper::TitleButtonClick( TitleButton nType ) { - if( nType == TITLE_BUTTON_MENU ) + if( nType == TitleButton::Menu ) { ToolBox *pToolBox = dynamic_cast< ToolBox* >( GetWindow() ); if( pToolBox ) @@ -1071,7 +1071,7 @@ void ImplDockingWindowWrapper::TitleButtonClick( sal_uInt16 nType ) pToolBox->ExecuteCustomMenu(); } } - if( nType == TITLE_BUTTON_DOCKING ) + if( nType == TitleButton::Docking ) { SetFloatingMode( !IsFloatingMode() ); } @@ -1085,15 +1085,15 @@ void ImplDockingWindowWrapper::Resizing( Size& rSize ) pDockingWindow->Resizing( rSize ); } -void ImplDockingWindowWrapper::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) +void ImplDockingWindowWrapper::ShowTitleButton( TitleButton nButton, bool bVisible ) { if ( mpFloatWin ) mpFloatWin->ShowTitleButton( nButton, bVisible ); else { - if ( nButton == TITLE_BUTTON_DOCKING ) + if ( nButton == TitleButton::Docking ) mbDockBtn = bVisible; - else // if ( nButton == TITLE_BUTTON_HIDE ) + else // if ( nButton == TitleButton::Hide ) mbHideBtn = bVisible; } } @@ -1251,8 +1251,8 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() ); pWin->SetPosPixel( maFloatPos ); // pass on DockingData to FloatingWindow - pWin->ShowTitleButton( TITLE_BUTTON_DOCKING, mbDockBtn ); - pWin->ShowTitleButton( TITLE_BUTTON_HIDE, mbHideBtn ); + pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn ); + pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn ); pWin->SetPin( mbPinned ); if ( mbRollUp ) pWin->RollUp(); @@ -1275,8 +1275,8 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) // store FloatingData in FloatingWindow maFloatPos = mpFloatWin->GetPosPixel(); - mbDockBtn = mpFloatWin->IsTitleButtonVisible( TITLE_BUTTON_DOCKING ); - mbHideBtn = mpFloatWin->IsTitleButtonVisible( TITLE_BUTTON_HIDE ); + mbDockBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Docking ); + mbHideBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Hide ); mbPinned = mpFloatWin->IsPinned(); mbRollUp = mpFloatWin->IsRollUp(); maRollUpOutSize = mpFloatWin->GetRollUpOutputSizePixel(); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 37f23599525f..b8068c1c5e94 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -77,7 +77,7 @@ public: virtual void Move() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; - virtual void TitleButtonClick( sal_uInt16 nButton ) SAL_OVERRIDE; + virtual void TitleButtonClick( TitleButton nButton ) SAL_OVERRIDE; virtual void Pin() SAL_OVERRIDE; virtual void Roll() SAL_OVERRIDE; virtual void PopupModeEnd() SAL_OVERRIDE; @@ -219,7 +219,7 @@ void ImplDockFloatWin::Resize() mpDockWin->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), WINDOW_POSSIZE_POSSIZE ); } -void ImplDockFloatWin::TitleButtonClick( sal_uInt16 nButton ) +void ImplDockFloatWin::TitleButtonClick( TitleButton nButton ) { FloatingWindow::TitleButtonClick( nButton ); } @@ -829,8 +829,8 @@ void DockingWindow::SetFloatingMode( bool bFloatMode ) pWin->SetOutputSizePixel(aSize); pWin->SetPosPixel( maFloatPos ); // pass on DockingData to FloatingWindow - pWin->ShowTitleButton( TITLE_BUTTON_DOCKING, mbDockBtn ); - pWin->ShowTitleButton( TITLE_BUTTON_HIDE, mbHideBtn ); + pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn ); + pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn ); pWin->SetPin( mbPinned ); if ( mbRollUp ) pWin->RollUp(); @@ -858,8 +858,8 @@ void DockingWindow::SetFloatingMode( bool bFloatMode ) // store FloatingData in FloatingWindow maFloatPos = mpFloatWin->GetPosPixel(); - mbDockBtn = mpFloatWin->IsTitleButtonVisible( TITLE_BUTTON_DOCKING ); - mbHideBtn = mpFloatWin->IsTitleButtonVisible( TITLE_BUTTON_HIDE ); + mbDockBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Docking ); + mbHideBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Hide ); mbPinned = mpFloatWin->IsPinned(); mbRollUp = mpFloatWin->IsRollUp(); maRollUpOutSize = mpFloatWin->GetRollUpOutputSizePixel(); diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index e595f6f84769..34859d2e3b62 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -233,7 +233,7 @@ bool SystemWindow::Close() return true; } -void SystemWindow::TitleButtonClick( sal_uInt16 ) +void SystemWindow::TitleButtonClick( TitleButton ) { } @@ -309,9 +309,9 @@ bool SystemWindow::IsSaveBackgroundEnabled() const return false; } -void SystemWindow::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) +void SystemWindow::ShowTitleButton( TitleButton nButton, bool bVisible ) { - if ( nButton == TITLE_BUTTON_DOCKING ) + if ( nButton == TitleButton::Docking ) { if ( mbDockBtn != bVisible ) { @@ -320,7 +320,7 @@ void SystemWindow::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetDockButton( bVisible ); } } - else if ( nButton == TITLE_BUTTON_HIDE ) + else if ( nButton == TitleButton::Hide ) { if ( mbHideBtn != bVisible ) { @@ -329,7 +329,7 @@ void SystemWindow::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetHideButton( bVisible ); } } - else if ( nButton == TITLE_BUTTON_MENU ) + else if ( nButton == TitleButton::Menu ) { if ( mpWindowImpl->mpBorderWindow ) static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuButton( bVisible ); @@ -338,11 +338,11 @@ void SystemWindow::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) return; } -bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const +bool SystemWindow::IsTitleButtonVisible( TitleButton nButton ) const { - if ( nButton == TITLE_BUTTON_DOCKING ) + if ( nButton == TitleButton::Docking ) return mbDockBtn; - else /* if ( nButton == TITLE_BUTTON_HIDE ) */ + else /* if ( nButton == TitleButton::Hide ) */ return mbHideBtn; } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4034b8c6b11e..066a47c4a641 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -896,7 +896,7 @@ void ToolBox::ImplSetMinMaxFloatSize( ToolBox *pThis ) { pWrapper->SetMinOutputSizePixel( aMinSize ); pWrapper->SetMaxOutputSizePixel( aMaxSize ); - pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( pThis->GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE) != 0 ); + pWrapper->ShowTitleButton( TitleButton::Menu, ( pThis->GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE) != 0 ); } else { diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 7be0a18431d2..6504a42aaa08 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1743,7 +1743,7 @@ void ToolBox::SetMenuType( sal_uInt16 aType ) // the menu button may have to be moved into the decoration which changes the layout ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) - pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( aType & TOOLBOX_MENUTYPE_CUSTOMIZE) != 0 ); + pWrapper->ShowTitleButton( TitleButton::Menu, ( aType & TOOLBOX_MENUTYPE_CUSTOMIZE) != 0 ); mbFormat = true; ImplFormat(); |