]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/window.cpp
compatibility changes: WXWIN_COMPATIBILITY_EVENT_TYPES and DECLARE_EVENT_TABLE_ENTRY...
[wxWidgets.git] / src / mac / window.cpp
index ea685b98862d82fca771b9a5dce85db795bae0e5..e602f93fabec8748d20fbfa1304b25047cafbe0c 100644 (file)
@@ -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);
@@ -2361,14 +2351,16 @@ wxMacDrawingClientHelper::~wxMacDrawingClientHelper()
 // position.
 wxWindow* wxFindWindowAtPointer(wxPoint& pt)
 {
-    wxFAIL_MSG(_("Not implemented"));
-    return NULL;
+    pt = wxGetMousePosition();
+    wxWindow* found = wxFindWindowAtPoint(pt);
+    return found;
 }
 
 // Get the current mouse position.
 wxPoint wxGetMousePosition()
 {
-    wxFAIL_MSG(_("Not implemented"));
-    return wxPoint;
+    int x, y;
+    wxGetMousePosition(& x, & y);
+    return wxPoint(x, y);
 }