]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
Font (possible) fix
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index 5130f2ba55092bd08b552ce8bb00eed7fffe1a2f..32a04d0415b0026ce597059e7f22c1c5a66fc395 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "toplevel.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 //For targeting OSX
 #include "wx/mac/private.h"
 
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// trace mask for activation tracing messages
+static const wxChar *TRACE_ACTIVATE = _T("activation");
+
 // ----------------------------------------------------------------------------
 // globals
 // ----------------------------------------------------------------------------
@@ -391,7 +394,7 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent )
     }
 }
 
-ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, Point location , ControlRef superControl , ControlPartCode *outPart )
+ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, const Point& location , ControlRef superControl , ControlPartCode *outPart )
 {
     if ( superControl )
     {
@@ -438,7 +441,7 @@ ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, Point locat
     return NULL ;
 }
 
-ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow , Point location , WindowRef window , ControlPartCode *outPart )
+ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow , const Point& location , WindowRef window , ControlPartCode *outPart )
 {
 #if TARGET_API_MAC_OSX
     if ( UMAGetSystemVersion() >= 0x1030 && ( toplevelWindow == 0 || toplevelWindow->MacUsesCompositing() ) )
@@ -819,34 +822,6 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacTopLevelEventHandler )
 
 // Find an item given the Macintosh Window Reference
 
-#if KEY_wxList_DEPRECATED
-wxList wxWinMacWindowList(wxKEY_INTEGER);
-wxTopLevelWindowMac *wxFindWinFromMacWindow(WindowRef inWindowRef)
-{
-    wxNode *node = wxWinMacWindowList.Find((long)inWindowRef);
-    if (!node)
-        return NULL;
-    return (wxTopLevelWindowMac *)node->GetData();
-}
-
-void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win) ;
-void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win)
-{
-    // adding NULL WindowRef is (first) surely a result of an error and
-    // (secondly) breaks menu command processing
-    wxCHECK_RET( inWindowRef != (WindowRef) NULL, wxT("attempt to add a NULL WindowRef to window list") );
-
-    if ( !wxWinMacWindowList.Find((long)inWindowRef) )
-        wxWinMacWindowList.Append((long)inWindowRef, win);
-}
-
-void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ;
-void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win)
-{
-    wxWinMacWindowList.DeleteObject(win);
-}
-#else
-
 WX_DECLARE_HASH_MAP(WindowRef, wxTopLevelWindowMac*, wxPointerHash, wxPointerEqual, MacWindowMap);
 
 static MacWindowMap wxWinMacWindowList;
@@ -881,7 +856,6 @@ void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win)
         }
     }
 }
-#endif // deprecated wxList
 
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowMac creation
@@ -1273,14 +1247,16 @@ void wxTopLevelWindowMac::MacDelayedDeactivation(long timestamp)
 {
     if(s_macDeactivateWindow)
     {
-        wxLogDebug(wxT("Doing delayed deactivation of %p"),s_macDeactivateWindow);
+        wxLogTrace(TRACE_ACTIVATE,
+                   wxT("Doing delayed deactivation of %p"),
+                   s_macDeactivateWindow);
         s_macDeactivateWindow->MacActivate(timestamp, false);
     }
 }
 
 void wxTopLevelWindowMac::MacActivate( long timestamp , bool inIsActivating )
 {
-    // wxLogDebug(wxT("TopLevel=%p::MacActivate"),this);
+    wxLogTrace(TRACE_ACTIVATE, wxT("TopLevel=%p::MacActivate"), this);
 
     if(s_macDeactivateWindow==this)
         s_macDeactivateWindow=NULL;