]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/window_osx.cpp
Suppress unused parameter warnings.
[wxWidgets.git] / src / osx / window_osx.cpp
index 42e856aaec006e99e33d350490a9b06dff61c164..20af778038fda6290717f1d3e6928720880ce49d 100644 (file)
@@ -752,6 +752,9 @@ void wxWindowMac::DoSetToolTip(wxToolTip *tooltip)
 
     if ( m_tooltip )
         m_tooltip->SetWindow(this);
+        
+    if (m_peer)
+        m_peer->SetToolTip(tooltip);
 }
 
 #endif
@@ -897,22 +900,20 @@ wxSize wxWindowMac::DoGetBestSize() const
             r.width =
             r.height = 16 ;
 
-            if ( 0 )
-            {
-            }
 #if wxUSE_SCROLLBAR
-            else if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
+            if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
             {
                 r.height = 16 ;
             }
+            else
 #endif
 #if wxUSE_SPINBTN
-            else if ( IsKindOf( CLASSINFO( wxSpinButton ) ) )
+            if ( IsKindOf( CLASSINFO( wxSpinButton ) ) )
             {
                 r.height = 24 ;
             }
-#endif
             else
+#endif
             {
                 // return wxWindowBase::DoGetBestSize() ;
             }
@@ -1060,6 +1061,17 @@ bool wxWindowMac::Show(bool show)
     if ( m_peer )
         m_peer->SetVisibility( show ) ;
 
+#ifdef __WXOSX_IPHONE__
+    // only when there's no native event support 
+    if ( !IsTopLevel() )
+#endif
+    {
+        wxShowEvent eventShow(GetId(), show);
+        eventShow.SetEventObject(this);
+    
+        HandleWindowEvent(eventShow);
+    }
+    
     return true;
 }
 
@@ -1206,6 +1218,7 @@ wxWindow *wxGetActiveWindow()
 // Coordinates relative to the window
 void wxWindowMac::WarpPointer(int x_pos, int y_pos)
 {
+#if wxOSX_USE_COCOA_OR_CARBON
     int x = x_pos;
     int y = y_pos;
     DoClientToScreen(&x, &y);
@@ -1220,14 +1233,15 @@ void wxWindowMac::WarpPointer(int x_pos, int y_pos)
 
     event.m_altDown = mState.AltDown();
     event.m_controlDown = mState.ControlDown();
-    event.m_leftDown = mState.LeftDown();
-    event.m_middleDown = mState.MiddleDown();
-    event.m_rightDown = mState.RightDown();
+    event.m_leftDown = mState.LeftIsDown();
+    event.m_middleDown = mState.MiddleIsDown();
+    event.m_rightDown = mState.RightIsDown();
     event.m_metaDown = mState.MetaDown();
     event.m_shiftDown = mState.ShiftDown();
     event.SetId(GetId());
     event.SetEventObject(this);
     GetEventHandler()->ProcessEvent(event);
+#endif
 }
 
 int wxWindowMac::GetScrollPos(int orient) const
@@ -1840,6 +1854,7 @@ bool wxWindowMac::MacDoRedraw( long time )
     {
         case wxBG_STYLE_ERASE:
         case wxBG_STYLE_SYSTEM:
+        case wxBG_STYLE_COLOUR:
             {
                 // for the toplevel window this really is the entire area for
                 // all the others only their client area, otherwise they might
@@ -1868,6 +1883,7 @@ bool wxWindowMac::MacDoRedraw( long time )
             break;
 
         case wxBG_STYLE_PAINT:
+        case wxBG_STYLE_TRANSPARENT:
             // nothing to do, user-defined EVT_PAINT handler will overwrite the
             // entire window client area
             break;
@@ -2454,6 +2470,7 @@ wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , bool isRootControl )
     Init();
     m_isRootControl = isRootControl;
     m_wxPeer = peer;
+    m_shouldSendEvents = true;
 }
 
 wxWidgetImpl::wxWidgetImpl()