diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-09-15 10:19:45 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-09-19 11:42:59 +0200 |
commit | 467085bfb0f595a094389c2de159589372d36d1e (patch) | |
tree | 1124baddedd97a081015513aab0dd8656fe3d683 | |
parent | de90c192cb8f1f03a4028493d8bfe9a127a76b2a (diff) |
Rename MouseNotifyEvent to NotifyEventType
Also contains keyboard and focus events, not only mouse events
Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
72 files changed, 257 insertions, 257 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 5411b73336bb..1f41ea7b23a8 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -122,7 +122,7 @@ bool BaseWindow::EventNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { KeyEvent aKEvt = *rNEvt.GetKeyEvent(); vcl::KeyCode aCode = aKEvt.GetKeyCode(); diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results index ee1bf33587e9..d147531663df 100644 --- a/bin/find-can-be-private-symbols.functions.results +++ b/bin/find-can-be-private-symbols.functions.results @@ -2335,7 +2335,7 @@ NotebookBar::UpdatePersonaSettings() NotebookBar::dispose() NotebookBar::setPosSizePixel(long, long, long, long, PosSizeFlags) NotebookBar::~NotebookBar() -NotifyEvent::NotifyEvent(MouseNotifyEvent, vcl::Window*, void const*) +NotifyEvent::NotifyEvent(NotifyEventType, vcl::Window*, void const*) NotifyEvent::~NotifyEvent() NumFormatListBox::Init() NumFormatListBox::clear() diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index df0b94dd60f5..e6536beecfb8 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -174,7 +174,7 @@ bool OApplicationView::PreNotify( NotifyEvent& rNEvt ) { switch(rNEvt.GetType()) { - case MouseNotifyEvent::KEYINPUT: + case NotifyEventType::KEYINPUT: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); // give the pane the chance to intercept mnemonic accelerators diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index b68819d6740a..9d6d3c95d67d 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -292,7 +292,7 @@ void UnoDataBrowserView::_disposing( const css::lang::EventObject& /*_rSource*/ bool UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if(rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) + if(rNEvt.GetType() == NotifyEventType::KEYINPUT) { bool bGrabAllowed = isGrabVclControlFocusAllowed(this); if ( bGrabAllowed ) diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index 1dd920e1575b..383a2c3f0a76 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -98,7 +98,7 @@ namespace dbaui bool bHandled = false; switch ( _rNEvt.GetType() ) { - case MouseNotifyEvent::KEYINPUT: + case NotifyEventType::KEYINPUT: { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); const vcl::KeyCode& aKeyCode = pKeyEvent->GetKeyCode(); @@ -107,9 +107,9 @@ namespace dbaui return true; [[fallthrough]]; } - case MouseNotifyEvent::KEYUP: - case MouseNotifyEvent::MOUSEBUTTONDOWN: - case MouseNotifyEvent::MOUSEBUTTONUP: + case NotifyEventType::KEYUP: + case NotifyEventType::MOUSEBUTTONDOWN: + case NotifyEventType::MOUSEBUTTONUP: bHandled = m_xController->interceptUserInput( _rNEvt ); break; default: diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 096e620da665..d033aebf7e1a 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -184,9 +184,9 @@ namespace dbaui bool ORelationControl::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() && !ControlHasFocus()) + if (rNEvt.GetType() == NotifyEventType::LOSEFOCUS && !HasChildPathFocus() && !ControlHasFocus()) PostUserEvent(LINK(this, ORelationControl, AsynchDeactivate), nullptr, true); - else if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) + else if (rNEvt.GetType() == NotifyEventType::GETFOCUS) PostUserEvent(LINK(this, ORelationControl, AsynchActivate), nullptr, true); return EditBrowseBox::PreNotify(rNEvt); diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index f4826e96d281..607c0199729a 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -151,14 +151,14 @@ void OTableGrantControl::Init() bool OTableGrantControl::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) + if (rNEvt.GetType() == NotifyEventType::LOSEFOCUS) if (!HasChildPathFocus()) { if (m_nDeactivateEvent) Application::RemoveUserEvent(m_nDeactivateEvent); m_nDeactivateEvent = Application::PostUserEvent(LINK(this, OTableGrantControl, AsynchDeactivate), nullptr, true); } - if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) + if (rNEvt.GetType() == NotifyEventType::GETFOCUS) { if (m_nDeactivateEvent) Application::RemoveUserEvent(m_nDeactivateEvent); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 4c9a323dbe4e..87cf5b8aea5b 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1218,7 +1218,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) bool bHandled = false; switch (rNEvt.GetType()) { - case MouseNotifyEvent::COMMAND: + case NotifyEventType::COMMAND: { const CommandEvent* pCommand = rNEvt.GetCommandEvent(); if (pCommand->GetCommand() == CommandEventId::Wheel) @@ -1235,7 +1235,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) } } break; - case MouseNotifyEvent::KEYINPUT: + case NotifyEventType::KEYINPUT: { if (m_aTableMap.empty()) // no tab wins -> no conns -> no traveling @@ -1363,7 +1363,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) } } break; - case MouseNotifyEvent::GETFOCUS: + case NotifyEventType::GETFOCUS: { if (m_aTableMap.empty()) // no tab wins -> no conns -> no focus change diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 9946a7554393..c081012ddf2a 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2681,7 +2681,7 @@ void OQueryDesignView::fillValidFields(std::u16string_view sAliasName, weld::Com bool OQueryDesignView::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) + if (rNEvt.GetType() == NotifyEventType::GETFOCUS) { if ( m_pSelectionBox && m_pSelectionBox->HasChildPathFocus() ) m_eChildFocus = SELECTION; diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 4dc6751741b7..fe5310ea6592 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -564,7 +564,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) bool bHandled = false; switch (rNEvt.GetType()) { - case MouseNotifyEvent::KEYINPUT: + case NotifyEventType::KEYINPUT: { if ( getDesignView()->getController().isReadOnly() ) break; @@ -674,7 +674,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) } break; } - case MouseNotifyEvent::KEYUP: + case NotifyEventType::KEYUP: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index 68b4c5c86865..7a14b7e3c4da 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -157,7 +157,7 @@ namespace dbaui } bool OQueryContainerWindow::PreNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS && m_pViewSwitch) + if (rNEvt.GetType() == NotifyEventType::GETFOCUS && m_pViewSwitch) { OJoinController& rController = m_pViewSwitch->getDesignView()->getController(); rController.InvalidateFeature(SID_CUT); diff --git a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx index 014579cf7c7f..cc333accdec8 100644 --- a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx @@ -51,7 +51,7 @@ void ORelationDesignView::initialize() bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if(rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) + if(rNEvt.GetType() == NotifyEventType::GETFOCUS) { if(m_pTableView && !m_pTableView->HasChildPathFocus()) { diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 5f7809882cc6..db33d26fcd81 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1661,7 +1661,7 @@ void OTableEditorCtrl::DeactivateCell(bool bUpdate) bool OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) + if (rNEvt.GetType() == NotifyEventType::GETFOCUS) { if( pHelpTextCell && pHelpTextCell->HasChildPathFocus() ) m_eChildFocus = HELPTEXT; diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index 6287c907ce0c..627951fd2e4c 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -165,7 +165,7 @@ IMPL_LINK_NOARG(OTableDesignView, FieldDescFocusIn, weld::Widget&, void) bool OTableDesignView::PreNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) + if (rNEvt.GetType() == NotifyEventType::GETFOCUS) { if( GetDescWin() && GetDescWin()->HasChildPathFocus() ) m_eChildFocus = DESCRIPTION; diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 7c24b0fb3fd2..b67cf337ec4e 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -193,7 +193,7 @@ void BibBookContainer::GetFocus() bool BibBookContainer::PreNotify( NotifyEvent& rNEvt ) { bool bHandled = false; - if( MouseNotifyEvent::KEYINPUT == rNEvt.GetType() ) + if( NotifyEventType::KEYINPUT == rNEvt.GetType() ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 3d6ce59aa6f5..ca4971572eac 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -472,8 +472,8 @@ bool BibToolBar::PreNotify( NotifyEvent& rNEvt ) { bool bResult = true; - MouseNotifyEvent nSwitch=rNEvt.GetType(); - if (pEdQuery && pEdQuery->has_focus() && nSwitch == MouseNotifyEvent::KEYINPUT) + NotifyEventType nSwitch=rNEvt.GetType(); + if (pEdQuery && pEdQuery->has_focus() && nSwitch == NotifyEventType::KEYINPUT) { const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index da547afce6c6..e4f1f0d1f77a 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -187,7 +187,7 @@ namespace frm { if ( IsWindowOrChild( _rNEvt.GetWindow() ) ) { - if ( MouseNotifyEvent::KEYINPUT == _rNEvt.GetType() ) + if ( NotifyEventType::KEYINPUT == _rNEvt.GetType() ) { const ::KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); @@ -278,7 +278,7 @@ namespace frm bool RichTextControl::EventNotify( NotifyEvent& _rNEvt ) { bool bDone = false; - if ( _rNEvt.GetType() == MouseNotifyEvent::COMMAND ) + if ( _rNEvt.GetType() == NotifyEventType::COMMAND ) { const CommandEvent& rEvent = *_rNEvt.GetCommandEvent(); bDone = m_pImpl->HandleCommand( rEvent ); diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 32ff5bcfa098..58a90b2a764a 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -272,7 +272,7 @@ inline TrackingEvent::TrackingEvent( const MouseEvent& rMEvt, } -enum class MouseNotifyEvent +enum class NotifyEventType { NONE = 0, MOUSEBUTTONDOWN = 1, @@ -290,10 +290,10 @@ class VCL_DLLPUBLIC NotifyEvent private: VclPtr<vcl::Window> mpWindow; void* mpData; - MouseNotifyEvent mnEventType; + NotifyEventType mnEventType; public: - NotifyEvent( MouseNotifyEvent nEventType, + NotifyEvent( NotifyEventType nEventType, vcl::Window* pWindow, const void* pEvent = nullptr ); ~NotifyEvent(); @@ -305,7 +305,7 @@ public: NotifyEvent& operator=(const NotifyEvent&) = delete; NotifyEvent& operator=(NotifyEvent&&) = delete; - MouseNotifyEvent GetType() const { return mnEventType; } + NotifyEventType GetType() const { return mnEventType; } vcl::Window* GetWindow() const { return mpWindow; } void* GetData() const { return mpData; } const KeyEvent* GetKeyEvent() const; @@ -315,7 +315,7 @@ public: inline const KeyEvent* NotifyEvent::GetKeyEvent() const { - if ( (mnEventType == MouseNotifyEvent::KEYINPUT) || (mnEventType == MouseNotifyEvent::KEYUP) ) + if ( (mnEventType == NotifyEventType::KEYINPUT) || (mnEventType == NotifyEventType::KEYUP) ) return static_cast<const KeyEvent*>(mpData); else return nullptr; @@ -323,7 +323,7 @@ inline const KeyEvent* NotifyEvent::GetKeyEvent() const inline const MouseEvent* NotifyEvent::GetMouseEvent() const { - if ( (mnEventType >= MouseNotifyEvent::MOUSEBUTTONDOWN) && (mnEventType <= MouseNotifyEvent::MOUSEMOVE) ) + if ( (mnEventType >= NotifyEventType::MOUSEBUTTONDOWN) && (mnEventType <= NotifyEventType::MOUSEMOVE) ) return static_cast<const MouseEvent*>(mpData); else return nullptr; @@ -331,7 +331,7 @@ inline const MouseEvent* NotifyEvent::GetMouseEvent() const inline const CommandEvent* NotifyEvent::GetCommandEvent() const { - if ( mnEventType == MouseNotifyEvent::COMMAND ) + if ( mnEventType == NotifyEventType::COMMAND ) return static_cast<const CommandEvent*>(mpData); else return nullptr; diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index b34c8c944fd8..84d8dad1429f 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -184,7 +184,7 @@ bool ODesignView::PreNotify( NotifyEvent& rNEvt ) bool bRet = ODataView::PreNotify(rNEvt); // 1 := has to be handled here switch(rNEvt.GetType()) { - case MouseNotifyEvent::KEYINPUT: + case NotifyEventType::KEYINPUT: { if ( m_pPropWin && m_pPropWin->HasChildPathFocus() ) return false; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index abec5048910f..157f800c08f4 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2914,8 +2914,8 @@ static void lcl_InitMouseEvent(css::awt::MouseEvent& rEvent, const MouseEvent& r bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - MouseNotifyEvent nType = rNEvt.GetType(); - if ( nType == MouseNotifyEvent::MOUSEBUTTONUP || nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) + NotifyEventType nType = rNEvt.GetType(); + if ( nType == NotifyEventType::MOUSEBUTTONUP || nType == NotifyEventType::MOUSEBUTTONDOWN ) { vcl::Window* pWindow = rNEvt.GetWindow(); if (pWindow == this) @@ -2933,7 +2933,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) lcl_InitMouseEvent( aEvent, *rNEvt.GetMouseEvent() ); if ( rNEvt.GetWindow() ) aEvent.Source = rNEvt.GetWindow()->GetComponentInterface(); - if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN) + if ( nType == NotifyEventType::MOUSEBUTTONDOWN) bDone = pImp->MousePressed( aEvent ); else bDone = pImp->MouseReleased( aEvent ); @@ -2944,7 +2944,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) } if (bDone) // event consumed by a listener { - if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nType == NotifyEventType::MOUSEBUTTONDOWN ) { const MouseEvent* pMouseEvent = rNEvt.GetMouseEvent(); if ( pMouseEvent->IsRight() && pMouseEvent->GetClicks() == 1 ) diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 153a0c52a804..0cfc4b185b49 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -646,7 +646,7 @@ bool ViewShell::Notify(NotifyEvent const & rNEvt, ::sd::Window* pWin) { // handle scroll commands when they arrived at child windows bool bRet = false; - if( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) + if( rNEvt.GetType() == NotifyEventType::COMMAND ) { // note: dynamic_cast is not possible as GetData() returns a void* CommandEvent* pCmdEvent = static_cast< CommandEvent* >(rNEvt.GetData()); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 2d9821d6cba7..b977b15fe2ad 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1596,7 +1596,7 @@ TextWin_Impl::TextWin_Impl( vcl::Window* p ) : DockingWindow( p, 0 ) bool TextWin_Impl::EventNotify( NotifyEvent& rNEvt ) { - if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB ) + if( ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB ) return GetParent()->EventNotify( rNEvt ); else return DockingWindow::EventNotify( rNEvt ); @@ -1979,8 +1979,8 @@ void SfxHelpTextWindow_Impl::Resize() bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - MouseNotifyEvent nType = rNEvt.GetType(); - if ( MouseNotifyEvent::COMMAND == nType && rNEvt.GetCommandEvent() ) + NotifyEventType nType = rNEvt.GetType(); + if ( NotifyEventType::COMMAND == nType && rNEvt.GetCommandEvent() ) { const CommandEvent* pCmdEvt = rNEvt.GetCommandEvent(); vcl::Window* pCmdWin = rNEvt.GetWindow(); @@ -2046,7 +2046,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) bDone = true; } } - else if ( MouseNotifyEvent::KEYINPUT == nType && rNEvt.GetKeyEvent() ) + else if ( NotifyEventType::KEYINPUT == nType && rNEvt.GetKeyEvent() ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); @@ -2492,7 +2492,7 @@ void SfxHelpWindow_Impl::dispose() bool SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { bool bHandled = false; - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { // Backward == <ALT><LEFT> or <BACKSPACE> Forward == <ALT><RIGHT> const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 8f1554659bde..a50253b3243e 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -409,7 +409,7 @@ void BackingWindow::checkInstalledModules() bool BackingWindow::PreNotify(NotifyEvent& rNEvt) { - if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { const KeyEvent* pEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode(pEvt->GetKeyCode()); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 4329b2d908a4..83c01c7f8475 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1442,7 +1442,7 @@ bool SfxDockingWindow::EventNotify( NotifyEvent& rEvt ) if ( !pImpl ) return ResizableDockingWindow::EventNotify( rEvt ); - if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rEvt.GetType() == NotifyEventType::GETFOCUS ) { if (pMgr != nullptr) pBindings->SetActiveFrame( pMgr->GetFrame() ); @@ -1458,7 +1458,7 @@ bool SfxDockingWindow::EventNotify( NotifyEvent& rEvt ) ResizableDockingWindow::EventNotify( rEvt ); return true; } - else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + else if( rEvt.GetType() == NotifyEventType::KEYINPUT ) { // First, allow KeyInput for Dialog functions if (!DockingWindow::EventNotify(rEvt) && SfxViewShell::Current()) @@ -1468,7 +1468,7 @@ bool SfxDockingWindow::EventNotify( NotifyEvent& rEvt ) } return true; } - else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() ) + else if ( rEvt.GetType() == NotifyEventType::LOSEFOCUS && !HasChildPathFocus() ) { pBindings->SetActiveFrame( nullptr ); } diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index e387d2c5ba1c..44403298ae37 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -150,7 +150,7 @@ bool SfxPartDockWnd_Impl::QueryClose() bool SfxPartDockWnd_Impl::EventNotify( NotifyEvent& rEvt ) { - if( rEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if( rEvt.GetType() == NotifyEventType::GETFOCUS ) { SfxChildWindow* pChild = GetChildWindow_Impl(); if( pChild ) diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index 78929e5b1799..b4e7a7560efb 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -222,7 +222,7 @@ void NotebookbarTabControl::KeyInput( const KeyEvent& rKEvt ) bool NotebookbarTabControl::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nCode = rKey.GetCode(); diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 0a22eb08848c..18000601bfd0 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -125,8 +125,8 @@ SfxChildAlignment SidebarDockingWindow::CheckAlignment ( bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent) { - MouseNotifyEvent nType = rEvent.GetType(); - if (MouseNotifyEvent::KEYINPUT == nType) + NotifyEventType nType = rEvent.GetType(); + if (NotifyEventType::KEYINPUT == nType) { const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode(); switch (rKeyCode.GetCode()) @@ -170,7 +170,7 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent) return true; } } - else if (MouseNotifyEvent::MOUSEBUTTONDOWN == nType) + else if (NotifyEventType::MOUSEBUTTONDOWN == nType) { const MouseEvent *mEvt = rEvent.GetMouseEvent(); if (mEvt->IsLeft()) @@ -180,7 +180,7 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent) mbIsReadyToDrag = true; } } - else if (MouseNotifyEvent::MOUSEMOVE == nType) + else if (NotifyEventType::MOUSEMOVE == nType) { const MouseEvent *mEvt = rEvent.GetMouseEvent(); tools::Rectangle aGrip = mpSidebarController->GetDeckDragArea(); diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 936fdbdd4ddc..cc6bbec39080 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -138,7 +138,7 @@ void SidebarToolBox::InsertItem(const OUString& rCommand, bool SidebarToolBox::EventNotify (NotifyEvent& rEvent) { - if (rEvent.GetType() == MouseNotifyEvent::KEYINPUT) + if (rEvent.GetType() == NotifyEventType::KEYINPUT) { if (rEvent.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB) { diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 3601180e9f3d..bd73322f9496 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -178,8 +178,8 @@ void TabBar::DataChanged(const DataChangedEvent& rDataChangedEvent) bool TabBar::EventNotify(NotifyEvent& rEvent) { - MouseNotifyEvent nType = rEvent.GetType(); - if(MouseNotifyEvent::KEYINPUT == nType) + NotifyEventType nType = rEvent.GetType(); + if(NotifyEventType::KEYINPUT == nType) { const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode(); if (!mpAccel) @@ -193,7 +193,7 @@ bool TabBar::EventNotify(NotifyEvent& rEvent) return InterimItemWindow::EventNotify(rEvent); return true; } - else if(MouseNotifyEvent::COMMAND == nType) + else if(NotifyEventType::COMMAND == nType) { const CommandEvent& rCommandEvent = *rEvent.GetCommandEvent(); if(rCommandEvent.GetCommand() == CommandEventId::Wheel) diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index fa02f8106415..5071dda0056b 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -102,7 +102,7 @@ bool SfxFrameWindow_Impl::EventNotify( NotifyEvent& rNEvt ) if ( !pView || !pView->GetObjectShell() ) return Window::EventNotify( rNEvt ); - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) { if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !m_pFrame->IsInPlace() ) { @@ -115,7 +115,7 @@ bool SfxFrameWindow_Impl::EventNotify( NotifyEvent& rNEvt ) pView->GetBindings().Invalidate( SID_PASTE_SPECIAL ); return true; } - else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + else if( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) ) return true; @@ -134,15 +134,15 @@ IMPL_LINK(SfxFrameWindow_Impl, ModalHierarchyHdl, bool, bSetModal, void) bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { - MouseNotifyEvent nType = rNEvt.GetType(); - if ( nType == MouseNotifyEvent::KEYINPUT || nType == MouseNotifyEvent::KEYUP ) + NotifyEventType nType = rNEvt.GetType(); + if ( nType == NotifyEventType::KEYINPUT || nType == NotifyEventType::KEYUP ) { SfxViewFrame* pView = m_pFrame->GetCurrentViewFrame(); SfxViewShell* pShell = pView ? pView->GetViewShell() : nullptr; if ( pShell && pShell->HasKeyListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) ) return true; } - else if ( nType == MouseNotifyEvent::MOUSEBUTTONUP || nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) + else if ( nType == NotifyEventType::MOUSEBUTTONUP || nType == NotifyEventType::MOUSEBUTTONDOWN ) { vcl::Window* pWindow = rNEvt.GetWindow(); SfxViewFrame* pView = m_pFrame->GetCurrentViewFrame(); @@ -153,7 +153,7 @@ bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt ) return true; } - if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nType == NotifyEventType::MOUSEBUTTONDOWN ) { vcl::Window* pWindow = rNEvt.GetWindow(); const MouseEvent* pMEvent = rNEvt.GetMouseEvent(); diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx index f1f0d365d3c4..72c2496502dd 100644 --- a/sfx2/source/view/userinputinterception.cxx +++ b/sfx2/source/view/userinputinterception.cxx @@ -173,13 +173,13 @@ namespace sfx2 { Reference < XInterface > xHoldAlive( m_pData->m_rControllerImpl ); - MouseNotifyEvent nType = _rEvent.GetType(); + NotifyEventType nType = _rEvent.GetType(); bool bHandled = false; switch ( nType ) { - case MouseNotifyEvent::KEYINPUT: - case MouseNotifyEvent::KEYUP: + case NotifyEventType::KEYINPUT: + case NotifyEventType::KEYUP: { KeyEvent aEvent; lcl_initKeyEvent( aEvent, *_rEvent.GetKeyEvent() ); @@ -192,7 +192,7 @@ namespace sfx2 Reference< XKeyHandler > xHandler( aIterator.next() ); try { - if ( nType == MouseNotifyEvent::KEYINPUT ) + if ( nType == NotifyEventType::KEYINPUT ) bHandled = xHandler->keyPressed( aEvent ); else bHandled = xHandler->keyReleased( aEvent ); @@ -213,8 +213,8 @@ namespace sfx2 } break; - case MouseNotifyEvent::MOUSEBUTTONDOWN: - case MouseNotifyEvent::MOUSEBUTTONUP: + case NotifyEventType::MOUSEBUTTONDOWN: + case NotifyEventType::MOUSEBUTTONUP: { MouseEvent aEvent; lcl_initMouseEvent( aEvent, *_rEvent.GetMouseEvent() ); @@ -227,7 +227,7 @@ namespace sfx2 Reference< XMouseClickHandler > xHandler( aIterator.next() ); try { - if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nType == NotifyEventType::MOUSEBUTTONDOWN ) bHandled = xHandler->mousePressed( aEvent ); else bHandled = xHandler->mouseReleased( aEvent ); diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 8cadf47483f2..46f3379b7847 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -623,7 +623,7 @@ namespace svt bool EditBrowseBox::PreNotify(NotifyEvent& rEvt) { - if (rEvt.GetType() == MouseNotifyEvent::KEYINPUT) + if (rEvt.GetType() == NotifyEventType::KEYINPUT) { if ( (IsEditing() && ControlHasFocus()) || rEvt.GetWindow() == &GetDataWindow() @@ -647,11 +647,11 @@ namespace svt { switch (rEvt.GetType()) { - case MouseNotifyEvent::GETFOCUS: + case NotifyEventType::GETFOCUS: DetermineFocus(getRealGetFocusFlags(this)); break; - case MouseNotifyEvent::LOSEFOCUS: + case NotifyEventType::LOSEFOCUS: DetermineFocus(); break; diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index a1a074c4470a..700c1c37767b 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -1303,7 +1303,7 @@ void TabBar::Resize() bool TabBar::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == MouseNotifyEvent::COMMAND) + if (rNEvt.GetType() == NotifyEventType::COMMAND) { if (rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) { diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 3f147cda1b49..3488e211f266 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2951,7 +2951,7 @@ bool DbGridControl::PreNotify(NotifyEvent& rEvt) switch (rEvt.GetType()) { - case MouseNotifyEvent::KEYINPUT: + case NotifyEventType::KEYINPUT: { const KeyEvent* pKeyEvent = rEvt.GetKeyEvent(); diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 7747eda88616..37e28b995cb1 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -404,7 +404,7 @@ void SvxColorDockingWindow::GetFocus() bool SvxColorDockingWindow::EventNotify( NotifyEvent& rNEvt ) { bool bRet = false; - if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); diff --git a/toolkit/source/controls/table/tabledatawindow.cxx b/toolkit/source/controls/table/tabledatawindow.cxx index 46c742e3c472..fc49ee08d621 100644 --- a/toolkit/source/controls/table/tabledatawindow.cxx +++ b/toolkit/source/controls/table/tabledatawindow.cxx @@ -180,7 +180,7 @@ namespace svt::table bool TableDataWindow::EventNotify(NotifyEvent& rNEvt ) { bool bDone = false; - if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) + if ( rNEvt.GetType() == NotifyEventType::COMMAND ) { const CommandEvent& rCEvt = *rNEvt.GetCommandEvent(); if ( rCEvt.GetCommand() == CommandEventId::Wheel ) diff --git a/toolkit/source/hatchwindow/ipwin.cxx b/toolkit/source/hatchwindow/ipwin.cxx index 140fd95bda91..d21e94166c7c 100644 --- a/toolkit/source/hatchwindow/ipwin.cxx +++ b/toolkit/source/hatchwindow/ipwin.cxx @@ -596,7 +596,7 @@ void SvResizeWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rect bool SvResizeWindow::PreNotify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS && !m_bActive ) + if ( rEvt.GetType() == NotifyEventType::GETFOCUS && !m_bActive ) { m_bActive = true; m_pWrapper->Activated(); @@ -607,7 +607,7 @@ bool SvResizeWindow::PreNotify( NotifyEvent& rEvt ) bool SvResizeWindow::EventNotify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && m_bActive ) + if ( rEvt.GetType() == NotifyEventType::LOSEFOCUS && m_bActive ) { bool bHasFocus = HasChildPathFocus(true); if ( !bHasFocus ) diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 3021e8bc7b6b..639bee80e82c 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -49,7 +49,7 @@ namespace vcl { class WindowData; } class SalFrame; class SalObject; enum class MouseEventModifiers; -enum class MouseNotifyEvent; +enum class NotifyEventType; enum class ActivateModeFlags; enum class DialogControlFlags; enum class GetFocusFlags; @@ -423,11 +423,11 @@ typedef std::unique_ptr<PaintBufferGuard, o3tl::default_delete<PaintBufferGuard> // helper methods -bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave, +bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, NotifyEventType nSVEvent, bool bMouseLeave, tools::Long nX, tools::Long nY, sal_uInt64 nMsgTime, sal_uInt16 nCode, MouseEventModifiers nMode ); -bool ImplLOKHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave, +bool ImplLOKHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, NotifyEventType nSVEvent, bool bMouseLeave, tools::Long nX, tools::Long nY, sal_uInt64 nMsgTime, sal_uInt16 nCode, MouseEventModifiers nMode, sal_uInt16 nClicks); diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 6ac198554fb0..8861d7b9cf47 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -478,7 +478,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) const Point aPoint; CommandMediaData aMediaData(nCommand); CommandEvent aCEvt( aPoint, CommandEventId::Media, false, &aMediaData ); - NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt ); + NotifyEvent aNCmdEvt( NotifyEventType::COMMAND, pWindow, &aCEvt ); if ( !ImplCallPreNotify( aNCmdEvt ) ) pWindow->Command( aCEvt ); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index b5544586d341..f18f580c83a2 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -947,7 +947,7 @@ bool Application::LOKHandleMouseEvent(VclEventId nEvent, vcl::Window* pWindow, c { case VclEventId::WindowMouseMove: aMouseEvent.mnButton = 0; - bSuccess = ImplLOKHandleMouseEvent(pWindow, MouseNotifyEvent::MOUSEMOVE, false, + bSuccess = ImplLOKHandleMouseEvent(pWindow, NotifyEventType::MOUSEMOVE, false, aMouseEvent.mnX, aMouseEvent.mnY, aMouseEvent.mnTime, aMouseEvent.mnCode, ImplGetMouseMoveMode(&aMouseEvent), @@ -956,7 +956,7 @@ bool Application::LOKHandleMouseEvent(VclEventId nEvent, vcl::Window* pWindow, c case VclEventId::WindowMouseButtonDown: aMouseEvent.mnButton = pEvent->GetButtons(); - bSuccess = ImplLOKHandleMouseEvent(pWindow, MouseNotifyEvent::MOUSEBUTTONDOWN, false, + bSuccess = ImplLOKHandleMouseEvent(pWindow, NotifyEventType::MOUSEBUTTONDOWN, false, aMouseEvent.mnX, aMouseEvent.mnY, aMouseEvent.mnTime, #ifdef MACOSX @@ -972,7 +972,7 @@ bool Application::LOKHandleMouseEvent(VclEventId nEvent, vcl::Window* pWindow, c case VclEventId::WindowMouseButtonUp: aMouseEvent.mnButton = pEvent->GetButtons(); - bSuccess = ImplLOKHandleMouseEvent(pWindow, MouseNotifyEvent::MOUSEBUTTONUP, false, + bSuccess = ImplLOKHandleMouseEvent(pWindow, NotifyEventType::MOUSEBUTTONUP, false, aMouseEvent.mnX, aMouseEvent.mnY, aMouseEvent.mnTime, #ifdef MACOSX diff --git a/vcl/source/control/InterimItemWindow.cxx b/vcl/source/control/InterimItemWindow.cxx index 0017065d7ddb..31b92d2f4d31 100644 --- a/vcl/source/control/InterimItemWindow.cxx +++ b/vcl/source/control/InterimItemWindow.cxx @@ -139,7 +139,7 @@ void InterimItemWindow::GetFocus() the toolbox */ vcl::Window* pToolBox = GetParent(); - NotifyEvent aNEvt(MouseNotifyEvent::GETFOCUS, this); + NotifyEvent aNEvt(NotifyEventType::GETFOCUS, this); pToolBox->EventNotify(aNEvt); } @@ -172,7 +172,7 @@ bool InterimItemWindow::ChildKeyInput(const KeyEvent& rKEvt) to this toolitem in case tab means to move to another toolitem within the toolbox */ - NotifyEvent aNEvt(MouseNotifyEvent::GETFOCUS, this); + NotifyEvent aNEvt(NotifyEventType::GETFOCUS, this); pToolBox->EventNotify(aNEvt); /* send parent the tab */ diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index ae97d953b4c3..86eae5be89c4 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1543,7 +1543,7 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt ) bool PushButton::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if( pMouseEvt && (pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow()) ) @@ -2667,7 +2667,7 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt ) bool RadioButton::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if( pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) @@ -3548,7 +3548,7 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt ) bool CheckBox::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if( pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 6c33b209710f..568b91d6cf31 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -716,7 +716,7 @@ void ComboBox::DataChanged( const DataChangedEvent& rDCEvt ) bool ComboBox::EventNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if ((rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) + if ((rNEvt.GetType() == NotifyEventType::KEYINPUT) && (rNEvt.GetWindow() == m_pImpl->m_pSubEdit) && !IsReadOnly()) { @@ -768,14 +768,14 @@ bool ComboBox::EventNotify( NotifyEvent& rNEvt ) break; } } - else if ((rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) && m_pImpl->m_pFloatWin) + else if ((rNEvt.GetType() == NotifyEventType::LOSEFOCUS) && m_pImpl->m_pFloatWin) { if (m_pImpl->m_pFloatWin->HasChildPathFocus()) m_pImpl->m_pSubEdit->GrabFocus(); else if (m_pImpl->m_pFloatWin->IsInPopupMode() && !HasChildPathFocus(true)) m_pImpl->m_pFloatWin->EndPopupMode(); } - else if( (rNEvt.GetType() == MouseNotifyEvent::COMMAND) && + else if( (rNEvt.GetType() == NotifyEventType::COMMAND) && (rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) && (rNEvt.GetWindow() == m_pImpl->m_pSubEdit) ) { @@ -793,7 +793,7 @@ bool ComboBox::EventNotify( NotifyEvent& rNEvt ) bDone = false; // don't eat this event, let the default handling happen (i.e. scroll the context) } } - else if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN) + else if ((rNEvt.GetType() == NotifyEventType::MOUSEBUTTONDOWN) && (rNEvt.GetWindow() == GetMainWindow())) { m_pImpl->m_pSubEdit->GrabFocus(); diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 0ad2247b5488..a37c8741d1da 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -225,7 +225,7 @@ OUString Control::GetDisplayText() const bool Control::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) { if ( !mbHasControlFocus ) { @@ -238,7 +238,7 @@ bool Control::EventNotify( NotifyEvent& rNEvt ) } else { - if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { vcl::Window* pFocusWin = Application::GetFocusWindow(); if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) ) diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 914e2c2c2035..052569ff01d0 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -853,7 +853,7 @@ Size NumericBox::CalcMinimumSize() const bool NumericBox::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplNumericProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; @@ -864,9 +864,9 @@ bool NumericBox::PreNotify( NotifyEvent& rNEvt ) bool NumericBox::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); @@ -1472,7 +1472,7 @@ sal_Int64 MetricField::GetLast( FieldUnit eOutUnit ) const bool MetricField::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplMetricProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; @@ -1483,9 +1483,9 @@ bool MetricField::PreNotify( NotifyEvent& rNEvt ) bool MetricField::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); @@ -1585,7 +1585,7 @@ Size MetricBox::CalcMinimumSize() const bool MetricBox::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplMetricProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; @@ -1596,9 +1596,9 @@ bool MetricBox::PreNotify( NotifyEvent& rNEvt ) bool MetricBox::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); @@ -1740,7 +1740,7 @@ void CurrencyField::dispose() bool CurrencyField::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; @@ -1751,9 +1751,9 @@ bool CurrencyField::PreNotify( NotifyEvent& rNEvt ) bool CurrencyField::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); @@ -1823,7 +1823,7 @@ void CurrencyBox::dispose() bool CurrencyBox::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; @@ -1834,9 +1834,9 @@ bool CurrencyBox::PreNotify( NotifyEvent& rNEvt ) bool CurrencyBox::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 89efabf08c3f..89eaf795077c 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1068,7 +1068,7 @@ namespace bool PatternField::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { EditImplementation aAdapt(*GetField()); if ( ImplPatternProcessKeyInput( aAdapt, *rNEvt.GetKeyEvent(), GetEditMask(), GetLiteralMask(), @@ -1082,9 +1082,9 @@ bool PatternField::PreNotify( NotifyEvent& rNEvt ) bool PatternField::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); @@ -1121,7 +1121,7 @@ void PatternBox::dispose() bool PatternBox::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { EditImplementation aAdapt(*GetField()); if ( ImplPatternProcessKeyInput( aAdapt, *rNEvt.GetKeyEvent(), GetEditMask(), GetLiteralMask(), @@ -1135,9 +1135,9 @@ bool PatternBox::PreNotify( NotifyEvent& rNEvt ) bool PatternBox::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); @@ -2024,7 +2024,7 @@ void DateField::dispose() bool DateField::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && IsStrictFormat() && + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && IsStrictFormat() && ( GetExtDateFormat() != ExtDateFieldFormat::SystemLong ) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { @@ -2037,9 +2037,9 @@ bool DateField::PreNotify( NotifyEvent& rNEvt ) bool DateField::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() ) { @@ -2129,7 +2129,7 @@ void DateBox::dispose() bool DateBox::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && IsStrictFormat() && + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && IsStrictFormat() && ( GetExtDateFormat() != ExtDateFieldFormat::SystemLong ) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { @@ -2153,9 +2153,9 @@ void DateBox::DataChanged( const DataChangedEvent& rDCEvt ) bool DateBox::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() ) { @@ -2897,7 +2897,7 @@ void TimeField::dispose() bool TimeField::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplTimeProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsDuration(), GetFormat(), ImplGetLocaleDataWrapper() ) ) return true; @@ -2908,9 +2908,9 @@ bool TimeField::PreNotify( NotifyEvent& rNEvt ) bool TimeField::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) { @@ -3039,7 +3039,7 @@ void TimeBox::dispose() bool TimeBox::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplTimeProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsDuration(), GetFormat(), ImplGetLocaleDataWrapper() ) ) return true; @@ -3050,9 +3050,9 @@ bool TimeBox::PreNotify( NotifyEvent& rNEvt ) bool TimeBox::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) MarkToBeReformatted( false ); - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) Reformat(); diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx index fdf45c7cc521..d48f4c7560b0 100644 --- a/vcl/source/control/fmtfield.cxx +++ b/vcl/source/control/fmtfield.cxx @@ -1256,14 +1256,14 @@ void FormattedField::Modify() bool FormattedField::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) + if (rNEvt.GetType() == NotifyEventType::KEYINPUT) GetFormatter().SetLastSelection(GetSelection()); return SpinField::PreNotify(rNEvt); } bool FormattedField::EventNotify(NotifyEvent& rNEvt) { - if ((rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !IsReadOnly()) + if ((rNEvt.GetType() == NotifyEventType::KEYINPUT) && !IsReadOnly()) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier(); @@ -1285,7 +1285,7 @@ bool FormattedField::EventNotify(NotifyEvent& rNEvt) } } - if ((rNEvt.GetType() == MouseNotifyEvent::COMMAND) && !IsReadOnly()) + if ((rNEvt.GetType() == NotifyEventType::COMMAND) && !IsReadOnly()) { const CommandEvent* pCommand = rNEvt.GetCommandEvent(); if (pCommand->GetCommand() == CommandEventId::Wheel) @@ -1303,7 +1303,7 @@ bool FormattedField::EventNotify(NotifyEvent& rNEvt) } } - if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && m_pFormatter) + if (rNEvt.GetType() == NotifyEventType::LOSEFOCUS && m_pFormatter) m_pFormatter->EntryLostFocus(); return SpinField::EventNotify( rNEvt ); diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 0bf583b073fd..bdc3f833f270 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2382,7 +2382,7 @@ void ImplListBox::StateChanged( StateChangedType nType ) bool ImplListBox::EventNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) + if ( rNEvt.GetType() == NotifyEventType::COMMAND ) { const CommandEvent& rCEvt = *rNEvt.GetCommandEvent(); if ( rCEvt.GetCommand() == CommandEventId::Wheel ) @@ -2509,7 +2509,7 @@ void ImplWin::FillLayoutData() const bool ImplWin::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if( pMouseEvt && (pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow()) ) @@ -2834,7 +2834,7 @@ void ImplListBoxFloatingWindow::dispose() bool ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + if( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if( !GetParent()->HasChildPathFocus( true ) ) EndPopupMode(); diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index c8c8b0c8d63e..12d8744f5210 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -814,7 +814,7 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt ) bool bDone = false; if ( mpImplLB ) { - if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && ( rNEvt.GetWindow() == mpImplWin ) ) + if( ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) && ( rNEvt.GetWindow() == mpImplWin ) ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); switch( aKeyEvt.GetKeyCode().GetCode() ) @@ -866,12 +866,12 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt ) } } } - else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( IsInDropDown() && !HasChildPathFocus( true ) ) mpFloatWin->EndPopupMode(); } - else if ( (rNEvt.GetType() == MouseNotifyEvent::COMMAND) && + else if ( (rNEvt.GetType() == NotifyEventType::COMMAND) && (rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) && (rNEvt.GetWindow() == mpImplWin) ) { diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index c2c6e413442e..1d942d1e5608 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -388,11 +388,11 @@ LongCurrencyBox::LongCurrencyBox(vcl::Window* pParent, WinBits nWinStyle) bool LongCurrencyBox::EventNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if( rNEvt.GetType() == NotifyEventType::GETFOCUS ) { MarkToBeReformatted( false ); } - else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { if ( MustBeReformatted() ) { diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx index abbd0c122615..2c2cba25a4c5 100644 --- a/vcl/source/control/notebookbar.cxx +++ b/vcl/source/control/notebookbar.cxx @@ -157,7 +157,7 @@ void NotebookBar::dispose() bool NotebookBar::PreNotify(NotifyEvent& rNEvt) { // capture KeyEvents for taskpane cycling - if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) + if (rNEvt.GetType() == NotifyEventType::KEYINPUT) { if (m_pSystemWindow) return m_pSystemWindow->PreNotify(rNEvt); diff --git a/vcl/source/control/roadmap.cxx b/vcl/source/control/roadmap.cxx index 7142c4dacaf4..b45f219f62d0 100644 --- a/vcl/source/control/roadmap.cxx +++ b/vcl/source/control/roadmap.cxx @@ -598,7 +598,7 @@ RoadmapItem* ORoadmap::GetByPointer(vcl::Window const * pWindow) bool ORoadmap::PreNotify(NotifyEvent& _rNEvt) { // capture KeyEvents for taskpane cycling - if ( _rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( _rNEvt.GetType() == NotifyEventType::KEYINPUT ) { vcl::Window* pWindow = _rNEvt.GetWindow(); RoadmapItem* pItem = GetByPointer( pWindow ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index b64dc77a9013..b652360139c4 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -1251,7 +1251,7 @@ tools::Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt ) bool ScrollBar::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if( pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index a6c4329bbfe9..d56138c6cde4 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -431,7 +431,7 @@ tools::Rectangle* SpinButton::ImplFindPartRect( const Point& rPt ) bool SpinButton::PreNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) + if (rNEvt.GetType() == NotifyEventType::MOUSEMOVE) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if (pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged()) diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 6bc1fac297a9..51d66131160a 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -485,7 +485,7 @@ void SpinField::MouseMove(const MouseEvent& rMEvt) bool SpinField::EventNotify(NotifyEvent& rNEvt) { bool bDone = false; - if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) + if (rNEvt.GetType() == NotifyEventType::KEYINPUT) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); if (!IsReadOnly()) @@ -539,7 +539,7 @@ bool SpinField::EventNotify(NotifyEvent& rNEvt) } } - if (rNEvt.GetType() == MouseNotifyEvent::COMMAND) + if (rNEvt.GetType() == NotifyEventType::COMMAND) { if ((rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) && !IsReadOnly()) { @@ -857,7 +857,7 @@ tools::Rectangle* SpinField::ImplFindPartRect(const Point& rPt) bool SpinField::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) + if (rNEvt.GetType() == NotifyEventType::MOUSEMOVE) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if (pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged()) diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index c55e2820c297..cd37a777f5bf 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1559,7 +1559,7 @@ ImplTabItem* TabControl::ImplGetItem(const Point& rPt) const bool TabControl::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if( pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) @@ -1610,7 +1610,7 @@ bool TabControl::EventNotify( NotifyEvent& rNEvt ) { bool bRet = false; - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) bRet = ImplHandleKeyEvent( *rNEvt.GetKeyEvent() ); return bRet || Control::EventNotify( rNEvt ); diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx index de95b3031d36..86176f2fc7ac 100644 --- a/vcl/source/control/wizardmachine.cxx +++ b/vcl/source/control/wizardmachine.cxx @@ -429,7 +429,7 @@ namespace vcl bool RoadmapWizard::EventNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && mpPrevBtn && mpNextBtn ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) && mpPrevBtn && mpNextBtn ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 82b79b2931c3..d24e118b4f7e 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1326,7 +1326,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, SystemTextCo bool VclMultiLineEdit::EventNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) + if( rNEvt.GetType() == NotifyEventType::COMMAND ) { bDone = pImpVclMEdit->HandleCommand( *rNEvt.GetCommandEvent() ); } @@ -1337,7 +1337,7 @@ bool VclMultiLineEdit::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && ( !GetTextView()->IsCursorEnabled() ) ) + if( ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) && ( !GetTextView()->IsCursorEnabled() ) ) { const KeyEvent& rKEvent = *rNEvt.GetKeyEvent(); if ( !rKEvent.GetKeyCode().IsShift() && ( rKEvent.GetKeyCode().GetGroup() == KEYGROUP_CURSOR ) ) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index fd6fb710c0af..d241d37d77a3 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -659,7 +659,7 @@ bool Dialog::EventNotify( NotifyEvent& rNEvt ) bool bRet = SystemWindow::EventNotify( rNEvt ); if ( !bRet ) { - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); @@ -676,7 +676,7 @@ bool Dialog::EventNotify( NotifyEvent& rNEvt ) return true; } } - else if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + else if ( rNEvt.GetType() == NotifyEventType::GETFOCUS ) { // make sure the dialog is still modal // changing focus between application frames may diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 328fcd35ff6a..89c28f08d502 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -723,11 +723,11 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) // in case AROUND is being processed if ( pTempWindow && (pTempWindow == pSWindow) ) { - NotifyEvent aNEvt1( MouseNotifyEvent::LOSEFOCUS, pSWindow ); + NotifyEvent aNEvt1( NotifyEventType::LOSEFOCUS, pSWindow ); if ( !ImplCallPreNotify( aNEvt1 ) ) pSWindow->CompatLoseFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = nGetFocusFlags | GetFocusFlags::Around; - NotifyEvent aNEvt2( MouseNotifyEvent::GETFOCUS, pSWindow ); + NotifyEvent aNEvt2( NotifyEventType::GETFOCUS, pSWindow ); if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->CompatGetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = GetFocusFlags::NONE; @@ -854,11 +854,11 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) // in case AROUND is being processed if ( pWindow == pSWindow ) { - NotifyEvent aNEvt1( MouseNotifyEvent::LOSEFOCUS, pSWindow ); + NotifyEvent aNEvt1( NotifyEventType::LOSEFOCUS, pSWindow ); if ( !ImplCallPreNotify( aNEvt1 ) ) pSWindow->CompatLoseFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = nGetFocusFlags | GetFocusFlags::Around; - NotifyEvent aNEvt2( MouseNotifyEvent::GETFOCUS, pSWindow ); + NotifyEvent aNEvt2( NotifyEventType::GETFOCUS, pSWindow ); if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->CompatGetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = GetFocusFlags::NONE; diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 471757f6a861..74c18cca5159 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -531,7 +531,7 @@ bool DockingWindow::EventNotify( NotifyEvent& rNEvt ) { const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported(); - if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( rNEvt.GetType() == NotifyEventType::MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); if ( pMEvt->IsLeft() ) @@ -563,7 +563,7 @@ bool DockingWindow::EventNotify( NotifyEvent& rNEvt ) } } } - else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + else if( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() && diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 4b4623e8761a..51e133f82fa0 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -57,7 +57,7 @@ bool Window::PreNotify( NotifyEvent& rNEvt ) if ( !bDone ) { - if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + if( rNEvt.GetType() == NotifyEventType::GETFOCUS ) { bool bCompoundFocusChanged = false; if ( mpWindowImpl->mbCompoundControl && !mpWindowImpl->mbCompoundControlHasFocus && HasChildPathFocus() ) @@ -69,7 +69,7 @@ bool Window::PreNotify( NotifyEvent& rNEvt ) if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) CallEventListeners( VclEventId::WindowGetFocus ); } - else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { bool bCompoundFocusChanged = false; if ( mpWindowImpl->mbCompoundControl && mpWindowImpl->mbCompoundControlHasFocus && !HasChildPathFocus() ) @@ -116,7 +116,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt ) { const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported(); - if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( rNEvt.GetType() == NotifyEventType::MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); bool bHit = pWrapper->GetDragArea().Contains( pMEvt->GetPosPixel() ); @@ -136,7 +136,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt ) } } } - else if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + else if ( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); bool bHit = pWrapper->GetDragArea().Contains( pMEvt->GetPosPixel() ); @@ -159,7 +159,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt ) return true; } } - else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + else if( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); if (rKey.GetCode() == KEY_F10 && rKey.GetModifier() && @@ -183,7 +183,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt ) if ( (GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL ) { // if the parent also has dialog control activated, the parent takes over control - if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) || (rNEvt.GetType() == MouseNotifyEvent::KEYUP) ) + if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) || (rNEvt.GetType() == NotifyEventType::KEYUP) ) { // ScGridWindow has WB_DIALOGCONTROL set, so pressing tab in ScCheckListMenuControl won't // get processed here by the toplevel DockingWindow of ScCheckListMenuControl by @@ -191,13 +191,13 @@ bool Window::EventNotify( NotifyEvent& rNEvt ) bool bTopLevelFloatingWindow = (pWrapper && pWrapper->IsFloatingMode()); if (ImplIsOverlapWindow() || parentNotDialogControl(this) || bTopLevelFloatingWindow) { - bRet = ImplDlgCtrl( *rNEvt.GetKeyEvent(), rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ); + bRet = ImplDlgCtrl( *rNEvt.GetKeyEvent(), rNEvt.GetType() == NotifyEventType::KEYINPUT ); } } - else if ( (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) || (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) ) + else if ( (rNEvt.GetType() == NotifyEventType::GETFOCUS) || (rNEvt.GetType() == NotifyEventType::LOSEFOCUS) ) { - ImplDlgCtrlFocusChanged( rNEvt.GetWindow(), rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ); - if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) && + ImplDlgCtrlFocusChanged( rNEvt.GetWindow(), rNEvt.GetType() == NotifyEventType::GETFOCUS ); + if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == NotifyEventType::GETFOCUS) && !(GetStyle() & WB_TABSTOP) && !(mpWindowImpl->mnDlgCtrlFlags & DialogControlFlags::WantFocus) ) { vcl::Window* pFirstChild = ImplGetDlgWindow( 0, GetDlgWindowType::First ); @@ -377,7 +377,7 @@ static MouseEvent ImplTranslateMouseEvent( const MouseEvent& rE, vcl::Window con void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) + if( rNEvt.GetType() == NotifyEventType::COMMAND ) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); if ( pCEvt->GetCommand() != CommandEventId::ContextMenu ) @@ -419,7 +419,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ) VclPtr<vcl::Window> xWindow = this; - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) ) { @@ -432,7 +432,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ) } } } - else if( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONUP ) + else if( rNEvt.GetType() == NotifyEventType::MOUSEBUTTONUP ) { if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) ) { @@ -445,7 +445,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ) } } } - else if( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) + else if( rNEvt.GetType() == NotifyEventType::MOUSEBUTTONDOWN ) { if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) ) { @@ -458,12 +458,12 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ) } } } - else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + else if( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) ) CallEventListeners( VclEventId::WindowKeyInput, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) ); } - else if( rNEvt.GetType() == MouseNotifyEvent::KEYUP ) + else if( rNEvt.GetType() == NotifyEventType::KEYUP ) { if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) ) CallEventListeners( VclEventId::WindowKeyUp, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) ); @@ -656,7 +656,7 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow, } /* namespace vcl */ -NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow, +NotifyEvent::NotifyEvent( NotifyEventType nEventType, vcl::Window* pWindow, const void* pEvent ) { mpWindow = pWindow; diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 094a3ef184a2..5798ff4f8c40 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -634,7 +634,7 @@ bool FloatingWindow::EventNotify( NotifyEvent& rNEvt ) bool bRet = SystemWindow::EventNotify( rNEvt ); if ( !bRet ) { - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 204c0d3e7c8a..a650a0bf92ab 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2107,7 +2107,7 @@ bool VclScrolledWindow::set_property(const OString &rKey, const OUString &rValue bool VclScrolledWindow::EventNotify(NotifyEvent& rNEvt) { bool bDone = false; - if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) + if ( rNEvt.GetType() == NotifyEventType::COMMAND ) { const CommandEvent& rCEvt = *rNEvt.GetCommandEvent(); if ( rCEvt.GetCommand() == CommandEventId::Wheel ) diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 2f85ddbd39d6..9b86199fd03c 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -151,7 +151,7 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged ) nMode |= MouseEventModifiers::SYNTHETIC; if ( bModChanged ) nMode |= MouseEventModifiers::MODIFIERCHANGED; - ImplHandleMouseEvent( mpWindowImpl->mpFrameWindow, MouseNotifyEvent::MOUSEMOVE, bLeave, nX, nY, nTime, nCode, nMode ); + ImplHandleMouseEvent( mpWindowImpl->mpFrameWindow, NotifyEventType::MOUSEMOVE, bLeave, nX, nY, nTime, nCode, nMode ); } void Window::ImplGenerateMouseMove() @@ -351,7 +351,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) // call Get- and LoseFocus if ( pOldFocusWindow && ! pOldFocusWindow->isDisposed() ) { - NotifyEvent aNEvt( MouseNotifyEvent::LOSEFOCUS, pOldFocusWindow ); + NotifyEvent aNEvt( NotifyEventType::LOSEFOCUS, pOldFocusWindow ); if ( !ImplCallPreNotify( aNEvt ) ) pOldFocusWindow->CompatLoseFocus(); pOldFocusWindow->ImplCallDeactivateListeners( this ); @@ -379,7 +379,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) ! pOldFocusWindow->isDisposed() && ( pOldFocusWindow->GetDialogControlFlags() & DialogControlFlags::FloatWinPopupModeEndCancel ) ) mpWindowImpl->mnGetFocusFlags |= GetFocusFlags::FloatWinPopupModeEndCancel; - NotifyEvent aNEvt( MouseNotifyEvent::GETFOCUS, this ); + NotifyEvent aNEvt( NotifyEventType::GETFOCUS, this ); if ( !ImplCallPreNotify( aNEvt ) && !xWindow->isDisposed() ) CompatGetFocus(); if( !xWindow->isDisposed() ) @@ -413,20 +413,20 @@ void Window::ImplGrabFocusToDocument( GetFocusFlags nFlags ) void Window::MouseMove( const MouseEvent& rMEvt ) { - NotifyEvent aNEvt( MouseNotifyEvent::MOUSEMOVE, this, &rMEvt ); + NotifyEvent aNEvt( NotifyEventType::MOUSEMOVE, this, &rMEvt ); EventNotify(aNEvt); } void Window::MouseButtonDown( const MouseEvent& rMEvt ) { - NotifyEvent aNEvt( MouseNotifyEvent::MOUSEBUTTONDOWN, this, &rMEvt ); + NotifyEvent aNEvt( NotifyEventType::MOUSEBUTTONDOWN, this, &rMEvt ); if (!EventNotify(aNEvt)) mpWindowImpl->mbMouseButtonDown = true; } void Window::MouseButtonUp( const MouseEvent& rMEvt ) { - NotifyEvent aNEvt( MouseNotifyEvent::MOUSEBUTTONUP, this, &rMEvt ); + NotifyEvent aNEvt( NotifyEventType::MOUSEBUTTONUP, this, &rMEvt ); if (!EventNotify(aNEvt)) mpWindowImpl->mbMouseButtonUp = true; } diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index 6376ea0bebb9..934dceaff7e3 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -357,7 +357,7 @@ IMPL_LINK_NOARG(ImplWheelWindow, ImplScrollHdl, Timer *, void) Point aCmdMousePos( pWindow->ImplFrameToOutput( aMousePos ) ); CommandScrollData aScrollData( mnActDeltaX, mnActDeltaY ); CommandEvent aCEvt( aCmdMousePos, CommandEventId::AutoScroll, true, &aScrollData ); - NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt ); + NotifyEvent aNCmdEvt( NotifyEventType::COMMAND, pWindow, &aCEvt ); if ( !ImplCallPreNotify( aNCmdEvt ) ) { diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 4bad98fa16a6..f2bba6b2ceaf 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2023,7 +2023,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) bool SplitWindow::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) + if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE ) { const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); if( pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 7ccc545c9fa6..9439ef62e88c 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -175,11 +175,11 @@ namespace bool SystemWindow::EventNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == MouseNotifyEvent::COMMAND) + if (rNEvt.GetType() == NotifyEventType::COMMAND) ToggleMnemonicsOnHierarchy(*rNEvt.GetCommandEvent(), this); // capture KeyEvents for menu handling - if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) + if (rNEvt.GetType() == NotifyEventType::KEYINPUT) { MenuBar* pMBar = mpMenuBar; if ( !pMBar && ( GetType() == WindowType::FLOATINGWINDOW ) ) @@ -198,7 +198,7 @@ bool SystemWindow::EventNotify( NotifyEvent& rNEvt ) bool SystemWindow::PreNotify( NotifyEvent& rNEvt ) { // capture KeyEvents for taskpane cycling - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { if( rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_F6 && rNEvt.GetKeyEvent()->GetKeyCode().IsMod1() && diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 37a4019942f4..bd2f5f5ffa35 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3670,7 +3670,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt ) bool ToolBox::EventNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) + if ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) { KeyEvent aKEvt = *rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = aKEvt.GetKeyCode(); @@ -3698,7 +3698,7 @@ bool ToolBox::EventNotify( NotifyEvent& rNEvt ) break; } } - else if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) + else if( rNEvt.GetType() == NotifyEventType::GETFOCUS ) { if( rNEvt.GetWindow() == this ) { @@ -3746,7 +3746,7 @@ bool ToolBox::EventNotify( NotifyEvent& rNEvt ) return DockingWindow::EventNotify( rNEvt ); } } - else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) + else if( rNEvt.GetType() == NotifyEventType::LOSEFOCUS ) { // deselect ImplHideFocus(); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index a233327900f1..4705fe516ce5 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1816,14 +1816,14 @@ void Window::KeyInput( const KeyEvent& rKEvt ) return; } - NotifyEvent aNEvt( MouseNotifyEvent::KEYINPUT, this, &rKEvt ); + NotifyEvent aNEvt( NotifyEventType::KEYINPUT, this, &rKEvt ); if ( !CompatNotify( aNEvt ) ) mpWindowImpl->mbKeyInput = true; } void Window::KeyUp( const KeyEvent& rKEvt ) { - NotifyEvent aNEvt( MouseNotifyEvent::KEYUP, this, &rKEvt ); + NotifyEvent aNEvt( NotifyEventType::KEYUP, this, &rKEvt ); if ( !CompatNotify( aNEvt ) ) mpWindowImpl->mbKeyUp = true; } @@ -1850,13 +1850,13 @@ void Window::GetFocus() return; } - NotifyEvent aNEvt( MouseNotifyEvent::GETFOCUS, this ); + NotifyEvent aNEvt( NotifyEventType::GETFOCUS, this ); CompatNotify( aNEvt ); } void Window::LoseFocus() { - NotifyEvent aNEvt( MouseNotifyEvent::LOSEFOCUS, this ); + NotifyEvent aNEvt( NotifyEventType::LOSEFOCUS, this ); CompatNotify( aNEvt ); } @@ -1926,7 +1926,7 @@ void Window::Command( const CommandEvent& rCEvt ) { CallEventListeners( VclEventId::WindowCommand, const_cast<CommandEvent *>(&rCEvt) ); - NotifyEvent aNEvt( MouseNotifyEvent::COMMAND, this, &rCEvt ); + NotifyEvent aNEvt( NotifyEventType::COMMAND, this, &rCEvt ); if ( !CompatNotify( aNEvt ) ) mpWindowImpl->mbCommand = true; } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 45182d0a09f8..d1d8169b11bc 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -70,7 +70,7 @@ bool ImplCallPreNotify( NotifyEvent& rEvt ) } static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePos, - sal_uInt16 nCode, MouseNotifyEvent nSVEvent, + sal_uInt16 nCode, NotifyEventType nSVEvent, bool bMouseLeave ) { ImplSVData* pSVData = ImplGetSVData(); @@ -84,7 +84,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo */ bool bHitTestInsideRect = false; FloatingWindow* pFloat = pSVData->mpWinData->mpFirstFloat->ImplFloatHitTest( pChild, rMousePos, bHitTestInsideRect ); - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) { if ( bMouseLeave ) return true; @@ -101,7 +101,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo { if ( nCode & MOUSE_LEFT ) { - if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nSVEvent == NotifyEventType::MOUSEBUTTONDOWN ) { if ( !pFloat ) { @@ -147,7 +147,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo if ( nPopupFlags & FloatWinPopupFlags::AllMouseButtonClose ) { if ( (nPopupFlags & FloatWinPopupFlags::NoMouseUpClose) && - (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) ) + (nSVEvent == NotifyEventType::MOUSEBUTTONUP) ) return true; pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); return true; @@ -219,7 +219,7 @@ static bool ImplCallCommand( const VclPtr<vcl::Window>& pChild, CommandEventId n } CommandEvent aCEvt( aPos, nEvt, bMouse, pData ); - NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pChild, &aCEvt ); + NotifyEvent aNCmdEvt( NotifyEventType::COMMAND, pChild, &aCEvt ); bool bPreNotify = ImplCallPreNotify( aNCmdEvt ); if ( pChild->isDisposed() ) return false; @@ -265,13 +265,13 @@ static void ContextMenuEventLink( void* pCEvent, void* ) delete pEv; } -bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave, +bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, NotifyEventType nSVEvent, bool bMouseLeave, tools::Long nX, tools::Long nY, sal_uInt64 nMsgTime, sal_uInt16 nCode, MouseEventModifiers nMode ) { SAL_INFO( "vcl.debugevent", "mouse event " - "(MouseNotifyEvent " << static_cast<sal_uInt16>(nSVEvent) << ") " + "(NotifyEventType " << static_cast<sal_uInt16>(nSVEvent) << ") " "(MouseLeave " << bMouseLeave << ") " "(X, Y " << nX << ", " << nY << ") " "(Code " << nCode << ") " @@ -295,9 +295,9 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent // we need a mousemove event, before we get a mousebuttondown or a // mousebuttonup event - if ( (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) || (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) ) + if ( (nSVEvent == NotifyEventType::MOUSEBUTTONDOWN) || (nSVEvent == NotifyEventType::MOUSEBUTTONUP) ) { - if ( (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) && aHelpData.mbExtHelpMode ) + if ( (nSVEvent == NotifyEventType::MOUSEBUTTONUP) && aHelpData.mbExtHelpMode ) Help::EndExtHelp(); if ( aHelpData.mpHelpWin ) { @@ -314,7 +314,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent (pWinFrameData->mnLastMouseY != nY) ) { sal_uInt16 nMoveCode = nCode & ~(MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE); - ImplHandleMouseEvent(xWindow, MouseNotifyEvent::MOUSEMOVE, false, nX, nY, nMsgTime, nMoveCode, nMode); + ImplHandleMouseEvent(xWindow, NotifyEventType::MOUSEMOVE, false, nX, nY, nMsgTime, nMoveCode, nMode); } } @@ -345,7 +345,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent "ImplHandleMouseEvent: TrackWin != CaptureWin"); // AutoScrollMode - if (pSVData->mpWinData->mpAutoScrollWin && (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN)) + if (pSVData->mpWinData->mpAutoScrollWin && (nSVEvent == NotifyEventType::MOUSEBUTTONDOWN)) { pSVData->mpWinData->mpAutoScrollWin->EndAutoScroll(); return true; @@ -395,7 +395,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent && (!pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalMode())) { ImplHandleMouseFloatMode( pChild, aMousePos, nCode, nSVEvent, bMouseLeave ); - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) { ImplHandleMouseHelpRequest( pChild, aMousePos ); if( pWinFrameData->mpMouseMoveWin.get() != pChild ) @@ -404,12 +404,12 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent // Call the hook also, if Window is disabled - if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nSVEvent == NotifyEventType::MOUSEBUTTONDOWN ) return true; else { // Set normal MousePointer for disabled windows - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) ImplSetMousePointer( pChild ); return false; @@ -418,13 +418,13 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent // End ExtTextInput-Mode, if the user click in the same TopLevel Window if (pSVData->mpWinData->mpExtTextInputWin - && ((nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) - || (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP))) + && ((nSVEvent == NotifyEventType::MOUSEBUTTONDOWN) + || (nSVEvent == NotifyEventType::MOUSEBUTTONUP))) pSVData->mpWinData->mpExtTextInputWin->EndExtTextInput(); } // determine mouse event data - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) { // check if MouseMove belongs to same window and if the // status did not change @@ -535,7 +535,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent { Point aLeaveMousePos = pMouseMoveWin->ImplFrameToOutput( aMousePos ); MouseEvent aMLeaveEvt( aLeaveMousePos, nClicks, nMode | MouseEventModifiers::LEAVEWINDOW, nCode, nCode ); - NotifyEvent aNLeaveEvt( MouseNotifyEvent::MOUSEMOVE, pMouseMoveWin, &aMLeaveEvt ); + NotifyEvent aNLeaveEvt( NotifyEventType::MOUSEMOVE, pMouseMoveWin, &aMLeaveEvt ); pWinFrameData->mbInMouseMove = true; pMouseMoveWin->ImplGetWinData()->mbMouseOver = false; @@ -571,7 +571,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent if (pChild) { // mouse click - if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nSVEvent == NotifyEventType::MOUSEBUTTONDOWN ) { const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings(); sal_uInt64 nDblClkTime = rMSettings.GetDoubleClickTime(); @@ -646,11 +646,11 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent return false; NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt ); - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) pChild->ImplGetFrameData()->mbInMouseMove = true; // bring window into foreground on mouseclick - if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nSVEvent == NotifyEventType::MOUSEBUTTONDOWN ) { if (!pSVData->mpWinData->mpFirstFloat && // totop for floating windows in popup would change the focus and would close them immediately @@ -666,7 +666,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent else { bRet = false; - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) { if (pSVData->mpWinData->mpTrackWin) { @@ -697,7 +697,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent } } } - else if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN ) + else if ( nSVEvent == NotifyEventType::MOUSEBUTTONDOWN ) { if ( pSVData->mpWinData->mpTrackWin ) bRet = true; @@ -730,10 +730,10 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent if (pChild->isDisposed()) return true; - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = false; - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) { if ( bCallHelpRequest && !ImplGetSVHelpData().mbKeyboardHelp ) ImplHandleMouseHelpRequest( pChild, pChild->OutputToScreenPixel( aMEvt.GetPosPixel() ) ); @@ -741,7 +741,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent } else if ( !bRet ) { - if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if ( nSVEvent == NotifyEventType::MOUSEBUTTONDOWN ) { if ( !pChild->ImplGetWindowImpl()->mbMouseButtonDown ) bRet = true; @@ -753,16 +753,16 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent } } - if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE ) + if ( nSVEvent == NotifyEventType::MOUSEMOVE ) { // set new mouse pointer if ( !bMouseLeave ) ImplSetMousePointer( pChild ); } - else if ( (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) || (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) ) + else if ( (nSVEvent == NotifyEventType::MOUSEBUTTONDOWN) || (nSVEvent == NotifyEventType::MOUSEBUTTONUP) ) { // Command-Events - if ( /*!bRet &&*/ (nClicks == 1) && (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) && + if ( /*!bRet &&*/ (nClicks == 1) && (nSVEvent == NotifyEventType::MOUSEBUTTONDOWN) && (nCode == MOUSE_MIDDLE) ) { MouseMiddleButtonAction nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction(); @@ -777,7 +777,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent if ( (nCode == MouseSettings::GetContextMenuCode()) && (nClicks == MouseSettings::GetContextMenuClicks()) ) { - bool bContextMenu = (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN); + bool bContextMenu = (nSVEvent == NotifyEventType::MOUSEBUTTONDOWN); if ( bContextMenu ) { if( pSVData->maAppData.mpActivePopupMenu ) @@ -805,7 +805,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent return bRet; } -bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent nEvent, bool /*bMouseLeave*/, +bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, NotifyEventType nEvent, bool /*bMouseLeave*/, tools::Long nX, tools::Long nY, sal_uInt64 /*nMsgTime*/, sal_uInt16 nCode, MouseEventModifiers nMode, sal_uInt16 nClicks) { @@ -831,7 +831,7 @@ bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEven vcl::Window* pDragWin = pFrameData->mpMouseDownWin; if (pDragWin && - nEvent == MouseNotifyEvent::MOUSEMOVE && + nEvent == NotifyEventType::MOUSEMOVE && pFrameData->mbDragging) { css::uno::Reference<css::datatransfer::dnd::XDropTargetDragContext> xDropTargetDragContext = @@ -861,7 +861,7 @@ bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEven } if (pDragWin && - nEvent == MouseNotifyEvent::MOUSEBUTTONUP && + nEvent == NotifyEventType::MOUSEBUTTONUP && pFrameData->mbDragging) { css::uno::Reference<css::datatransfer::XTransferable> xTransfer; @@ -899,7 +899,7 @@ bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEven } vcl::Window* pDownWin = pFrameData->mpMouseDownWin; - if (pDownWin && nEvent == MouseNotifyEvent::MOUSEMOVE) + if (pDownWin && nEvent == NotifyEventType::MOUSEMOVE) { const MouseSettings& aSettings = pDownWin->GetSettings().GetMouseSettings(); if ((nCode & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) == @@ -962,7 +962,7 @@ bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEven } MouseEvent aMouseEvent(aWinPos, nClicks, nMode, nCode, nCode); - if (nEvent == MouseNotifyEvent::MOUSEMOVE) + if (nEvent == NotifyEventType::MOUSEMOVE) { if (pFrameData->mpTrackWin) { @@ -972,7 +972,7 @@ bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEven else xWindow->MouseMove(aMouseEvent); } - else if (nEvent == MouseNotifyEvent::MOUSEBUTTONDOWN && + else if (nEvent == NotifyEventType::MOUSEBUTTONDOWN && !pFrameData->mpTrackWin) { pFrameData->mpMouseDownWin = xWindow; @@ -994,7 +994,7 @@ bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEven xWindow->MouseButtonUp(aMouseEvent); } - if (nEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) + if (nEvent == NotifyEventType::MOUSEBUTTONDOWN) { // ContextMenu if ( (nCode == MouseSettings::GetContextMenuCode()) && @@ -1064,7 +1064,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow ) return pChild; } -static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, +static bool ImplHandleKey( vcl::Window* pWindow, NotifyEventType nSVEvent, sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, bool bForward ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1079,10 +1079,10 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, VclEventId nVCLEvent; switch( nSVEvent ) { - case MouseNotifyEvent::KEYINPUT: + case NotifyEventType::KEYINPUT: nVCLEvent = VclEventId::WindowKeyInput; break; - case MouseNotifyEvent::KEYUP: + case NotifyEventType::KEYUP: nVCLEvent = VclEventId::WindowKeyUp; break; default: @@ -1100,7 +1100,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, pSVData->maAppData.mnLastInputTime = tools::Time::GetSystemTicks(); // handle tracking window - if ( nSVEvent == MouseNotifyEvent::KEYINPUT ) + if ( nSVEvent == NotifyEventType::KEYINPUT ) { if ( ImplGetSVHelpData().mbExtHelpMode ) { @@ -1204,7 +1204,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, if ( !bKeyPreNotify && !pChild->isDisposed() ) { - if ( nSVEvent == MouseNotifyEvent::KEYINPUT ) + if ( nSVEvent == NotifyEventType::KEYINPUT ) { UITestLogger::getInstance().logKeyInput(pChild, aKeyEvt); pChild->ImplGetWindowImpl()->mbKeyInput = false; @@ -1222,7 +1222,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, if ( pChild->isDisposed() ) return true; - if ( nSVEvent == MouseNotifyEvent::KEYINPUT ) + if ( nSVEvent == NotifyEventType::KEYINPUT ) { if ( !bKeyPreNotify && pChild->ImplGetWindowImpl()->mbKeyInput ) { @@ -1309,7 +1309,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, if ( !bPreNotify ) { - if ( nSVEvent == MouseNotifyEvent::KEYINPUT ) + if ( nSVEvent == NotifyEventType::KEYINPUT ) { pChild->ImplGetWindowImpl()->mbKeyInput = false; pChild->KeyInput( aKeyEvt ); @@ -1501,7 +1501,7 @@ static bool ImplCallWheelCommand( const VclPtr<vcl::Window>& pWindow, const Poin { Point aCmdMousePos = pWindow->ImplFrameToOutput( rPos ); CommandEvent aCEvt( aCmdMousePos, CommandEventId::Wheel, true, pWheelData ); - NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt ); + NotifyEvent aNCmdEvt( NotifyEventType::COMMAND, pWindow, &aCEvt ); bool bPreNotify = ImplCallPreNotify( aNCmdEvt ); if ( pWindow->isDisposed() ) return false; @@ -2124,7 +2124,7 @@ IMPL_LINK_NOARG(vcl::Window, ImplAsyncFocusHdl, void*, void) pFocusWin->EndExtTextInput(); #endif - NotifyEvent aNEvt(MouseNotifyEvent::LOSEFOCUS, pFocusWin); + NotifyEvent aNEvt(NotifyEventType::LOSEFOCUS, pFocusWin); if (!ImplCallPreNotify(aNEvt)) pFocusWin->CompatLoseFocus(); pFocusWin->ImplCallDeactivateListeners(nullptr); @@ -2321,7 +2321,7 @@ MouseEventModifiers ImplGetMouseButtonMode( SalMouseEvent const * pEvent ) static bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { - return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEMOVE, true, + return ImplHandleMouseEvent( pWindow, NotifyEventType::MOUSEMOVE, true, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -2329,7 +2329,7 @@ static bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent const * static bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { - return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEMOVE, false, + return ImplHandleMouseEvent( pWindow, NotifyEventType::MOUSEMOVE, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -2337,7 +2337,7 @@ static bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent const * static bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { - return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEBUTTONDOWN, false, + return ImplHandleMouseEvent( pWindow, NotifyEventType::MOUSEBUTTONDOWN, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2350,7 +2350,7 @@ static bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent co static bool ImplHandleSalMouseButtonUp( vcl::Window* pWindow, SalMouseEvent const * pEvent ) { - return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEBUTTONUP, false, + return ImplHandleMouseEvent( pWindow, NotifyEventType::MOUSEBUTTONUP, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2727,28 +2727,28 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE case SalEvent::KeyInput: { SalKeyEvent const * pKeyEvt = static_cast<SalKeyEvent const *>(pEvent); - bRet = ImplHandleKey( pWindow, MouseNotifyEvent::KEYINPUT, + bRet = ImplHandleKey( pWindow, NotifyEventType::KEYINPUT, pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, true ); } break; case SalEvent::ExternalKeyInput: { KeyEvent const * pKeyEvt = static_cast<KeyEvent const *>(pEvent); - bRet = ImplHandleKey( pWindow, MouseNotifyEvent::KEYINPUT, + bRet = ImplHandleKey( pWindow, NotifyEventType::KEYINPUT, pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), false ); } break; case SalEvent::KeyUp: { SalKeyEvent const * pKeyEvt = static_cast<SalKeyEvent const *>(pEvent); - bRet = ImplHandleKey( pWindow, MouseNotifyEvent::KEYUP, + bRet = ImplHandleKey( pWindow, NotifyEventType::KEYUP, pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, true ); } break; case SalEvent::ExternalKeyUp: { KeyEvent const * pKeyEvt = static_cast<KeyEvent const *>(pEvent); - bRet = ImplHandleKey( pWindow, MouseNotifyEvent::KEYUP, + bRet = ImplHandleKey( pWindow, NotifyEventType::KEYUP, pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), false ); } break; diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index fce43c02602b..1d8d372e5053 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -5235,7 +5235,7 @@ static bool ImplHandleAppCommand( HWND hWnd, LPARAM lParam, LRESULT & nRet ) const Point aPoint; CommandMediaData aMediaData(nCommand); CommandEvent aCEvt( aPoint, CommandEventId::Media, false, &aMediaData ); - NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, &aCEvt ); + NotifyEvent aNCmdEvt( NotifyEventType::COMMAND, pWindow, &aCEvt ); if ( !ImplCallPreNotify( aNCmdEvt ) ) { |