OSX renaming round 2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-07-30 14:52:41 +00:00
parent 9729777e2a
commit 292e5e1f17
15 changed files with 109 additions and 109 deletions

View File

@@ -131,7 +131,7 @@ public:
}; };
#define wxMAC_USE_PREMULTIPLIED_ALPHA 1 #define wxOSX_USE_PREMULTIPLIED_ALPHA 1
static const int kBestByteAlignement = 16; static const int kBestByteAlignement = 16;
static const int kMaskBytesPerPixel = 1; static const int kMaskBytesPerPixel = 1;
@@ -478,7 +478,7 @@ IconRef wxBitmapRefData::GetIconRef()
a = 0xFF ; a = 0xFF ;
else else
{ {
#if wxMAC_USE_PREMULTIPLIED_ALPHA #if wxOSX_USE_PREMULTIPLIED_ALPHA
// this must be non-premultiplied data // this must be non-premultiplied data
if ( a != 0xFF && a!= 0 ) if ( a != 0xFF && a!= 0 )
{ {
@@ -676,7 +676,7 @@ CGImageRef wxBitmapRefData::CreateCGImage() const
{ {
if ( m_hasAlpha ) if ( m_hasAlpha )
{ {
#if wxMAC_USE_PREMULTIPLIED_ALPHA #if wxOSX_USE_PREMULTIPLIED_ALPHA
alphaInfo = kCGImageAlphaPremultipliedFirst ; alphaInfo = kCGImageAlphaPremultipliedFirst ;
#else #else
alphaInfo = kCGImageAlphaFirst ; alphaInfo = kCGImageAlphaFirst ;
@@ -858,7 +858,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
unsigned char a = *sourcemask++; unsigned char a = *sourcemask++;
*destination++ = a; *destination++ = a;
source++ ; source++ ;
#if wxMAC_USE_PREMULTIPLIED_ALPHA #if wxOSX_USE_PREMULTIPLIED_ALPHA
*destination++ = ( (*source++) * a + 127 ) / 255; *destination++ = ( (*source++) * a + 127 ) / 255;
*destination++ = ( (*source++) * a + 127 ) / 255; *destination++ = ( (*source++) * a + 127 ) / 255;
*destination++ = ( (*source++) * a + 127 ) / 255; *destination++ = ( (*source++) * a + 127 ) / 255;
@@ -1190,7 +1190,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth)
const unsigned char a = *alpha++; const unsigned char a = *alpha++;
*destination++ = a ; *destination++ = a ;
#if wxMAC_USE_PREMULTIPLIED_ALPHA #if wxOSX_USE_PREMULTIPLIED_ALPHA
*destination++ = ((*data++) * a + 127) / 255 ; *destination++ = ((*data++) * a + 127) / 255 ;
*destination++ = ((*data++) * a + 127) / 255 ; *destination++ = ((*data++) * a + 127) / 255 ;
*destination++ = ((*data++) * a + 127) / 255 ; *destination++ = ((*data++) * a + 127) / 255 ;
@@ -1300,7 +1300,7 @@ wxImage wxBitmap::ConvertToImage() const
else if ( hasAlpha ) else if ( hasAlpha )
{ {
*alpha++ = a ; *alpha++ = a ;
#if wxMAC_USE_PREMULTIPLIED_ALPHA #if wxOSX_USE_PREMULTIPLIED_ALPHA
// this must be non-premultiplied data // this must be non-premultiplied data
if ( a != 0xFF && a!= 0 ) if ( a != 0xFF && a!= 0 )
{ {

View File

@@ -154,7 +154,7 @@ wxSize wxButton::DoGetBestSize() const
wxCFStringRef str( m_label, GetFont().GetEncoding() ); wxCFStringRef str( m_label, GetFont().GetEncoding() );
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
SInt16 baseline; SInt16 baseline;
if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont ) if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont )
{ {

View File

@@ -21,7 +21,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
#if wxOSX_USE_QUICKDRAW #if wxOSX_USE_CARBON
wxColour::wxColour(const RGBColor& col) wxColour::wxColour(const RGBColor& col)
{ {
InitRGBColor(col); InitRGBColor(col);
@@ -33,7 +33,7 @@ wxColour::wxColour(CGColorRef col)
InitCGColorRef(col); InitCGColorRef(col);
} }
#if wxOSX_USE_QUICKDRAW #if wxOSX_USE_CARBON
void wxColour::GetRGBColor( RGBColor *col ) const void wxColour::GetRGBColor( RGBColor *col ) const
{ {
col->red = (m_red << 8) + m_red; col->red = (m_red << 8) + m_red;
@@ -84,7 +84,7 @@ void wxColour::InitRGBA (ChannelType r, ChannelType g, ChannelType b, ChannelTyp
m_cgColour.reset( col ); m_cgColour.reset( col );
} }
#if wxOSX_USE_QUICKDRAW #if wxOSX_USE_CARBON
void wxColour::InitRGBColor( const RGBColor& col ) void wxColour::InitRGBColor( const RGBColor& col )
{ {
m_red = col.red >> 8; m_red = col.red >> 8;

View File

@@ -45,7 +45,7 @@
#if wxMAC_USE_RUN_APP_EVENT_LOOP #if wxOSX_USE_RUN_APP_EVENT_LOOP
int wxGUIEventLoop::Run() int wxGUIEventLoop::Run()
{ {

View File

@@ -67,7 +67,7 @@ public:
Init(size, family, style, weight, underlined, faceName, encoding); Init(size, family, style, weight, underlined, faceName, encoding);
} }
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
wxFontRefData( wxUint32 coreTextFontType ); wxFontRefData( wxUint32 coreTextFontType );
wxFontRefData( CTFontRef font ); wxFontRefData( CTFontRef font );
wxFontRefData( CTFontDescriptorRef fontdescriptor, int size ); wxFontRefData( CTFontDescriptorRef fontdescriptor, int size );
@@ -152,7 +152,7 @@ protected:
const wxString& faceName, const wxString& faceName,
wxFontEncoding encoding); wxFontEncoding encoding);
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
void Init( CTFontRef font ); void Init( CTFontRef font );
#endif #endif
// font characterstics // font characterstics
@@ -166,7 +166,7 @@ protected:
bool m_noAA; // No anti-aliasing bool m_noAA; // No anti-aliasing
public: public:
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
FMFontFamily m_macFontFamily; FMFontFamily m_macFontFamily;
FMFontSize m_macFontSize; FMFontSize m_macFontSize;
FMFontStyle m_macFontStyle; FMFontStyle m_macFontStyle;
@@ -184,11 +184,11 @@ public:
// information here, as this speeds up and optimizes rendering // information here, as this speeds up and optimizes rendering
ThemeFontID m_macThemeFontID ; ThemeFontID m_macThemeFontID ;
#endif #endif
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
wxCFRef<CTFontRef> m_ctFont; wxCFRef<CTFontRef> m_ctFont;
wxCFRef<CTFontDescriptorRef> m_ctFontDescriptor; wxCFRef<CTFontDescriptorRef> m_ctFontDescriptor;
#endif #endif
#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT #if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
ATSUStyle m_macATSUStyle ; ATSUStyle m_macATSUStyle ;
#endif #endif
wxNativeFontInfo m_info; wxNativeFontInfo m_info;
@@ -222,7 +222,7 @@ void wxFontRefData::Init(int pointSize,
m_faceName = faceName; m_faceName = faceName;
m_encoding = encoding; m_encoding = encoding;
m_noAA = false; m_noAA = false;
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
m_macFontFamily = 0 ; m_macFontFamily = 0 ;
m_macFontSize = 0; m_macFontSize = 0;
m_macFontStyle = 0; m_macFontStyle = 0;
@@ -230,14 +230,14 @@ void wxFontRefData::Init(int pointSize,
m_macATSUAdditionalQDStyles = 0 ; m_macATSUAdditionalQDStyles = 0 ;
m_macThemeFontID = kThemeCurrentPortFont ; m_macThemeFontID = kThemeCurrentPortFont ;
#endif #endif
#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT #if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
m_macATSUStyle = NULL ; m_macATSUStyle = NULL ;
#endif #endif
} }
wxFontRefData::~wxFontRefData() wxFontRefData::~wxFontRefData()
{ {
#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT #if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
if ( m_macATSUStyle ) if ( m_macATSUStyle )
{ {
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle); ::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
@@ -248,11 +248,11 @@ wxFontRefData::~wxFontRefData()
void wxFontRefData::MacInvalidateNativeFont() void wxFontRefData::MacInvalidateNativeFont()
{ {
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
m_ctFont.reset(); m_ctFont.reset();
m_ctFontDescriptor.reset(); m_ctFontDescriptor.reset();
#endif #endif
#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT #if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
if ( m_macATSUStyle ) if ( m_macATSUStyle )
{ {
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle); ::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
@@ -261,7 +261,7 @@ void wxFontRefData::MacInvalidateNativeFont()
#endif #endif
} }
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
/* from Core Text Manual Common Operations */ /* from Core Text Manual Common Operations */
@@ -361,7 +361,7 @@ void wxFontRefData::Init( CTFontRef font )
void wxFontRefData::MacFindFont() void wxFontRefData::MacFindFont()
{ {
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
if ( m_faceName.empty() && m_family == wxDEFAULT ) if ( m_faceName.empty() && m_family == wxDEFAULT )
@@ -461,7 +461,7 @@ void wxFontRefData::MacFindFont()
} }
} }
} }
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
OSStatus status = noErr; OSStatus status = noErr;
CTFontDescriptorRef desc = m_ctFontDescriptor ; CTFontDescriptorRef desc = m_ctFontDescriptor ;
ATSFontRef atsfont = CTFontGetPlatformFont( m_ctFont, &desc ); ATSFontRef atsfont = CTFontGetPlatformFont( m_ctFont, &desc );
@@ -513,7 +513,7 @@ void wxFontRefData::MacFindFont()
#endif #endif
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
{ {
OSStatus status = noErr; OSStatus status = noErr;
Str255 qdFontName ; Str255 qdFontName ;
@@ -714,7 +714,7 @@ bool wxFont::Create(int pointSize,
return true; return true;
} }
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
bool wxFont::MacCreateFromUIFont(wxUint32 ctFontType ) bool wxFont::MacCreateFromUIFont(wxUint32 ctFontType )
{ {
@@ -741,13 +741,13 @@ bool wxFont::MacCreateFromCTFontDescriptor( const void * ctFontDescriptor , int
bool wxFont::MacCreateFromThemeFont(wxUint16 themeFontID) bool wxFont::MacCreateFromThemeFont(wxUint16 themeFontID)
{ {
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050) if ( UMAGetSystemVersion() >= 0x1050)
{ {
return MacCreateFromUIFont(HIThemeGetUIFontType(themeFontID)); return MacCreateFromUIFont(HIThemeGetUIFontType(themeFontID));
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
{ {
UnRef(); UnRef();
@@ -953,7 +953,7 @@ bool wxFont::GetNoAntiAliasing() const
return M_FONTDATA->GetNoAntiAliasing(); return M_FONTDATA->GetNoAntiAliasing();
} }
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
short wxFont::MacGetFontNum() const short wxFont::MacGetFontNum() const
{ {
@@ -998,7 +998,7 @@ wxUint16 wxFont::MacGetThemeFontID() const
} }
#endif #endif
#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT #if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
void * wxFont::MacGetATSUStyle() const void * wxFont::MacGetATSUStyle() const
{ {
wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
@@ -1007,7 +1007,7 @@ void * wxFont::MacGetATSUStyle() const
} }
#endif #endif
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
const void * wxFont::MacGetCTFont() const const void * wxFont::MacGetCTFont() const
{ {

View File

@@ -42,7 +42,7 @@
#include "wx/fontdlg.h" #include "wx/fontdlg.h"
#if wxMAC_USE_EXPERIMENTAL_FONTDIALOG #if wxOSX_USE_EXPERIMENTAL_FONTDIALOG
IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
@@ -73,7 +73,7 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler),
case kEventFontSelection : case kEventFontSelection :
{ {
bool setup = false ; bool setup = false ;
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
CTFontDescriptorRef descr; CTFontDescriptorRef descr;
@@ -86,7 +86,7 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler),
} }
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
ATSUFontID fontId = 0 ; ATSUFontID fontId = 0 ;
if ( !setup && (cEvent.GetParameter<ATSUFontID>(kEventParamATSUFontID, &fontId) == noErr) ) if ( !setup && (cEvent.GetParameter<ATSUFontID>(kEventParamATSUFontID, &fontId) == noErr) )
{ {
@@ -142,7 +142,7 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler),
fontdata.m_chosenFont.SetWeight(fontStyle & bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL); fontdata.m_chosenFont.SetWeight(fontStyle & bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL);
} }
} }
#endif // wxMAC_USE_ATSU_TEXT #endif // wxOSX_USE_ATSU_TEXT
// retrieving the color // retrieving the color
RGBColor fontColor ; RGBColor fontColor ;
@@ -221,7 +221,7 @@ int wxFontDialog::ShowModal()
} }
bool setup = false; bool setup = false;
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
CTFontDescriptorRef descr = (CTFontDescriptorRef)font.MacGetCTFontDescriptor(); CTFontDescriptorRef descr = (CTFontDescriptorRef)font.MacGetCTFontDescriptor();
@@ -229,7 +229,7 @@ int wxFontDialog::ShowModal()
setup = true; setup = true;
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
if ( !setup ) if ( !setup )
{ {
ATSUStyle style = (ATSUStyle)font.MacGetATSUStyle(); ATSUStyle style = (ATSUStyle)font.MacGetATSUStyle();
@@ -823,6 +823,6 @@ int FontFamilyStringToInt(const wxChar *family)
#endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX #endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
#endif // wxMAC_USE_EXPERIMENTAL_FONTDIALOG #endif // wxOSX_USE_EXPERIMENTAL_FONTDIALOG
#endif // wxUSE_FONTDLG #endif // wxUSE_FONTDLG

View File

@@ -37,7 +37,7 @@
#include "wx/cocoa/autorelease.h" #include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h" #include "wx/cocoa/string.h"
#if wxMAC_USE_EXPERIMENTAL_FONTDIALOG #if wxOSX_USE_EXPERIMENTAL_FONTDIALOG
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <AppKit/AppKit.h> #import <AppKit/AppKit.h>

View File

@@ -42,7 +42,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
wxArrayString fontFamilies ; wxArrayString fontFamilies ;
#if wxMAC_USE_ATSU_TEXT || wxMAC_USE_CORE_TEXT #if wxOSX_USE_ATSU_TEXT || wxOSX_USE_CORE_TEXT
// //
// From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html // From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html

View File

@@ -86,7 +86,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
} }
else else
{ {
#if !wxMAC_USE_NATIVE_TOOLBAR #if !wxOSX_USE_NATIVE_TOOLBAR
pt.y += h; pt.y += h;
#endif #endif
} }
@@ -268,7 +268,7 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
} }
else else
{ {
#if !wxMAC_USE_NATIVE_TOOLBAR #if !wxOSX_USE_NATIVE_TOOLBAR
if ( y ) if ( y )
*y -= h; *y -= h;
#endif #endif
@@ -318,14 +318,14 @@ void wxFrame::SetToolBar(wxToolBar *toolbar)
if ( m_frameToolBar == toolbar ) if ( m_frameToolBar == toolbar )
return ; return ;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if ( m_frameToolBar ) if ( m_frameToolBar )
m_frameToolBar->MacInstallNativeToolbar( false ) ; m_frameToolBar->MacInstallNativeToolbar( false ) ;
#endif #endif
m_frameToolBar = toolbar ; m_frameToolBar = toolbar ;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if ( toolbar ) if ( toolbar )
toolbar->MacInstallNativeToolbar( true ) ; toolbar->MacInstallNativeToolbar( true ) ;
#endif #endif
@@ -380,7 +380,7 @@ void wxFrame::PositionToolBar()
} }
else else
{ {
#if !wxMAC_USE_NATIVE_TOOLBAR #if !wxOSX_USE_NATIVE_TOOLBAR
// Use the 'real' position // Use the 'real' position
GetToolBar()->SetSize(tx , ty , cw , th, wxSIZE_NO_ADJUSTMENTS ); GetToolBar()->SetSize(tx , ty , cw , th, wxSIZE_NO_ADJUSTMENTS );
#endif #endif

View File

@@ -72,7 +72,7 @@ int UMAGetSystemVersion()
} }
#define wxMAC_USE_CORE_TEXT 1 #define wxOSX_USE_CORE_TEXT 1
#endif #endif
@@ -130,7 +130,7 @@ CGColorRef wxMacCreateCGColor( const wxColour& col )
return retval; return retval;
} }
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && wxMAC_USE_CORE_TEXT #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && wxOSX_USE_CORE_TEXT
CTFontRef wxMacCreateCTFont( const wxFont& font ) CTFontRef wxMacCreateCTFont( const wxFont& font )
{ {
@@ -780,10 +780,10 @@ public:
wxMacCoreGraphicsFontData( wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col ); wxMacCoreGraphicsFontData( wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col );
~wxMacCoreGraphicsFontData(); ~wxMacCoreGraphicsFontData();
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
virtual ATSUStyle GetATSUStyle() { return m_macATSUIStyle; } virtual ATSUStyle GetATSUStyle() { return m_macATSUIStyle; }
#endif #endif
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
CTFontRef GetCTFont() const { return m_ctFont ; } CTFontRef GetCTFont() const { return m_ctFont ; }
#endif #endif
wxColour GetColour() const { return m_colour ; } wxColour GetColour() const { return m_colour ; }
@@ -795,10 +795,10 @@ public:
private : private :
wxColour m_colour; wxColour m_colour;
bool m_underlined; bool m_underlined;
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
ATSUStyle m_macATSUIStyle; ATSUStyle m_macATSUIStyle;
#endif #endif
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
wxCFRef< CTFontRef > m_ctFont; wxCFRef< CTFontRef > m_ctFont;
#endif #endif
#if wxOSX_USE_IPHONE #if wxOSX_USE_IPHONE
@@ -811,14 +811,14 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
m_colour = col; m_colour = col;
m_underlined = font.GetUnderlined(); m_underlined = font.GetUnderlined();
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
m_ctFont.reset( wxMacCreateCTFont( font ) ); m_ctFont.reset( wxMacCreateCTFont( font ) );
#endif #endif
#if wxOSX_USE_IPHONE #if wxOSX_USE_IPHONE
m_uiFont = CreateUIFont(font); m_uiFont = CreateUIFont(font);
wxMacCocoaRetain( m_uiFont ); wxMacCocoaRetain( m_uiFont );
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
OSStatus status = noErr; OSStatus status = noErr;
m_macATSUIStyle = NULL; m_macATSUIStyle = NULL;
@@ -857,9 +857,9 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
wxMacCoreGraphicsFontData::~wxMacCoreGraphicsFontData() wxMacCoreGraphicsFontData::~wxMacCoreGraphicsFontData()
{ {
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
if ( m_macATSUIStyle ) if ( m_macATSUIStyle )
{ {
::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle); ::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle);
@@ -1945,7 +1945,7 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
return; return;
EnsureIsValid(); EnsureIsValid();
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData(); wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
@@ -1973,13 +1973,13 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
return; return;
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
{ {
DrawText(str, x, y, 0.0); DrawText(str, x, y, 0.0);
return; return;
} }
#endif #endif
#if wxMAC_USE_CG_TEXT #if wxOSX_USE_IPHONE
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData(); wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
CGContextSaveGState(m_cgContext); CGContextSaveGState(m_cgContext);
@@ -2002,7 +2002,7 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
return; return;
EnsureIsValid(); EnsureIsValid();
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
// default implementation takes care of rotation and calls non rotated DrawText afterwards // default implementation takes care of rotation and calls non rotated DrawText afterwards
@@ -2010,7 +2010,7 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
return; return;
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
{ {
OSStatus status = noErr; OSStatus status = noErr;
ATSUTextLayout atsuLayout; ATSUTextLayout atsuLayout;
@@ -2094,7 +2094,7 @@ void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDoub
return; return;
} }
#endif #endif
#if wxMAC_USE_CG_TEXT #if wxOSX_USE_IPHONE
// default implementation takes care of rotation and calls non rotated DrawText afterwards // default implementation takes care of rotation and calls non rotated DrawText afterwards
wxGraphicsContext::DrawText( str, x, y, angle ); wxGraphicsContext::DrawText( str, x, y, angle );
#endif #endif
@@ -2117,7 +2117,7 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
if (str.empty()) if (str.empty())
return; return;
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData(); wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
@@ -2146,7 +2146,7 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
return; return;
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
{ {
OSStatus status = noErr; OSStatus status = noErr;
@@ -2183,7 +2183,7 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
return; return;
} }
#endif #endif
#if wxMAC_USE_CG_TEXT #if wxOSX_USE_IPHONE
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData(); wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
wxCFStringRef text(str, wxLocale::GetSystemEncoding() ); wxCFStringRef text(str, wxLocale::GetSystemEncoding() );
@@ -2210,7 +2210,7 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr
if (text.empty()) if (text.empty())
return; return;
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
{ {
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData(); wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
CTFontRef font = fref->GetCTFont(); CTFontRef font = fref->GetCTFont();
@@ -2232,7 +2232,7 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr
return; return;
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
{ {
OSStatus status = noErr; OSStatus status = noErr;
ATSUTextLayout atsuLayout; ATSUTextLayout atsuLayout;
@@ -2293,7 +2293,7 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr
::ATSUDisposeTextLayout(atsuLayout); ::ATSUDisposeTextLayout(atsuLayout);
} }
#endif #endif
#if wxMAC_USE_CG_TEXT #if wxOSX_USE_IPHONE
// TODO core graphics text implementation here // TODO core graphics text implementation here
#endif #endif
} }

View File

@@ -2829,7 +2829,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
HIThemeTextHorizontalFlush hFlush = kHIThemeTextHorizontalFlushLeft; HIThemeTextHorizontalFlush hFlush = kHIThemeTextHorizontalFlushLeft;
HIThemeTextInfo info; HIThemeTextInfo info;
bool setup = false; bool setup = false;
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
info.version = kHIThemeTextInfoVersionOne; info.version = kHIThemeTextInfoVersionOne;
@@ -2842,7 +2842,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
} }
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
if ( !setup ) if ( !setup )
{ {
info.version = kHIThemeTextInfoVersionZero; info.version = kHIThemeTextInfoVersionZero;

View File

@@ -1658,7 +1658,7 @@ void wxNonOwnedWindowCarbonImpl::Create(
} }
attr |= kWindowCompositingAttribute; attr |= kWindowCompositingAttribute;
#if 0 // wxOSX_USE_CORE_GRAPHICS ; TODO : decide on overall handling of high dpi screens (pixel vs userscale) #if 0 // TODO : decide on overall handling of high dpi screens (pixel vs userscale)
attr |= kWindowFrameworkScaledAttribute; attr |= kWindowFrameworkScaledAttribute;
#endif #endif

View File

@@ -94,7 +94,7 @@ wxSize wxStaticText::DoGetBestSize() const
wxCFStringRef str( m_label, GetFont().GetEncoding() ); wxCFStringRef str( m_label, GetFont().GetEncoding() );
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
SInt16 baseline; SInt16 baseline;
if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont ) if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont )
{ {

View File

@@ -114,7 +114,7 @@ public:
m_controlHandle = NULL ; m_controlHandle = NULL ;
} }
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if ( m_toolbarItemRef ) if ( m_toolbarItemRef )
{ {
CFIndex count = CFGetRetainCount( m_toolbarItemRef ) ; CFIndex count = CFGetRetainCount( m_toolbarItemRef ) ;
@@ -130,7 +130,7 @@ public:
CFRelease(m_toolbarItemRef); CFRelease(m_toolbarItemRef);
m_toolbarItemRef = NULL; m_toolbarItemRef = NULL;
} }
#endif // wxMAC_USE_NATIVE_TOOLBAR #endif // wxOSX_USE_NATIVE_TOOLBAR
} }
wxSize GetSize() const wxSize GetSize() const
@@ -167,7 +167,7 @@ public:
void UpdateToggleImage( bool toggle ); void UpdateToggleImage( bool toggle );
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
void SetToolbarItemRef( HIToolbarItemRef ref ) void SetToolbarItemRef( HIToolbarItemRef ref )
{ {
if ( m_controlHandle ) if ( m_controlHandle )
@@ -215,7 +215,7 @@ private:
{ {
m_controlHandle = NULL; m_controlHandle = NULL;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
m_toolbarItemRef = NULL; m_toolbarItemRef = NULL;
m_index = -1; m_index = -1;
#endif #endif
@@ -225,7 +225,7 @@ private:
wxCoord m_x; wxCoord m_x;
wxCoord m_y; wxCoord m_y;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
HIToolbarItemRef m_toolbarItemRef; HIToolbarItemRef m_toolbarItemRef;
// position in its toolbar, -1 means not inserted // position in its toolbar, -1 means not inserted
CFIndex m_index; CFIndex m_index;
@@ -307,7 +307,7 @@ static pascal OSStatus wxMacToolBarToolEventHandler( EventHandlerCallRef handler
DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacToolBarToolEventHandler ) DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacToolBarToolEventHandler )
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
static const EventTypeSpec toolBarEventList[] = static const EventTypeSpec toolBarEventList[] =
{ {
@@ -377,7 +377,7 @@ bool wxToolBarTool::DoEnable( bool enable )
} }
else if ( IsButton() ) else if ( IsButton() )
{ {
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if ( m_toolbarItemRef != NULL ) if ( m_toolbarItemRef != NULL )
HIToolbarItemSetEnabled( m_toolbarItemRef, enable ); HIToolbarItemSetEnabled( m_toolbarItemRef, enable );
#endif #endif
@@ -418,7 +418,7 @@ void wxToolBarTool::SetPosition( const wxPoint& position )
else if ( IsControl() ) else if ( IsControl() )
{ {
// embedded native controls are moved by the OS // embedded native controls are moved by the OS
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if ( ((wxToolBar*)GetToolBar())->MacWantsNativeToolbar() == false ) if ( ((wxToolBar*)GetToolBar())->MacWantsNativeToolbar() == false )
#endif #endif
{ {
@@ -456,7 +456,7 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
ControlButtonContentInfo info; ControlButtonContentInfo info;
wxMacCreateBitmapButton( &info, bmp ); wxMacCreateBitmapButton( &info, bmp );
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info ); SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_toolbarItemRef != NULL) if (m_toolbarItemRef != NULL)
{ {
ControlButtonContentInfo info2; ControlButtonContentInfo info2;
@@ -472,7 +472,7 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
ControlButtonContentInfo info; ControlButtonContentInfo info;
wxMacCreateBitmapButton( &info, m_bmpNormal ); wxMacCreateBitmapButton( &info, m_bmpNormal );
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info ); SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_toolbarItemRef != NULL) if (m_toolbarItemRef != NULL)
{ {
ControlButtonContentInfo info2; ControlButtonContentInfo info2;
@@ -541,7 +541,7 @@ void wxToolBar::Init()
m_defaultWidth = kwxMacToolBarToolDefaultWidth; m_defaultWidth = kwxMacToolBarToolDefaultWidth;
m_defaultHeight = kwxMacToolBarToolDefaultHeight; m_defaultHeight = kwxMacToolBarToolDefaultHeight;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
m_macHIToolbarRef = NULL; m_macHIToolbarRef = NULL;
m_macUsesNativeToolbar = false; m_macUsesNativeToolbar = false;
#endif #endif
@@ -745,7 +745,7 @@ CantCreateEvent :
return result ; return result ;
} }
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
static const EventTypeSpec kToolbarEvents[] = static const EventTypeSpec kToolbarEvents[] =
{ {
{ kEventClassToolbar, kEventToolbarGetDefaultIdentifiers }, { kEventClassToolbar, kEventToolbarGetDefaultIdentifiers },
@@ -811,7 +811,7 @@ static OSStatus ToolbarDelegateHandler(EventHandlerCallRef WXUNUSED(inCallRef),
} }
return result ; return result ;
} }
#endif // wxMAC_USE_NATIVE_TOOLBAR #endif // wxOSX_USE_NATIVE_TOOLBAR
// also for the toolbar we have the dual implementation: // also for the toolbar we have the dual implementation:
// only when MacInstallNativeToolbar is called is the native toolbar set as the window toolbar // only when MacInstallNativeToolbar is called is the native toolbar set as the window toolbar
@@ -831,7 +831,7 @@ bool wxToolBar::Create(
OSStatus err = noErr; OSStatus err = noErr;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (parent->IsKindOf(CLASSINFO(wxFrame)) && wxSystemOptions::GetOptionInt(wxT("mac.toolbar.no-native")) != 1) if (parent->IsKindOf(CLASSINFO(wxFrame)) && wxSystemOptions::GetOptionInt(wxT("mac.toolbar.no-native")) != 1)
{ {
wxString labelStr = wxString::Format( wxT("%p"), this ); wxString labelStr = wxString::Format( wxT("%p"), this );
@@ -858,14 +858,14 @@ bool wxToolBar::Create(
HIToolbarSetDisplaySize( (HIToolbarRef) m_macHIToolbarRef, displaySize ); HIToolbarSetDisplaySize( (HIToolbarRef) m_macHIToolbarRef, displaySize );
} }
} }
#endif // wxMAC_USE_NATIVE_TOOLBAR #endif // wxOSX_USE_NATIVE_TOOLBAR
return (err == noErr); return (err == noErr);
} }
wxToolBar::~wxToolBar() wxToolBar::~wxToolBar()
{ {
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
// if this is the installed toolbar, then deinstall it // if this is the installed toolbar, then deinstall it
@@ -894,7 +894,7 @@ bool wxToolBar::Show( bool show )
if (bResult) if (bResult)
{ {
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
bool ownToolbarInstalled = false; bool ownToolbarInstalled = false;
MacTopLevelHasNativeToolbar( &ownToolbarInstalled ); MacTopLevelHasNativeToolbar( &ownToolbarInstalled );
if (ownToolbarInstalled) if (ownToolbarInstalled)
@@ -918,7 +918,7 @@ bool wxToolBar::IsShown() const
{ {
bool bResult; bool bResult;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
bool ownToolbarInstalled; bool ownToolbarInstalled;
MacTopLevelHasNativeToolbar( &ownToolbarInstalled ); MacTopLevelHasNativeToolbar( &ownToolbarInstalled );
@@ -939,7 +939,7 @@ bool wxToolBar::IsShown() const
void wxToolBar::DoGetSize( int *width, int *height ) const void wxToolBar::DoGetSize( int *width, int *height ) const
{ {
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
Rect boundsR; Rect boundsR;
bool ownToolbarInstalled; bool ownToolbarInstalled;
@@ -974,7 +974,7 @@ void wxToolBar::SetWindowStyleFlag( long style )
{ {
wxToolBarBase::SetWindowStyleFlag( style ); wxToolBarBase::SetWindowStyleFlag( style );
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
HIToolbarDisplayMode mode = kHIToolbarDisplayModeDefault; HIToolbarDisplayMode mode = kHIToolbarDisplayModeDefault;
@@ -991,7 +991,7 @@ void wxToolBar::SetWindowStyleFlag( long style )
#endif #endif
} }
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
bool wxToolBar::MacWantsNativeToolbar() bool wxToolBar::MacWantsNativeToolbar()
{ {
return m_macUsesNativeToolbar; return m_macUsesNativeToolbar;
@@ -1119,7 +1119,7 @@ bool wxToolBar::Realize()
bool lastIsRadio = false; bool lastIsRadio = false;
bool curIsRadio = false; bool curIsRadio = false;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
CFIndex currentPosition = 0; CFIndex currentPosition = 0;
bool insertAll = false; bool insertAll = false;
@@ -1168,7 +1168,7 @@ bool wxToolBar::Realize()
else else
x += cursize.x + kwxMacToolSpacing; x += cursize.x + kwxMacToolSpacing;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
// install in native HIToolbar // install in native HIToolbar
if ( refTB ) if ( refTB )
{ {
@@ -1349,7 +1349,7 @@ void wxToolBar::SetToolBitmapSize(const wxSize& size)
m_defaultWidth = size.x + kwxMacToolBorder; m_defaultWidth = size.x + kwxMacToolBorder;
m_defaultHeight = size.y + kwxMacToolBorder; m_defaultHeight = size.y + kwxMacToolBorder;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
int maxs = wxMax( size.x, size.y ); int maxs = wxMax( size.x, size.y );
@@ -1383,7 +1383,7 @@ void wxToolBar::MacSuperChangedPosition()
{ {
wxWindow::MacSuperChangedPosition(); wxWindow::MacSuperChangedPosition();
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (! m_macUsesNativeToolbar ) if (! m_macUsesNativeToolbar )
Realize(); Realize();
#else #else
@@ -1473,7 +1473,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
ControlRef controlHandle = NULL; ControlRef controlHandle = NULL;
OSStatus err = 0; OSStatus err = 0;
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
wxString label = tool->GetLabel(); wxString label = tool->GetLabel();
if (m_macHIToolbarRef && !label.empty() ) if (m_macHIToolbarRef && !label.empty() )
{ {
@@ -1481,7 +1481,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
// with the usual labels in wxStaticText sense // with the usual labels in wxStaticText sense
label = wxStripMenuCodes(label); label = wxStripMenuCodes(label);
} }
#endif // wxMAC_USE_NATIVE_TOOLBAR #endif // wxOSX_USE_NATIVE_TOOLBAR
switch (tool->GetStyle()) switch (tool->GetStyle())
{ {
@@ -1496,7 +1496,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
toolrect.right = toolSize.x; toolrect.right = toolSize.x;
// in flat style we need a visual separator // in flat style we need a visual separator
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
HIToolbarItemRef item; HIToolbarItemRef item;
@@ -1509,7 +1509,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
} }
else else
err = noErr; err = noErr;
#endif // wxMAC_USE_NATIVE_TOOLBAR #endif // wxOSX_USE_NATIVE_TOOLBAR
CreateSeparatorControl( window, &toolrect, &controlHandle ); CreateSeparatorControl( window, &toolrect, &controlHandle );
tool->SetControlHandle( controlHandle ); tool->SetControlHandle( controlHandle );
@@ -1540,7 +1540,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
behaviour, &info, 0, 0, 0, &controlHandle ); behaviour, &info, 0, 0, 0, &controlHandle );
} }
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
HIToolbarItemRef item; HIToolbarItemRef item;
@@ -1566,7 +1566,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
} }
else else
err = noErr; err = noErr;
#endif // wxMAC_USE_NATIVE_TOOLBAR #endif // wxOSX_USE_NATIVE_TOOLBAR
wxMacReleaseBitmapButton( &info ); wxMacReleaseBitmapButton( &info );
@@ -1585,7 +1585,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
case wxTOOL_STYLE_CONTROL: case wxTOOL_STYLE_CONTROL:
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
wxCHECK_MSG( tool->GetControl(), false, _T("control must be non-NULL") ); wxCHECK_MSG( tool->GetControl(), false, _T("control must be non-NULL") );
@@ -1663,11 +1663,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolbase)
wxSize sz = ((wxToolBarTool*)tool)->GetSize(); wxSize sz = ((wxToolBarTool*)tool)->GetSize();
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
CFIndex removeIndex = tool->GetIndex(); CFIndex removeIndex = tool->GetIndex();
#endif #endif
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
if ( removeIndex != -1 && m_macHIToolbarRef ) if ( removeIndex != -1 && m_macHIToolbarRef )
@@ -1694,7 +1694,7 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolbase)
tool2->SetPosition( pt ); tool2->SetPosition( pt );
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL) if (m_macHIToolbarRef != NULL)
{ {
if ( removeIndex != -1 && tool2->GetIndex() > removeIndex ) if ( removeIndex != -1 && tool2->GetIndex() > removeIndex )
@@ -1710,7 +1710,7 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolbase)
void wxToolBar::OnPaint(wxPaintEvent& event) void wxToolBar::OnPaint(wxPaintEvent& event)
{ {
#if wxMAC_USE_NATIVE_TOOLBAR #if wxOSX_USE_NATIVE_TOOLBAR
if ( m_macUsesNativeToolbar ) if ( m_macUsesNativeToolbar )
{ {
event.Skip(true); event.Skip(true);

View File

@@ -3399,7 +3399,7 @@ void wxMacControl::SuperChangedPosition()
void wxMacControl::SetFont( const wxFont & font , const wxColour& foreground , long windowStyle ) void wxMacControl::SetFont( const wxFont & font , const wxColour& foreground , long windowStyle )
{ {
m_font = font; m_font = font;
#if wxMAC_USE_CORE_TEXT #if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 ) if ( UMAGetSystemVersion() >= 0x1050 )
{ {
HIViewPartCode part = 0; HIViewPartCode part = 0;
@@ -3420,7 +3420,7 @@ void wxMacControl::SetFont( const wxFont & font , const wxColour& foreground , l
} }
} }
#endif #endif
#if wxMAC_USE_ATSU_TEXT #if wxOSX_USE_ATSU_TEXT
ControlFontStyleRec fontStyle; ControlFontStyleRec fontStyle;
if ( font.MacGetThemeFontID() != kThemeCurrentPortFont ) if ( font.MacGetThemeFontID() != kThemeCurrentPortFont )
{ {