From 3b7003909e204166b3cbfff52bdb2e0e567bf6d8 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Sat, 27 Jan 2001 10:58:29 +0000 Subject: [PATCH] corrections related to event.h modifications git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 36 +++++++++++++----------------------- src/mac/window.cpp | 36 +++++++++++++----------------------- 2 files changed, 26 insertions(+), 46 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index d2696fe6e0..e602f93fab 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1271,36 +1271,26 @@ void wxWindow::MacOnScroll(wxScrollEvent &event ) wevent.SetOrientation(event.GetOrientation()); wevent.m_eventObject = this; - switch ( event.m_eventType ) - { - case wxEVT_SCROLL_TOP: + if (event.m_eventType == wxEVT_SCROLL_TOP) { wevent.m_eventType = wxEVT_SCROLLWIN_TOP; - break; - - case wxEVT_SCROLL_BOTTOM: + } else + if (event.m_eventType == wxEVT_SCROLL_BOTTOM) { wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM; - break; - - case wxEVT_SCROLL_LINEUP: + } else + if (event.m_eventType == wxEVT_SCROLL_LINEUP) { wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP; - break; - - case wxEVT_SCROLL_LINEDOWN: + } else + if (event.m_eventType == wxEVT_SCROLL_LINEDOWN) { wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; - break; - - case wxEVT_SCROLL_PAGEUP: + } else + if (event.m_eventType == wxEVT_SCROLL_PAGEUP) { wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; - break; - - case wxEVT_SCROLL_PAGEDOWN: + } else + if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN) { wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; - break; - - case wxEVT_SCROLL_THUMBTRACK: + } else + if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK) { wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; - break; - } GetEventHandler()->ProcessEvent(wevent); diff --git a/src/mac/window.cpp b/src/mac/window.cpp index d2696fe6e0..e602f93fab 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -1271,36 +1271,26 @@ void wxWindow::MacOnScroll(wxScrollEvent &event ) wevent.SetOrientation(event.GetOrientation()); wevent.m_eventObject = this; - switch ( event.m_eventType ) - { - case wxEVT_SCROLL_TOP: + if (event.m_eventType == wxEVT_SCROLL_TOP) { wevent.m_eventType = wxEVT_SCROLLWIN_TOP; - break; - - case wxEVT_SCROLL_BOTTOM: + } else + if (event.m_eventType == wxEVT_SCROLL_BOTTOM) { wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM; - break; - - case wxEVT_SCROLL_LINEUP: + } else + if (event.m_eventType == wxEVT_SCROLL_LINEUP) { wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP; - break; - - case wxEVT_SCROLL_LINEDOWN: + } else + if (event.m_eventType == wxEVT_SCROLL_LINEDOWN) { wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; - break; - - case wxEVT_SCROLL_PAGEUP: + } else + if (event.m_eventType == wxEVT_SCROLL_PAGEUP) { wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; - break; - - case wxEVT_SCROLL_PAGEDOWN: + } else + if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN) { wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; - break; - - case wxEVT_SCROLL_THUMBTRACK: + } else + if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK) { wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; - break; - } GetEventHandler()->ProcessEvent(wevent); -- 2.45.2