summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-06 13:26:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-07 07:10:39 +0000
commit2d48f5fc0a4f7b5b8c9d3a4f4cc85d5f3a7e5053 (patch)
treec2e18df7dd44255e98c91f242194fd9bb66f3f3e /vcl/source/window
parented80d28d9f019a1afa2edd66e115eae26ea19963 (diff)
convert VCLEVENT constants to scoped enum
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba Reviewed-on: https://gerrit.libreoffice.org/31675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/accessibility.cxx2
-rw-r--r--vcl/source/window/dialog.cxx2
-rw-r--r--vcl/source/window/dndeventdispatcher.cxx2
-rw-r--r--vcl/source/window/dockmgr.cxx12
-rw-r--r--vcl/source/window/dockwin.cxx2
-rw-r--r--vcl/source/window/event.cxx28
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/menu.cxx34
-rw-r--r--vcl/source/window/menubarwindow.cxx16
-rw-r--r--vcl/source/window/menufloatingwindow.cxx14
-rw-r--r--vcl/source/window/paint.cxx2
-rw-r--r--vcl/source/window/settings.cxx2
-rw-r--r--vcl/source/window/stacking.cxx4
-rw-r--r--vcl/source/window/status.cxx18
-rw-r--r--vcl/source/window/syswin.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx12
-rw-r--r--vcl/source/window/toolbox2.cxx50
-rw-r--r--vcl/source/window/window.cxx30
-rw-r--r--vcl/source/window/winproc.cxx10
19 files changed, 124 insertions, 124 deletions
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index ab2ac82bee85..0d0b21b60d8e 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -439,7 +439,7 @@ void Window::SetAccessibleName( const OUString& rName )
delete mpWindowImpl->mpAccessibleInfos->pAccessibleName;
mpWindowImpl->mpAccessibleInfos->pAccessibleName = new OUString( rName );
- CallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldName );
+ CallEventListeners( VclEventId::WindowFrameTitleChanged, &oldName );
}
OUString Window::GetAccessibleName() const
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 688cfb5116e5..1b789020c6ed 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -719,7 +719,7 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt )
bool Dialog::Close()
{
VclPtr<vcl::Window> xWindow = this;
- CallEventListeners( VCLEVENT_WINDOW_CLOSE );
+ CallEventListeners( VclEventId::WindowClose );
if ( xWindow->IsDisposed() )
return false;
diff --git a/vcl/source/window/dndeventdispatcher.cxx b/vcl/source/window/dndeventdispatcher.cxx
index c9c5aa607463..e02d8fc0e8fd 100644
--- a/vcl/source/window/dndeventdispatcher.cxx
+++ b/vcl/source/window/dndeventdispatcher.cxx
@@ -70,7 +70,7 @@ vcl::Window* DNDEventDispatcher::findTopLevelWindow(Point location)
IMPL_LINK(DNDEventDispatcher, WindowEventListener, VclWindowEvent&, rEvent, void)
{
- if (rEvent.GetId() == VCLEVENT_OBJECT_DYING)
+ if (rEvent.GetId() == VclEventId::ObjectDying)
{
designate_currentwindow(nullptr);
}
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 1467df89f029..7f32e74a9a8d 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -918,7 +918,7 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe
{
DockingData data( rPoint, rRect, IsFloatingMode() );
- GetWindow()->CallEventListeners( VCLEVENT_WINDOW_STARTDOCKING, &data );
+ GetWindow()->CallEventListeners( VclEventId::WindowStartDocking, &data );
mbDocking = true;
}
@@ -926,7 +926,7 @@ bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
{
DockingData data( rPoint, rRect, IsFloatingMode() );
- GetWindow()->CallEventListeners( VCLEVENT_WINDOW_DOCKING, &data );
+ GetWindow()->CallEventListeners( VclEventId::WindowDocking, &data );
rRect = data.maTrackRect;
return data.mbFloating;
}
@@ -966,7 +966,7 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMo
}
EndDockingData data( aRect, IsFloatingMode(), IsDockingCanceled() );
- GetWindow()->CallEventListeners( VCLEVENT_WINDOW_ENDDOCKING, &data );
+ GetWindow()->CallEventListeners( VclEventId::WindowEndDocking, &data );
mbDocking = false;
@@ -979,7 +979,7 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMo
bool ImplDockingWindowWrapper::PrepareToggleFloatingMode()
{
bool bFloating = true;
- GetWindow()->CallEventListeners( VCLEVENT_WINDOW_PREPARETOGGLEFLOATING, &bFloating );
+ GetWindow()->CallEventListeners( VclEventId::WindowPrepareToggleFloating, &bFloating );
return bFloating;
}
@@ -992,7 +992,7 @@ void ImplDockingWindowWrapper::ToggleFloatingMode()
static_cast<DockingWindow*>(GetWindow())->ToggleFloatingMode();
// now notify listeners
- GetWindow()->CallEventListeners( VCLEVENT_WINDOW_TOGGLEFLOATING );
+ GetWindow()->CallEventListeners( VclEventId::WindowToggleFloating );
// must be enabled in Window::Notify to prevent permanent docking during mouse move
mbStartDockingEnabled = false;
@@ -1128,7 +1128,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, void)
mpFloatWin.disposeAndClear();
// call handler - which will destroy the window and thus the wrapper as well !
- GetWindow()->CallEventListeners( VCLEVENT_WINDOW_ENDPOPUPMODE, &aData );
+ GetWindow()->CallEventListeners( VclEventId::WindowEndPopupMode, &aData );
}
bool ImplDockingWindowWrapper::IsInPopupMode() const
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index fe8492850299..67c67c0a7a3d 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -626,7 +626,7 @@ bool DockingWindow::PrepareToggleFloatingMode()
bool DockingWindow::Close()
{
VclPtr<vcl::Window> xWindow = this;
- CallEventListeners( VCLEVENT_WINDOW_CLOSE );
+ CallEventListeners( VclEventId::WindowClose );
if ( xWindow->IsDisposed() )
return false;
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 54997dda317d..e8bb662355ed 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -68,7 +68,7 @@ bool Window::PreNotify( NotifyEvent& rNEvt )
}
if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) )
- CallEventListeners( VCLEVENT_WINDOW_GETFOCUS );
+ CallEventListeners( VclEventId::WindowGetFocus );
}
else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS )
{
@@ -80,7 +80,7 @@ bool Window::PreNotify( NotifyEvent& rNEvt )
}
if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) )
- CallEventListeners( VCLEVENT_WINDOW_LOSEFOCUS );
+ CallEventListeners( VclEventId::WindowLoseFocus );
}
// #82968# mouse and key events will be notified after processing ( in ImplNotifyKeyMouseCommandEventListeners() )!
@@ -203,7 +203,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt )
return bRet;
}
-void Window::CallEventListeners( sal_uLong nEvent, void* pData )
+void Window::CallEventListeners( VclEventId nEvent, void* pData )
{
VclWindowEvent aEvent( this, nEvent, pData );
@@ -400,7 +400,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
aCommandEvent = CommandEvent( ScreenToOutputPixel( aPos ), pCEvt->GetCommand(), pCEvt->IsMouseEvent(), pCEvt->GetEventData() );
}
- CallEventListeners( VCLEVENT_WINDOW_COMMAND, &aCommandEvent );
+ CallEventListeners( VclEventId::WindowCommand, &aCommandEvent );
}
}
}
@@ -417,11 +417,11 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
{
if ( rNEvt.GetWindow() == this )
- CallEventListeners( VCLEVENT_WINDOW_MOUSEMOVE, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
+ CallEventListeners( VclEventId::WindowMouseMove, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
else
{
MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
- CallEventListeners( VCLEVENT_WINDOW_MOUSEMOVE, &aMouseEvent );
+ CallEventListeners( VclEventId::WindowMouseMove, &aMouseEvent );
}
}
}
@@ -430,11 +430,11 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
{
if ( rNEvt.GetWindow() == this )
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
+ CallEventListeners( VclEventId::WindowMouseButtonUp, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
else
{
MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, &aMouseEvent );
+ CallEventListeners( VclEventId::WindowMouseButtonUp, &aMouseEvent );
}
}
}
@@ -443,23 +443,23 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
{
if ( rNEvt.GetWindow() == this )
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
+ CallEventListeners( VclEventId::WindowMouseButtonDown, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
else
{
MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, &aMouseEvent );
+ CallEventListeners( VclEventId::WindowMouseButtonDown, &aMouseEvent );
}
}
}
else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
- CallEventListeners( VCLEVENT_WINDOW_KEYINPUT, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) );
+ CallEventListeners( VclEventId::WindowKeyInput, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) );
}
else if( rNEvt.GetType() == MouseNotifyEvent::KEYUP )
{
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
- CallEventListeners( VCLEVENT_WINDOW_KEYUP, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) );
+ CallEventListeners( VclEventId::WindowKeyUp, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) );
}
if ( xWindow->IsDisposed() )
@@ -524,7 +524,7 @@ void Window::ImplCallResize()
// #88419# Most classes don't call the base class in Resize() and Move(),
// => Call ImpleResize/Move instead of Resize/Move directly...
- CallEventListeners( VCLEVENT_WINDOW_RESIZE );
+ CallEventListeners( VclEventId::WindowResize );
}
void Window::ImplCallMove()
@@ -566,7 +566,7 @@ void Window::ImplCallMove()
Move();
- CallEventListeners( VCLEVENT_WINDOW_MOVE );
+ CallEventListeners( VclEventId::WindowMove );
}
void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index a0e0002c57be..0f42dd69887e 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1544,7 +1544,7 @@ void VclFrame::setAllocation(const Size &rAllocation)
IMPL_LINK(VclFrame, WindowEventListener, VclWindowEvent&, rEvent, void)
{
- if (rEvent.GetId() == VCLEVENT_OBJECT_DYING)
+ if (rEvent.GetId() == VclEventId::ObjectDying)
designate_label(nullptr);
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 0727b30c1e5f..00b931e32ba9 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -141,7 +141,7 @@ Menu::~Menu()
void Menu::dispose()
{
- ImplCallEventListeners( VCLEVENT_OBJECT_DYING, ITEMPOS_INVALID );
+ ImplCallEventListeners( VclEventId::ObjectDying, ITEMPOS_INVALID );
// at the window free the reference to the accessible component
// and make sure the MenuFloatingWindow knows about our destruction
@@ -210,7 +210,7 @@ void Menu::Activate()
ImplMenuDelData aDelData( this );
- ImplCallEventListeners( VCLEVENT_MENU_ACTIVATE, ITEMPOS_INVALID );
+ ImplCallEventListeners( VclEventId::MenuActivate, ITEMPOS_INVALID );
if( !aDelData.isDeleted() )
{
@@ -251,7 +251,7 @@ void Menu::Deactivate()
ImplMenuDelData aDelData( this );
Menu* pStartMenu = ImplGetStartMenu();
- ImplCallEventListeners( VCLEVENT_MENU_DEACTIVATE, ITEMPOS_INVALID );
+ ImplCallEventListeners( VclEventId::MenuDeactivate, ITEMPOS_INVALID );
if( !aDelData.isDeleted() )
{
@@ -300,7 +300,7 @@ void Menu::Select()
{
ImplMenuDelData aDelData( this );
- ImplCallEventListeners( VCLEVENT_MENU_SELECT, GetItemPos( GetCurItemId() ) );
+ ImplCallEventListeners( VclEventId::MenuSelect, GetItemPos( GetCurItemId() ) );
if ( !aDelData.isDeleted() && !aSelectHdl.Call( this ) )
{
if( !aDelData.isDeleted() )
@@ -328,14 +328,14 @@ void Menu::ImplSelectWithStart( Menu* pSMenu )
}
#endif
-void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos )
+void Menu::ImplCallEventListeners( VclEventId nEvent, sal_uInt16 nPos )
{
ImplMenuDelData aDelData( this );
VclMenuEvent aEvent( this, nEvent, nPos );
// This is needed by atk accessibility bridge
- if ( nEvent == VCLEVENT_MENU_HIGHLIGHT )
+ if ( nEvent == VclEventId::MenuHighlight )
{
Application::ImplCallEventListeners( aEvent );
}
@@ -404,7 +404,7 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, MenuItemBits nIt
if ( pWin->IsVisible() )
pWin->Invalidate();
}
- ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos );
+ ImplCallEventListeners( VclEventId::MenuInsertItem, nPos );
}
void Menu::InsertItem(sal_uInt16 nItemId, const Image& rImage,
@@ -546,7 +546,7 @@ void Menu::InsertSeparator(const OString &rIdent, sal_uInt16 nPos)
delete mpLayoutData;
mpLayoutData = nullptr;
- ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos );
+ ImplCallEventListeners( VclEventId::MenuInsertItem, nPos );
}
void Menu::RemoveItem( sal_uInt16 nPos )
@@ -574,7 +574,7 @@ void Menu::RemoveItem( sal_uInt16 nPos )
mpLayoutData = nullptr;
if ( bRemove )
- ImplCallEventListeners( VCLEVENT_MENU_REMOVEITEM, nPos );
+ ImplCallEventListeners( VclEventId::MenuRemoveItem, nPos );
}
void ImplCopyItem( Menu* pThis, const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 nNewPos )
@@ -804,7 +804,7 @@ void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu )
oldSubMenu.disposeAndClear();
- ImplCallEventListeners( VCLEVENT_MENU_SUBMENUCHANGED, nPos );
+ ImplCallEventListeners( VclEventId::MenuSubmenuChanged, nPos );
}
PopupMenu* Menu::GetPopupMenu( sal_uInt16 nItemId ) const
@@ -932,7 +932,7 @@ void Menu::CheckItem( sal_uInt16 nItemId, bool bCheck )
if( ImplGetSalMenu() )
ImplGetSalMenu()->CheckItem( nPos, bCheck );
- ImplCallEventListeners( bCheck ? VCLEVENT_MENU_ITEMCHECKED : VCLEVENT_MENU_ITEMUNCHECKED, nPos );
+ ImplCallEventListeners( bCheck ? VclEventId::MenuItemChecked : VclEventId::MenuItemUnchecked, nPos );
}
bool Menu::IsItemChecked( sal_uInt16 nItemId ) const
@@ -976,7 +976,7 @@ void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable )
if( ImplGetSalMenu() )
ImplGetSalMenu()->EnableItem( nPos, bEnable );
- ImplCallEventListeners( bEnable ? VCLEVENT_MENU_ENABLE : VCLEVENT_MENU_DISABLE, nPos );
+ ImplCallEventListeners( bEnable ? VclEventId::MenuEnable : VclEventId::MenuDisable, nPos );
}
}
@@ -1039,7 +1039,7 @@ void Menu::SetItemText( sal_uInt16 nItemId, const OUString& rStr )
pWin->Invalidate();
}
- ImplCallEventListeners( VCLEVENT_MENU_ITEMTEXTCHANGED, nPos );
+ ImplCallEventListeners( VclEventId::MenuItemTextChanged, nPos );
}
}
@@ -2137,7 +2137,7 @@ void Menu::ImplCallHighlight(sal_uInt16 nItem)
MenuItemData* pData = pItemList->GetDataFromPos(nItem);
if ( pData )
nSelectedId = pData->nId;
- ImplCallEventListeners( VCLEVENT_MENU_HIGHLIGHT, GetItemPos( GetCurItemId() ) );
+ ImplCallEventListeners( VclEventId::MenuHighlight, GetItemPos( GetCurItemId() ) );
if( !aDelData.isDeleted() )
nSelectedId = 0;
@@ -2635,7 +2635,7 @@ bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventI
ImplMenuDelData aDelData( pMenu );
if( mnHighlightedItemPos != ITEMPOS_INVALID )
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, mnHighlightedItemPos );
+ pMenu->ImplCallEventListeners( VclEventId::MenuDehighlight, mnHighlightedItemPos );
if( !aDelData.isDeleted() )
{
@@ -2949,7 +2949,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
{
pData->bIsTemporary = true;
}
- ImplCallEventListeners(VCLEVENT_MENU_SUBMENUCHANGED, nPos);
+ ImplCallEventListeners(VclEventId::MenuSubmenuChanged, nPos);
}
}
else if (!(nMenuFlags & MenuFlags::NoAutoMnemonics))
@@ -3037,7 +3037,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
aPos = static_cast<MenuFloatingWindow *>(pSFrom->pWindow.get())->GetHighlightedItem();
pWin->SetPosInParent( aPos ); // store position to be sent in SUBMENUDEACTIVATE
- pSFrom->ImplCallEventListeners( VCLEVENT_MENU_SUBMENUACTIVATE, aPos );
+ pSFrom->ImplCallEventListeners( VclEventId::MenuSubmenuActivate, aPos );
}
}
if ( bPreSelectFirst )
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index f412db46a7cd..f92290104608 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -255,11 +255,11 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent&, rEvent, void )
MenuBar::MenuBarButtonCallbackArg aArg;
aArg.nId = 0xffff;
- aArg.bHighlight = (rEvent.GetId() == VCLEVENT_TOOLBOX_HIGHLIGHT);
+ aArg.bHighlight = (rEvent.GetId() == VclEventId::ToolboxHighlight);
aArg.pMenuBar = dynamic_cast<MenuBar*>(pMenu.get());
- if( rEvent.GetId() == VCLEVENT_TOOLBOX_HIGHLIGHT )
+ if( rEvent.GetId() == VclEventId::ToolboxHighlight )
aArg.nId = aCloseBtn->GetHighlightItemId();
- else if( rEvent.GetId() == VCLEVENT_TOOLBOX_HIGHLIGHTOFF )
+ else if( rEvent.GetId() == VclEventId::ToolboxHighlightOff )
{
sal_uInt16 nPos = static_cast< sal_uInt16 >(reinterpret_cast<sal_IntPtr>(rEvent.GetData()));
aArg.nId = aCloseBtn->GetItemId(nPos);
@@ -276,10 +276,10 @@ IMPL_LINK( MenuBarWindow, ShowHideListener, VclWindowEvent&, rEvent, void )
if( ! pMenu )
return;
- if( rEvent.GetId() == VCLEVENT_WINDOW_SHOW )
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_SHOW, ITEMPOS_INVALID );
- else if( rEvent.GetId() == VCLEVENT_WINDOW_HIDE )
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_HIDE, ITEMPOS_INVALID );
+ if( rEvent.GetId() == VclEventId::WindowShow )
+ pMenu->ImplCallEventListeners( VclEventId::MenuShow, ITEMPOS_INVALID );
+ else if( rEvent.GetId() == VclEventId::WindowHide )
+ pMenu->ImplCallEventListeners( VclEventId::MenuHide, ITEMPOS_INVALID );
}
void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
@@ -502,7 +502,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool b
if ( nHighlightedItem != nRolloveredItem )
Invalidate(); //HighlightItem( nHighlightedItem, false );
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
+ pMenu->ImplCallEventListeners( VclEventId::MenuDehighlight, nHighlightedItem );
}
nHighlightedItem = (sal_uInt16)n;
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 366aeed1ad1d..79586c00c9cc 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -65,7 +65,7 @@ void MenuFloatingWindow::doShutdown()
// #105373# notify toolkit that highlight was removed
// otherwise the entry will not be read when the menu is opened again
if( nHighlightedItem != ITEMPOS_INVALID )
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
+ pMenu->ImplCallEventListeners( VclEventId::MenuDehighlight, nHighlightedItem );
if (!bKeyInput && pMenu && pMenu->pStartedFrom && !pMenu->pStartedFrom->IsMenuBar())
{
// #102461# remove highlight in parent
@@ -374,10 +374,10 @@ IMPL_LINK( MenuFloatingWindow, ShowHideListener, VclWindowEvent&, rEvent, void )
if( ! pMenu )
return;
- if( rEvent.GetId() == VCLEVENT_WINDOW_SHOW )
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_SHOW, ITEMPOS_INVALID );
- else if( rEvent.GetId() == VCLEVENT_WINDOW_HIDE )
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_HIDE, ITEMPOS_INVALID );
+ if( rEvent.GetId() == VclEventId::WindowShow )
+ pMenu->ImplCallEventListeners( VclEventId::MenuShow, ITEMPOS_INVALID );
+ else if( rEvent.GetId() == VclEventId::WindowHide )
+ pMenu->ImplCallEventListeners( VclEventId::MenuHide, ITEMPOS_INVALID );
}
void MenuFloatingWindow::EnableScrollMenu( bool b )
@@ -444,7 +444,7 @@ void MenuFloatingWindow::StopExecute()
}
// notify parent, needed for accessibility
if( pMenu && pMenu->pStartedFrom )
- pMenu->pStartedFrom->ImplCallEventListeners( VCLEVENT_MENU_SUBMENUDEACTIVATE, nPosInParent );
+ pMenu->pStartedFrom->ImplCallEventListeners( VclEventId::MenuSubmenuDeactivate, nPosInParent );
}
void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
@@ -703,7 +703,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTime
if ( nHighlightedItem != ITEMPOS_INVALID )
{
InvalidateItem(nHighlightedItem);
- pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
+ pMenu->ImplCallEventListeners( VclEventId::MenuDehighlight, nHighlightedItem );
}
nHighlightedItem = (sal_uInt16)n;
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 4d71a01a6ce3..52b9e3744bde 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -999,7 +999,7 @@ void Window::PostPaint(vcl::RenderContext& /*rRenderContext*/)
void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect)
{
- CallEventListeners(VCLEVENT_WINDOW_PAINT, const_cast<Rectangle *>(&rRect));
+ CallEventListeners(VclEventId::WindowPaint, const_cast<Rectangle *>(&rRect));
}
void Window::SetPaintTransparent( bool bTransparent )
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index 16b0e4101b07..6bb516eb956e 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -130,7 +130,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild )
DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags );
DataChanged( aDCEvt );
// notify data change handler
- CallEventListeners( VCLEVENT_WINDOW_DATACHANGED, &aDCEvt);
+ CallEventListeners( VclEventId::WindowDataChanged, &aDCEvt);
}
if ( bChild )
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 019dc0545b24..cba9b3f1b912 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -732,8 +732,8 @@ void Window::ImplResetReallyVisible()
// For this, the data member of the event must not be NULL.
// Previously, we did this in Window::Show, but there some events got lost in certain situations.
if( bBecameReallyInvisible && ImplIsAccessibleCandidate() )
- CallEventListeners( VCLEVENT_WINDOW_HIDE, this );
- // TODO. It's kind of a hack that we're re-using the VCLEVENT_WINDOW_HIDE. Normally, we should
+ CallEventListeners( VclEventId::WindowHide, this );
+ // TODO. It's kind of a hack that we're re-using the VclEventId::WindowHide. Normally, we should
// introduce another event which explicitly triggers the Accessibility implementations.
vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 5a48fbdcd13b..8aab54b743a2 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -449,7 +449,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
}
if (!rRenderContext.ImplIsRecordLayout())
- CallEventListeners(VCLEVENT_STATUSBAR_DRAWITEM, reinterpret_cast<void*>(pItem->mnId));
+ CallEventListeners(VclEventId::StatusbarDrawItem, reinterpret_cast<void*>(pItem->mnId));
}
void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, const Point& rPos,
@@ -876,13 +876,13 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt )
void StatusBar::Click()
{
- CallEventListeners( VCLEVENT_STATUSBAR_CLICK );
+ CallEventListeners( VclEventId::StatusbarClick );
maClickHdl.Call( this );
}
void StatusBar::DoubleClick()
{
- CallEventListeners( VCLEVENT_STATUSBAR_DOUBLECLICK );
+ CallEventListeners( VclEventId::StatusbarDoubleClick );
maDoubleClickHdl.Call( this );
}
@@ -929,7 +929,7 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth,
if ( ImplIsItemUpdate() )
Invalidate();
- CallEventListeners( VCLEVENT_STATUSBAR_ITEMADDED, reinterpret_cast<void*>(nItemId) );
+ CallEventListeners( VclEventId::StatusbarItemAdded, reinterpret_cast<void*>(nItemId) );
}
void StatusBar::RemoveItem( sal_uInt16 nItemId )
@@ -944,7 +944,7 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId )
if ( ImplIsItemUpdate() )
Invalidate();
- CallEventListeners( VCLEVENT_STATUSBAR_ITEMREMOVED, reinterpret_cast<void*>(nItemId) );
+ CallEventListeners( VclEventId::StatusbarItemRemoved, reinterpret_cast<void*>(nItemId) );
}
}
@@ -963,7 +963,7 @@ void StatusBar::ShowItem( sal_uInt16 nItemId )
if ( ImplIsItemUpdate() )
Invalidate();
- CallEventListeners( VCLEVENT_STATUSBAR_SHOWITEM, reinterpret_cast<void*>(nItemId) );
+ CallEventListeners( VclEventId::StatusbarShowItem, reinterpret_cast<void*>(nItemId) );
}
}
}
@@ -983,7 +983,7 @@ void StatusBar::HideItem( sal_uInt16 nItemId )
if ( ImplIsItemUpdate() )
Invalidate();
- CallEventListeners( VCLEVENT_STATUSBAR_HIDEITEM, reinterpret_cast<void*>(nItemId) );
+ CallEventListeners( VclEventId::StatusbarHideItem, reinterpret_cast<void*>(nItemId) );
}
}
}
@@ -1010,7 +1010,7 @@ void StatusBar::Clear()
if ( ImplIsItemUpdate() )
Invalidate();
- CallEventListeners( VCLEVENT_STATUSBAR_ALLITEMSREMOVED );
+ CallEventListeners( VclEventId::StatusbarAllItemsRemoved );
}
sal_uInt16 StatusBar::GetItemCount() const
@@ -1468,7 +1468,7 @@ void StatusBar::SetAccessibleName( sal_uInt16 nItemId, const OUString& rName )
if ( pItem->maAccessibleName != rName )
{
pItem->maAccessibleName = rName;
- CallEventListeners( VCLEVENT_STATUSBAR_NAMECHANGED, reinterpret_cast<void*>(pItem->mnId) );
+ CallEventListeners( VclEventId::StatusbarNameChanged, reinterpret_cast<void*>(pItem->mnId) );
}
}
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 100f12120f1c..1d19490c8368 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -272,7 +272,7 @@ TaskPaneList* SystemWindow::GetTaskPaneList()
bool SystemWindow::Close()
{
VclPtr<vcl::Window> xWindow = this;
- CallEventListeners( VCLEVENT_WINDOW_CLOSE );
+ CallEventListeners( VclEventId::WindowClose );
if ( xWindow->IsDisposed() )
return false;
@@ -936,7 +936,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
pOldWindow = nullptr;
if ( pOldWindow )
{
- CallEventListeners( VCLEVENT_WINDOW_MENUBARREMOVED, static_cast<void*>(pOldMenuBar) );
+ CallEventListeners( VclEventId::WindowMenubarRemoved, static_cast<void*>(pOldMenuBar) );
pOldWindow->SetAccessible( css::uno::Reference< css::accessibility::XAccessible >() );
}
if ( pMenuBar )
@@ -946,7 +946,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
pNewWindow = MenuBar::ImplCreate(mpWindowImpl->mpBorderWindow, pOldWindow, pMenuBar);
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow(pNewWindow);
- CallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, static_cast<void*>(pMenuBar) );
+ CallEventListeners( VclEventId::WindowMenubarAdded, static_cast<void*>(pMenuBar) );
}
else
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( nullptr );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7d51ab3d1582..6ad9c21822fe 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3622,7 +3622,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND )
{
InvalidateItem(mnCurPos);
- CallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( mnCurPos ) );
+ CallEventListeners( VclEventId::ToolboxHighlightOff, reinterpret_cast< void* >( mnCurPos ) );
}
mnCurPos = nNewPos;
@@ -3719,7 +3719,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
ImplHideFocus();
sal_uInt16 nPos = GetItemPos( mnHighItemId );
InvalidateItem(nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxHighlightOff, reinterpret_cast< void* >( nPos ) );
}
if ( mpData->mbMenubuttonSelected )
{
@@ -3729,7 +3729,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
mnHighItemId = it->mnId;
InvalidateItem(nTempPos);
ImplShowFocus();
- CallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHT );
+ CallEventListeners( VclEventId::ToolboxHighlight );
}
}
}
@@ -3757,7 +3757,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
{
InvalidateItem(nClearPos);
if( nClearPos != mnCurPos )
- CallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nClearPos ) );
+ CallEventListeners( VclEventId::ToolboxHighlightOff, reinterpret_cast< void* >( nClearPos ) );
}
ImplHideFocus();
mnHighItemId = 0;
@@ -5358,7 +5358,7 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus )
// set mnHighItemId to 0 already to prevent this hen/egg problem
mnHighItemId = 0;
InvalidateItem(nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxHighlightOff, reinterpret_cast< void* >( nPos ) );
}
if( !bNoGrabFocus && pItem != pOldItem && pOldItem && pOldItem->mpWindow )
@@ -5401,7 +5401,7 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus )
if( pItem->mpWindow )
pItem->mpWindow->GrabFocus();
if( pItem != pOldItem )
- CallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHT );
+ CallEventListeners( VclEventId::ToolboxHighlight );
}
}
else
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 04ba01cd1603..38d8dd7a4531 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -299,7 +299,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint )
}
// request new layout by layoutmanager
- CallEventListeners( VCLEVENT_TOOLBOX_FORMATCHANGED );
+ CallEventListeners( VclEventId::ToolboxFormatChanged );
}
void ToolBox::ImplUpdateItem( sal_uInt16 nIndex )
@@ -327,40 +327,40 @@ void ToolBox::ImplUpdateItem( sal_uInt16 nIndex )
void ToolBox::Click()
{
- CallEventListeners( VCLEVENT_TOOLBOX_CLICK );
+ CallEventListeners( VclEventId::ToolboxClick );
maClickHdl.Call( this );
}
void ToolBox::DoubleClick()
{
- CallEventListeners( VCLEVENT_TOOLBOX_DOUBLECLICK );
+ CallEventListeners( VclEventId::ToolboxDoubleClick );
maDoubleClickHdl.Call( this );
}
void ToolBox::Activate()
{
mnActivateCount++;
- CallEventListeners( VCLEVENT_TOOLBOX_ACTIVATE );
+ CallEventListeners( VclEventId::ToolboxActivate );
maActivateHdl.Call( this );
}
void ToolBox::Deactivate()
{
mnActivateCount--;
- CallEventListeners( VCLEVENT_TOOLBOX_DEACTIVATE );
+ CallEventListeners( VclEventId::ToolboxDeactivate );
maDeactivateHdl.Call( this );
}
void ToolBox::Highlight()
{
- CallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHT );
+ CallEventListeners( VclEventId::ToolboxHighlight );
}
void ToolBox::Select()
{
VclPtr<vcl::Window> xWindow = this;
- CallEventListeners( VCLEVENT_TOOLBOX_SELECT );
+ CallEventListeners( VclEventId::ToolboxSelect );
maSelectHdl.Call( this );
if ( xWindow->IsDisposed() )
@@ -388,7 +388,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBi
// Notify
sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >(nNewPos ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >(nNewPos ) );
}
void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, const OUString& rText, ToolBoxItemBits nBits,
@@ -408,7 +408,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, const OUStrin
// Notify
sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >( nNewPos ) );
}
void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, ToolBoxItemBits nBits, sal_uInt16 nPos )
@@ -426,7 +426,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, ToolBoxItem
// Notify
sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >( nNewPos ) );
}
void ToolBox::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame, ToolBoxItemBits nBits,
@@ -479,7 +479,7 @@ void ToolBox::InsertWindow( sal_uInt16 nItemId, vcl::Window* pWindow,
// Notify
sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >( nNewPos ) );
}
void ToolBox::InsertSpace()
@@ -495,7 +495,7 @@ void ToolBox::InsertSpace()
// Notify
sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(mpData->m_aItems.size() - 1);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >( nNewPos ) );
}
void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize )
@@ -513,7 +513,7 @@ void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize )
// Notify
sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >( nNewPos ) );
}
void ToolBox::InsertBreak( sal_uInt16 nPos )
@@ -529,7 +529,7 @@ void ToolBox::InsertBreak( sal_uInt16 nPos )
// Notify
sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >( nNewPos ) );
}
void ToolBox::RemoveItem( sal_uInt16 nPos )
@@ -560,7 +560,7 @@ void ToolBox::RemoveItem( sal_uInt16 nPos )
mpData->ImplClearLayoutData();
// Notify
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMREMOVED, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxItemRemoved, reinterpret_cast< void* >( nPos ) );
}
}
@@ -587,7 +587,7 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId )
// Notify
sal_uInt16 nNewPos2 = sal::static_int_cast<sal_uInt16>(mpData->m_aItems.size() - 1);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos2 ) );
+ CallEventListeners( VclEventId::ToolboxItemAdded, reinterpret_cast< void* >( nNewPos2 ) );
}
}
@@ -603,7 +603,7 @@ void ToolBox::Clear()
ImplInvalidate( true, true );
// Notify
- CallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED );
+ CallEventListeners( VclEventId::ToolboxAllItemsChanged );
}
void ToolBox::SetButtonType( ButtonType eNewType )
@@ -1078,10 +1078,10 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText )
pItem->maText = MnemonicGenerator::EraseAllMnemonicChars(rText);
// Notify button changed event to prepare accessibility bridge
- CallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxButtonStateChanged, reinterpret_cast< void* >( nPos ) );
// Notify
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMTEXTCHANGED, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxItemTextChanged, reinterpret_cast< void* >( nPos ) );
}
}
@@ -1106,7 +1106,7 @@ void ToolBox::SetItemWindow( sal_uInt16 nItemId, vcl::Window* pNewWindow )
if ( pNewWindow )
pNewWindow->Hide();
ImplInvalidate( true );
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxItemWindowChanged, reinterpret_cast< void* >( nPos ) );
}
}
@@ -1252,10 +1252,10 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
ImplUpdateItem( nPos );
// Notify button changed event to prepare accessibility bridge
- CallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxButtonStateChanged, reinterpret_cast< void* >( nPos ) );
// Call accessible listener to notify state_changed event
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMUPDATED, reinterpret_cast< void* >(nPos) );
+ CallEventListeners( VclEventId::ToolboxItemUpdated, reinterpret_cast< void* >(nPos) );
}
}
}
@@ -1293,9 +1293,9 @@ void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable )
ImplUpdateInputEnable();
// Notify button changed event to prepare accessibility bridge
- CallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( VclEventId::ToolboxButtonStateChanged, reinterpret_cast< void* >( nPos ) );
- CallEventListeners( bEnable ? VCLEVENT_TOOLBOX_ITEMENABLED : VCLEVENT_TOOLBOX_ITEMDISABLED, reinterpret_cast< void* >( nPos ) );
+ CallEventListeners( bEnable ? VclEventId::ToolboxItemEnabled : VclEventId::ToolboxItemDisabled, reinterpret_cast< void* >( nPos ) );
}
}
}
@@ -1672,7 +1672,7 @@ void ToolBox::UpdateCustomMenu()
IMPL_LINK( ToolBox, ImplCustomMenuListener, VclMenuEvent&, rEvent, void )
{
- if( rEvent.GetMenu() == GetMenu() && rEvent.GetId() == VCLEVENT_MENU_SELECT )
+ if( rEvent.GetMenu() == GetMenu() && rEvent.GetId() == VclEventId::MenuSelect )
{
sal_uInt16 id = GetMenu()->GetItemId( rEvent.GetItemPos() );
if( id >= TOOLBOX_MENUITEM_START )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 7bba641f6463..1bf8a4defef3 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -164,12 +164,12 @@ void Window::dispose()
mpWindowImpl->mbInDispose = true;
- CallEventListeners( VCLEVENT_OBJECT_DYING );
+ CallEventListeners( VclEventId::ObjectDying );
// do not send child events for frames that were registered as native frames
if( !ImplIsAccessibleNativeFrame() && mpWindowImpl->mbReallyVisible )
if ( ImplIsAccessibleCandidate() && GetAccessibleParentWindow() )
- GetAccessibleParentWindow()->CallEventListeners( VCLEVENT_WINDOW_CHILDDESTROYED, this );
+ GetAccessibleParentWindow()->CallEventListeners( VclEventId::WindowChildDestroyed, this );
// remove associated data structures from dockingmanager
ImplGetDockingManager()->RemoveWindow( this );
@@ -1178,7 +1178,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
ImplInitAppFontData( this );
if ( GetAccessibleParentWindow() && GetParent() != Application::GetDefDialogParent() )
- GetAccessibleParentWindow()->CallEventListeners( VCLEVENT_WINDOW_CHILDCREATED, this );
+ GetAccessibleParentWindow()->CallEventListeners( VclEventId::WindowChildCreated, this );
}
void Window::ImplInitAppFontData( vcl::Window* pWindow )
@@ -1300,8 +1300,8 @@ void Window::ImplSetReallyVisible()
// Previously, we did this in Window::Show, but there some events got lost in certain situations. Now
// we're doing it when the visibility really changes
if( bBecameReallyVisible && ImplIsAccessibleCandidate() )
- CallEventListeners( VCLEVENT_WINDOW_SHOW, this );
- // TODO. It's kind of a hack that we're re-using the VCLEVENT_WINDOW_SHOW. Normally, we should
+ CallEventListeners( VclEventId::WindowShow, this );
+ // TODO. It's kind of a hack that we're re-using the VclEventId::WindowShow. Normally, we should
// introduce another event which explicitly triggers the Accessibility implementations.
vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
@@ -1914,7 +1914,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
void Window::Command( const CommandEvent& rCEvt )
{
- CallEventListeners( VCLEVENT_WINDOW_COMMAND, const_cast<CommandEvent *>(&rCEvt) );
+ CallEventListeners( VclEventId::WindowCommand, const_cast<CommandEvent *>(&rCEvt) );
NotifyEvent aNEvt( MouseNotifyEvent::COMMAND, this, &rCEvt );
if ( !CompatNotify( aNEvt ) )
@@ -2383,7 +2383,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
// Since #104887#, the notifications for the access bridge are done in Impl(Set|Reset)ReallyVisible. Here, we
// now only notify with a NULL data pointer, for all other clients except the access bridge.
if ( !bRealVisibilityChanged )
- CallEventListeners( mpWindowImpl->mbVisible ? VCLEVENT_WINDOW_SHOW : VCLEVENT_WINDOW_HIDE );
+ CallEventListeners( mpWindowImpl->mbVisible ? VclEventId::WindowShow : VclEventId::WindowHide );
if( xWindow->IsDisposed() )
return;
@@ -2465,7 +2465,7 @@ void Window::Enable( bool bEnable, bool bChild )
mpWindowImpl->mpSysObj->Enable( bEnable && !mpWindowImpl->mbInputDisabled );
CompatStateChanged( StateChangedType::Enable );
- CallEventListeners( bEnable ? VCLEVENT_WINDOW_ENABLED : VCLEVENT_WINDOW_DISABLED );
+ CallEventListeners( bEnable ? VclEventId::WindowEnabled : VclEventId::WindowDisabled );
}
if ( bChild )
@@ -3060,17 +3060,17 @@ void Window::SetText( const OUString& rStr )
else if ( mpWindowImpl->mbFrame )
mpWindowImpl->mpFrame->SetTitle( rStr );
- CallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle );
+ CallEventListeners( VclEventId::WindowFrameTitleChanged, &oldTitle );
// #107247# needed for accessibility
- // The VCLEVENT_WINDOW_FRAMETITLECHANGED is (mis)used to notify accessible name changes.
+ // The VclEventId::WindowFrameTitleChanged is (mis)used to notify accessible name changes.
// Therefore a window, which is labeled by this window, must also notify an accessible
// name change.
if ( IsReallyVisible() )
{
vcl::Window* pWindow = GetAccessibleRelationLabelFor();
if ( pWindow && pWindow != this )
- pWindow->CallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle );
+ pWindow->CallEventListeners( VclEventId::WindowFrameTitleChanged, &oldTitle );
}
CompatStateChanged( StateChangedType::Text );
@@ -3184,7 +3184,7 @@ void Window::ImplCallDeactivateListeners( vcl::Window *pNew )
if ( !pNew || !ImplIsChild( pNew ) )
{
VclPtr<vcl::Window> xWindow(this);
- CallEventListeners( VCLEVENT_WINDOW_DEACTIVATE );
+ CallEventListeners( VclEventId::WindowDeactivate );
if( xWindow->IsDisposed() )
return;
@@ -3201,7 +3201,7 @@ void Window::ImplCallActivateListeners( vcl::Window *pOld )
if ( !pOld || !ImplIsChild( pOld ) )
{
VclPtr<vcl::Window> xWindow(this);
- CallEventListeners( VCLEVENT_WINDOW_ACTIVATE, pOld );
+ CallEventListeners( VclEventId::WindowActivate, pOld );
if( xWindow->IsDisposed() )
return;
@@ -3473,10 +3473,10 @@ void Window::ImplIsInTaskPaneList( bool mbIsInTaskList )
void Window::ImplNotifyIconifiedState( bool bIconified )
{
- mpWindowImpl->mpFrameWindow->CallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE );
+ mpWindowImpl->mpFrameWindow->CallEventListeners( bIconified ? VclEventId::WindowMinimize : VclEventId::WindowNormalize );
// #109206# notify client window as well to have toolkit topwindow listeners notified
if( mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow && mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow )
- mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow->CallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE );
+ mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow->CallEventListeners( bIconified ? VclEventId::WindowMinimize : VclEventId::WindowNormalize );
}
bool Window::HasActiveChildFrame()
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 4b5ce2a4f4f0..effc5bb0591a 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -862,20 +862,20 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent,
KeyEvent aKeyEvent( (sal_Unicode)nCharCode, aKeyCode, nRepeat );
if( bForward )
{
- sal_uInt16 nVCLEvent;
+ VclEventId nVCLEvent;
switch( nSVEvent )
{
case MouseNotifyEvent::KEYINPUT:
- nVCLEvent = VCLEVENT_WINDOW_KEYINPUT;
+ nVCLEvent = VclEventId::WindowKeyInput;
break;
case MouseNotifyEvent::KEYUP:
- nVCLEvent = VCLEVENT_WINDOW_KEYUP;
+ nVCLEvent = VclEventId::WindowKeyUp;
break;
default:
- nVCLEvent = 0;
+ nVCLEvent = VclEventId::NONE;
break;
}
- if( nVCLEvent && Application::HandleKey( nVCLEvent, pWindow, &aKeyEvent ) )
+ if( nVCLEvent != VclEventId::NONE && Application::HandleKey( nVCLEvent, pWindow, &aKeyEvent ) )
return true;
}