]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
added wxDC::Set/GetLayoutDirection() and implemented it for wxMSW (patch from Tim...
[wxWidgets.git] / src / mac / carbon / window.cpp
index 6d86234520fa47b8d8e6862e193f753e8615c9ec..ff50aba9ce6db982f6ba0526a066bded386c3c2c 100644 (file)
@@ -89,8 +89,6 @@ END_EVENT_TABLE()
 #define wxMAC_DEBUG_REDRAW 0
 #endif
 
-#define wxMAC_USE_THEME_BORDER 1
-
 // ---------------------------------------------------------------------------
 // Utility Routines to move between different coordinate systems
 // ---------------------------------------------------------------------------
@@ -142,9 +140,6 @@ void wxMacWindowToNative( const wxWindow* window , Rect *rect )
 // Carbon Events
 // ---------------------------------------------------------------------------
 
-extern long wxMacTranslateKey(unsigned char key, unsigned char code) ;
-pascal OSStatus wxMacSetupControlBackground( ControlRef iControl , SInt16 iMessage , SInt16 iDepth , Boolean iIsColor ) ;
-
 #if TARGET_API_MAC_OSX
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
@@ -1199,7 +1194,7 @@ bool wxWindowMac::SetBackgroundColour(const wxColour& col )
     wxBrush brush ;
     wxColour newCol(GetBackgroundColour());
 
-    if ( newCol == wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) )
+    if ( newCol == wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) )
         brush.MacSetTheme( kThemeBrushDocumentWindowBackground ) ;
     else if ( newCol == wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) )
         brush.MacSetTheme( kThemeBrushDialogBackgroundActive ) ;
@@ -2030,7 +2025,7 @@ wxPoint wxWindowMac::GetClientAreaOrigin() const
 
 void wxWindowMac::DoSetClientSize(int clientwidth, int clientheight)
 {
-    if ( clientheight != wxDefaultCoord || clientheight != wxDefaultCoord )
+    if ( clientwidth != wxDefaultCoord || clientheight != wxDefaultCoord )
     {
         int currentclientwidth , currentclientheight ;
         int currentwidth , currentheight ;
@@ -3118,8 +3113,6 @@ WXWindow wxWindowMac::MacGetTopLevelWindowRef() const
         iter = iter->GetParent() ;
     }
 
-    wxASSERT_MSG( 1 , wxT("No valid mac root window") ) ;
-
     return NULL ;
 }
 
@@ -3131,11 +3124,9 @@ void wxWindowMac::MacCreateScrollBars( long style )
     {
         bool hasBoth = ( style & wxVSCROLL ) && ( style & wxHSCROLL ) ;
         int scrlsize = MAC_SCROLLBAR_SIZE ;
-        wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL ;
         if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL || GetWindowVariant() == wxWINDOW_VARIANT_MINI )
         {
             scrlsize = MAC_SMALL_SCROLLBAR_SIZE ;
-            variant = wxWINDOW_VARIANT_SMALL ;
         }
 
         int adjust = hasBoth ? scrlsize - 1: 0 ;