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 /vcl | |
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>
Diffstat (limited to 'vcl')
35 files changed, 176 insertions, 176 deletions
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 ) ) { |