]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/window_osx.cpp
Eliminated two unneeded arguments from wxPropertyGrid::DoDrawItems()
[wxWidgets.git] / src / osx / window_osx.cpp
index ee64a5619842c01fd9c0cffd1dbac8ec920dd575..5e8a0b9f46981c4a78d03029294d22b4f27d8584 100644 (file)
@@ -85,7 +85,6 @@
 BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
     EVT_NC_PAINT(wxWindowMac::OnNcPaint)
     EVT_ERASE_BACKGROUND(wxWindowMac::OnEraseBackground)
-    EVT_PAINT(wxWindowMac::OnPaint)
     EVT_MOUSE_EVENTS(wxWindowMac::OnMouseEvent)
 END_EVENT_TABLE()
 
@@ -141,8 +140,6 @@ wxWindowMac::~wxWindowMac()
 {
     SendDestroyEvent();
 
-    m_isBeingDeleted = true;
-
     MacInvalidateBorders() ;
 
 #ifndef __WXUNIVERSAL__
@@ -966,6 +963,13 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags)
         // TODO: REMOVE
         MacRepositionScrollBars() ; // we might have a real position shift
 
+        if (sizeFlags & wxSIZE_FORCE_EVENT)
+        {
+            wxSizeEvent event( wxSize(width,height), GetId() );
+            event.SetEventObject( this );
+            HandleWindowEvent( event );
+        }
+
         return;
     }
 
@@ -1864,7 +1868,19 @@ bool wxWindowMac::MacDoRedraw( void* updatergnr , long time )
             wxPaintEvent event;
             event.SetTimestamp(time);
             event.SetEventObject(this);
-            HandleWindowEvent(event);
+            if ( !HandleWindowEvent(event) )
+            {
+                // for native controls: call their native paint method
+                if ( !MacIsUserPane() || ( IsTopLevel() && GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) )
+                {
+                    if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL
+                        && GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
+                        CallNextEventHandler(
+                            (EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() ,
+                            (EventRef) wxTheApp->MacGetCurrentEvent() ) ;
+                }
+            }
+            
             handled = true ;
         }
 
@@ -2195,21 +2211,6 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
     }
 }
 
-void wxWindowMac::OnPaint( wxPaintEvent & WXUNUSED(event) )
-{
-#if wxOSX_USE_COCOA_OR_CARBON
-    // for native controls: call their native paint method
-    if ( !MacIsUserPane() || ( IsTopLevel() && GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) )
-    {
-        if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL
-             && GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
-            CallNextEventHandler(
-                (EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() ,
-                (EventRef) wxTheApp->MacGetCurrentEvent() ) ;
-    }
-#endif
-}
-
 void wxWindowMac::TriggerScrollEvent( wxEventType WXUNUSED(scrollEvent) )
 {
 }
@@ -2224,7 +2225,7 @@ Rect wxMacGetBoundsForControl( wxWindowMac* window , const wxPoint& pos , const
     return bounds ;
 }
 
-bool wxWindowMac::HandleClicked( double timestampsec )
+bool wxWindowMac::OSXHandleClicked( double timestampsec )
 {
     return false;
 }
@@ -2232,7 +2233,7 @@ bool wxWindowMac::HandleClicked( double timestampsec )
 wxInt32 wxWindowMac::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF event )
 {
 #if wxOSX_USE_COCOA_OR_CARBON
-    if ( HandleClicked( GetEventTime((EventRef)event) ) )
+    if ( OSXHandleClicked( GetEventTime((EventRef)event) ) )
         return noErr;
         
     return eventNotHandledErr ;
@@ -2298,7 +2299,7 @@ bool wxWindowMac::IsShownOnScreen() const
     return wxWindowBase::IsShownOnScreen();
 }
 
-bool wxWindowMac::HandleKeyEvent( wxKeyEvent& event )
+bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
 {
     bool handled = HandleWindowEvent( event ) ;
     if ( handled && event.GetSkipped() )