]> git.saurik.com Git - wxWidgets.git/commitdiff
adaptions to new osx ouside the main trees
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 2 Sep 2008 17:00:30 +0000 (17:00 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 2 Sep 2008 17:00:30 +0000 (17:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp
src/aui/dockart.cpp
src/common/artstd.cpp
src/generic/listctrl.cpp
src/generic/renderg.cpp
src/generic/treectlg.cpp

index fd2b3583e8c548f066de98cf932549960a85c46b..dc5ce849495170c46e3fd6333c4e382c41101a3b 100644 (file)
@@ -35,6 +35,8 @@
 
 #ifdef __WXMAC__
 #include "wx/osx/private.h"
+// for themeing support
+#include <Carbon/Carbon.h>
 #endif
 
 #include "wx/arrimpl.cpp"
index 8ae482ee6adf44b4c32c8eba252d9c77b79c412a..55b5e89258d496502b2d9561237db11822775b7e 100644 (file)
@@ -37,6 +37,9 @@
 #ifdef __WXMAC__
 #include "wx/osx/private.h"
 #include "wx/graphics.h"
+#include "wx/dcgraph.h"
+// for themeing support
+#include <Carbon/Carbon.h>
 #endif
 
 #ifdef __WXGTK__
index 9dab2e587869c8b4fbea7855cdeb4a5a490d5498..4623b411843a5a0097e57431335042918990dc6c 100644 (file)
@@ -47,7 +47,7 @@ protected:
 
 // There are two ways of getting the standard icon: either via XPMs or via
 // wxIcon ctor. This depends on the platform:
-#if defined(__WXUNIVERSAL__)
+#if defined(__WXUNIVERSAL__) || ( defined(__WXMAC__) && wxOSX_USE_IPHONE )
     #define CREATE_STD_ICON(iconId, xpmRc) return wxNullBitmap;
 #elif defined(__WXGTK__) || defined(__WXMOTIF__)
     #define CREATE_STD_ICON(iconId, xpmRc) return wxBitmap(xpmRc##_xpm);
@@ -77,7 +77,7 @@ protected:
     wxArtProvider::Push(new wxDefaultArtProvider);
 }
 
-#if !(defined(__WXGTK20__) || defined(__WXMAC__)) || defined(__WXUNIVERSAL__)
+#if !(defined(__WXGTK20__) || (defined(__WXMAC__) && wxOSX_USE_CARBON)) || defined(__WXUNIVERSAL__)
 /*static*/ void wxArtProvider::InitNativeProvider()
 {
 }
index ec924ef4c1e3e7d27f999fdd9d05f30ae559b43a..028a0fddd429ffbe26877f5a2a3d2bcce8b3e411 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "wx/listctrl.h"
 
-#if ((!defined(__WXMSW__) && !defined(__WXMAC__)) || defined(__WXUNIVERSAL__))
+#if ((!defined(__WXMSW__) && !(defined(__WXMAC__) && wxOSX_USE_CARBON)) || defined(__WXUNIVERSAL__))
     // if we have a native version, its implementation file does all this
     IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
     IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl)
@@ -51,6 +51,8 @@
 
 #ifdef __WXMAC__
     #include "wx/osx/private.h"
+    // for themeing support
+    #include <Carbon/Carbon.h>
 #endif
 
 
@@ -5064,7 +5066,11 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
     if ( GetWindowVariant() == wxWINDOW_VARIANT_NORMAL )
     {
         wxFont font;
+#if wxOSX_USE_CARBON
         font.MacCreateFromThemeFont( kThemeViewsFont );
+#else
+        font.MacCreateFromUIFont( kCTFontViewsFontType );
+#endif
         SetFont( font );
     }
 #endif
@@ -5077,7 +5083,11 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
         if (m_headerWin)
         {
             wxFont font;
+#if wxOSX_USE_CARBON
             font.MacCreateFromThemeFont( kThemeSmallSystemFont );
+#else
+        font.MacCreateFromUIFont( kCTFontSystemFontType );
+#endif
             m_headerWin->SetFont( font );
             CalculateAndSetHeaderHeight();
         }
index daba7bf33a4296542a5eac5c37bc41315158b3c7..0a8193808b170629d096f67da563e9f861468e1d 100644 (file)
@@ -673,7 +673,7 @@ wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
 
     dc.SetBrush(brush);
     if ((flags & wxCONTROL_CURRENT) && (flags & wxCONTROL_FOCUSED)
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON
                 && IsControlActive( (ControlRef)win->GetHandle() )
 #endif
     )
index b9f5f2cf1674fece3ee3abd9fd93f8744399f5f3..5ed3f34d5f2b23161a0b42ee4a3e00a4d9a02394 100644 (file)
@@ -792,8 +792,12 @@ void wxGenericTreeCtrl::Init()
 
     m_lastOnSame = false;
 
-#if defined( __WXMAC__ ) && wxOSX_USE_COCOA_OR_CARBON
+#if defined( __WXMAC__ ) 
+#if wxOSX_USE_CARBON
     m_normalFont.MacCreateFromThemeFont( kThemeViewsFont ) ;
+#else
+    m_normalFont.MacCreateFromUIFont( kCTFontViewsFontType ) ;
+#endif
 #else
     m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
 #endif
@@ -2295,7 +2299,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
         {
             int flags = wxCONTROL_SELECTED;
             if (m_hasFocus
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON // TODO CS
                 && IsControlActive( (ControlRef)GetHandle() )
 #endif
             )
@@ -2446,7 +2450,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
 
         wxColour colText;
         if ( item->IsSelected()
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON // TODO CS
             // On wxMac, if the tree doesn't have the focus we draw an empty
             // rectangle, so we want to make sure that the text is visible
             // against the normal background, not the highlightbackground, so