};
-#define wxMAC_USE_PREMULTIPLIED_ALPHA 1
+#define wxOSX_USE_PREMULTIPLIED_ALPHA 1
static const int kBestByteAlignement = 16;
static const int kMaskBytesPerPixel = 1;
a = 0xFF ;
else
{
-#if wxMAC_USE_PREMULTIPLIED_ALPHA
+#if wxOSX_USE_PREMULTIPLIED_ALPHA
// this must be non-premultiplied data
if ( a != 0xFF && a!= 0 )
{
{
if ( m_hasAlpha )
{
-#if wxMAC_USE_PREMULTIPLIED_ALPHA
+#if wxOSX_USE_PREMULTIPLIED_ALPHA
alphaInfo = kCGImageAlphaPremultipliedFirst ;
#else
alphaInfo = kCGImageAlphaFirst ;
unsigned char a = *sourcemask++;
*destination++ = a;
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;
const unsigned char a = *alpha++;
*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 ;
else if ( hasAlpha )
{
*alpha++ = a ;
-#if wxMAC_USE_PREMULTIPLIED_ALPHA
+#if wxOSX_USE_PREMULTIPLIED_ALPHA
// this must be non-premultiplied data
if ( a != 0xFF && a!= 0 )
{
wxCFStringRef str( m_label, GetFont().GetEncoding() );
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
SInt16 baseline;
if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont )
{
IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
-#if wxOSX_USE_QUICKDRAW
+#if wxOSX_USE_CARBON
wxColour::wxColour(const RGBColor& col)
{
InitRGBColor(col);
InitCGColorRef(col);
}
-#if wxOSX_USE_QUICKDRAW
+#if wxOSX_USE_CARBON
void wxColour::GetRGBColor( RGBColor *col ) const
{
col->red = (m_red << 8) + m_red;
m_cgColour.reset( col );
}
-#if wxOSX_USE_QUICKDRAW
+#if wxOSX_USE_CARBON
void wxColour::InitRGBColor( const RGBColor& col )
{
m_red = col.red >> 8;
-#if wxMAC_USE_RUN_APP_EVENT_LOOP
+#if wxOSX_USE_RUN_APP_EVENT_LOOP
int wxGUIEventLoop::Run()
{
Init(size, family, style, weight, underlined, faceName, encoding);
}
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
wxFontRefData( wxUint32 coreTextFontType );
wxFontRefData( CTFontRef font );
wxFontRefData( CTFontDescriptorRef fontdescriptor, int size );
const wxString& faceName,
wxFontEncoding encoding);
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
void Init( CTFontRef font );
#endif
// font characterstics
bool m_noAA; // No anti-aliasing
public:
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
FMFontFamily m_macFontFamily;
FMFontSize m_macFontSize;
FMFontStyle m_macFontStyle;
// information here, as this speeds up and optimizes rendering
ThemeFontID m_macThemeFontID ;
#endif
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
wxCFRef<CTFontRef> m_ctFont;
wxCFRef<CTFontDescriptorRef> m_ctFontDescriptor;
#endif
-#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
ATSUStyle m_macATSUStyle ;
#endif
wxNativeFontInfo m_info;
m_faceName = faceName;
m_encoding = encoding;
m_noAA = false;
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
m_macFontFamily = 0 ;
m_macFontSize = 0;
m_macFontStyle = 0;
m_macATSUAdditionalQDStyles = 0 ;
m_macThemeFontID = kThemeCurrentPortFont ;
#endif
-#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
m_macATSUStyle = NULL ;
#endif
}
wxFontRefData::~wxFontRefData()
{
-#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
if ( m_macATSUStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
void wxFontRefData::MacInvalidateNativeFont()
{
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
m_ctFont.reset();
m_ctFontDescriptor.reset();
#endif
-#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
if ( m_macATSUStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
#endif
}
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
/* from Core Text Manual Common Operations */
void wxFontRefData::MacFindFont()
{
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
if ( m_faceName.empty() && m_family == wxDEFAULT )
}
}
}
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
OSStatus status = noErr;
CTFontDescriptorRef desc = m_ctFontDescriptor ;
ATSFontRef atsfont = CTFontGetPlatformFont( m_ctFont, &desc );
#endif
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
{
OSStatus status = noErr;
Str255 qdFontName ;
return true;
}
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
bool wxFont::MacCreateFromUIFont(wxUint32 ctFontType )
{
bool wxFont::MacCreateFromThemeFont(wxUint16 themeFontID)
{
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050)
{
return MacCreateFromUIFont(HIThemeGetUIFontType(themeFontID));
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
{
UnRef();
return M_FONTDATA->GetNoAntiAliasing();
}
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
short wxFont::MacGetFontNum() const
{
}
#endif
-#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
void * wxFont::MacGetATSUStyle() const
{
wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
}
#endif
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
const void * wxFont::MacGetCTFont() const
{
#include "wx/fontdlg.h"
-#if wxMAC_USE_EXPERIMENTAL_FONTDIALOG
+#if wxOSX_USE_EXPERIMENTAL_FONTDIALOG
IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
case kEventFontSelection :
{
bool setup = false ;
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
CTFontDescriptorRef descr;
}
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
ATSUFontID fontId = 0 ;
if ( !setup && (cEvent.GetParameter<ATSUFontID>(kEventParamATSUFontID, &fontId) == noErr) )
{
fontdata.m_chosenFont.SetWeight(fontStyle & bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL);
}
}
-#endif // wxMAC_USE_ATSU_TEXT
+#endif // wxOSX_USE_ATSU_TEXT
// retrieving the color
RGBColor fontColor ;
}
bool setup = false;
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
CTFontDescriptorRef descr = (CTFontDescriptorRef)font.MacGetCTFontDescriptor();
setup = true;
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
if ( !setup )
{
ATSUStyle style = (ATSUStyle)font.MacGetATSUStyle();
#endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
-#endif // wxMAC_USE_EXPERIMENTAL_FONTDIALOG
+#endif // wxOSX_USE_EXPERIMENTAL_FONTDIALOG
#endif // wxUSE_FONTDLG
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h"
-#if wxMAC_USE_EXPERIMENTAL_FONTDIALOG
+#if wxOSX_USE_EXPERIMENTAL_FONTDIALOG
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
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
}
else
{
-#if !wxMAC_USE_NATIVE_TOOLBAR
+#if !wxOSX_USE_NATIVE_TOOLBAR
pt.y += h;
#endif
}
}
else
{
-#if !wxMAC_USE_NATIVE_TOOLBAR
+#if !wxOSX_USE_NATIVE_TOOLBAR
if ( y )
*y -= h;
#endif
if ( m_frameToolBar == toolbar )
return ;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if ( m_frameToolBar )
m_frameToolBar->MacInstallNativeToolbar( false ) ;
#endif
m_frameToolBar = toolbar ;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if ( toolbar )
toolbar->MacInstallNativeToolbar( true ) ;
#endif
}
else
{
-#if !wxMAC_USE_NATIVE_TOOLBAR
+#if !wxOSX_USE_NATIVE_TOOLBAR
// Use the 'real' position
GetToolBar()->SetSize(tx , ty , cw , th, wxSIZE_NO_ADJUSTMENTS );
#endif
}
-#define wxMAC_USE_CORE_TEXT 1
+#define wxOSX_USE_CORE_TEXT 1
#endif
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 )
{
wxMacCoreGraphicsFontData( wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col );
~wxMacCoreGraphicsFontData();
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
virtual ATSUStyle GetATSUStyle() { return m_macATSUIStyle; }
#endif
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
CTFontRef GetCTFont() const { return m_ctFont ; }
#endif
wxColour GetColour() const { return m_colour ; }
private :
wxColour m_colour;
bool m_underlined;
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
ATSUStyle m_macATSUIStyle;
#endif
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
wxCFRef< CTFontRef > m_ctFont;
#endif
#if wxOSX_USE_IPHONE
m_colour = col;
m_underlined = font.GetUnderlined();
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
m_ctFont.reset( wxMacCreateCTFont( font ) );
#endif
#if wxOSX_USE_IPHONE
m_uiFont = CreateUIFont(font);
wxMacCocoaRetain( m_uiFont );
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
OSStatus status = noErr;
m_macATSUIStyle = NULL;
wxMacCoreGraphicsFontData::~wxMacCoreGraphicsFontData()
{
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
if ( m_macATSUIStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle);
return;
EnsureIsValid();
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
return;
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
{
DrawText(str, x, y, 0.0);
return;
}
#endif
-#if wxMAC_USE_CG_TEXT
+#if wxOSX_USE_IPHONE
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
CGContextSaveGState(m_cgContext);
return;
EnsureIsValid();
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
// default implementation takes care of rotation and calls non rotated DrawText afterwards
return;
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
{
OSStatus status = noErr;
ATSUTextLayout atsuLayout;
return;
}
#endif
-#if wxMAC_USE_CG_TEXT
+#if wxOSX_USE_IPHONE
// default implementation takes care of rotation and calls non rotated DrawText afterwards
wxGraphicsContext::DrawText( str, x, y, angle );
#endif
if (str.empty())
return;
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
return;
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
{
OSStatus status = noErr;
return;
}
#endif
-#if wxMAC_USE_CG_TEXT
+#if wxOSX_USE_IPHONE
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
wxCFStringRef text(str, wxLocale::GetSystemEncoding() );
if (text.empty())
return;
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
{
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
CTFontRef font = fref->GetCTFont();
return;
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
{
OSStatus status = noErr;
ATSUTextLayout atsuLayout;
::ATSUDisposeTextLayout(atsuLayout);
}
#endif
-#if wxMAC_USE_CG_TEXT
+#if wxOSX_USE_IPHONE
// TODO core graphics text implementation here
#endif
}
HIThemeTextHorizontalFlush hFlush = kHIThemeTextHorizontalFlushLeft;
HIThemeTextInfo info;
bool setup = false;
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
info.version = kHIThemeTextInfoVersionOne;
}
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
if ( !setup )
{
info.version = kHIThemeTextInfoVersionZero;
}
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;
#endif
wxCFStringRef str( m_label, GetFont().GetEncoding() );
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
SInt16 baseline;
if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont )
{
m_controlHandle = NULL ;
}
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if ( m_toolbarItemRef )
{
CFIndex count = CFGetRetainCount( m_toolbarItemRef ) ;
CFRelease(m_toolbarItemRef);
m_toolbarItemRef = NULL;
}
-#endif // wxMAC_USE_NATIVE_TOOLBAR
+#endif // wxOSX_USE_NATIVE_TOOLBAR
}
wxSize GetSize() const
void UpdateToggleImage( bool toggle );
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
void SetToolbarItemRef( HIToolbarItemRef ref )
{
if ( m_controlHandle )
{
m_controlHandle = NULL;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
m_toolbarItemRef = NULL;
m_index = -1;
#endif
wxCoord m_x;
wxCoord m_y;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
HIToolbarItemRef m_toolbarItemRef;
// position in its toolbar, -1 means not inserted
CFIndex m_index;
DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacToolBarToolEventHandler )
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
static const EventTypeSpec toolBarEventList[] =
{
}
else if ( IsButton() )
{
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if ( m_toolbarItemRef != NULL )
HIToolbarItemSetEnabled( m_toolbarItemRef, enable );
#endif
else if ( IsControl() )
{
// embedded native controls are moved by the OS
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if ( ((wxToolBar*)GetToolBar())->MacWantsNativeToolbar() == false )
#endif
{
ControlButtonContentInfo info;
wxMacCreateBitmapButton( &info, bmp );
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_toolbarItemRef != NULL)
{
ControlButtonContentInfo info2;
ControlButtonContentInfo info;
wxMacCreateBitmapButton( &info, m_bmpNormal );
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_toolbarItemRef != NULL)
{
ControlButtonContentInfo info2;
m_defaultWidth = kwxMacToolBarToolDefaultWidth;
m_defaultHeight = kwxMacToolBarToolDefaultHeight;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
m_macHIToolbarRef = NULL;
m_macUsesNativeToolbar = false;
#endif
return result ;
}
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
static const EventTypeSpec kToolbarEvents[] =
{
{ kEventClassToolbar, kEventToolbarGetDefaultIdentifiers },
}
return result ;
}
-#endif // wxMAC_USE_NATIVE_TOOLBAR
+#endif // wxOSX_USE_NATIVE_TOOLBAR
// also for the toolbar we have the dual implementation:
// only when MacInstallNativeToolbar is called is the native toolbar set as the window toolbar
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)
{
wxString labelStr = wxString::Format( wxT("%p"), this );
HIToolbarSetDisplaySize( (HIToolbarRef) m_macHIToolbarRef, displaySize );
}
}
-#endif // wxMAC_USE_NATIVE_TOOLBAR
+#endif // wxOSX_USE_NATIVE_TOOLBAR
return (err == noErr);
}
wxToolBar::~wxToolBar()
{
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
// if this is the installed toolbar, then deinstall it
if (bResult)
{
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
bool ownToolbarInstalled = false;
MacTopLevelHasNativeToolbar( &ownToolbarInstalled );
if (ownToolbarInstalled)
{
bool bResult;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
bool ownToolbarInstalled;
MacTopLevelHasNativeToolbar( &ownToolbarInstalled );
void wxToolBar::DoGetSize( int *width, int *height ) const
{
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
Rect boundsR;
bool ownToolbarInstalled;
{
wxToolBarBase::SetWindowStyleFlag( style );
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
HIToolbarDisplayMode mode = kHIToolbarDisplayModeDefault;
#endif
}
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
bool wxToolBar::MacWantsNativeToolbar()
{
return m_macUsesNativeToolbar;
bool lastIsRadio = false;
bool curIsRadio = false;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
CFIndex currentPosition = 0;
bool insertAll = false;
else
x += cursize.x + kwxMacToolSpacing;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
// install in native HIToolbar
if ( refTB )
{
m_defaultWidth = size.x + kwxMacToolBorder;
m_defaultHeight = size.y + kwxMacToolBorder;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
int maxs = wxMax( size.x, size.y );
{
wxWindow::MacSuperChangedPosition();
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (! m_macUsesNativeToolbar )
Realize();
#else
ControlRef controlHandle = NULL;
OSStatus err = 0;
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
wxString label = tool->GetLabel();
if (m_macHIToolbarRef && !label.empty() )
{
// with the usual labels in wxStaticText sense
label = wxStripMenuCodes(label);
}
-#endif // wxMAC_USE_NATIVE_TOOLBAR
+#endif // wxOSX_USE_NATIVE_TOOLBAR
switch (tool->GetStyle())
{
toolrect.right = toolSize.x;
// in flat style we need a visual separator
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
HIToolbarItemRef item;
}
else
err = noErr;
-#endif // wxMAC_USE_NATIVE_TOOLBAR
+#endif // wxOSX_USE_NATIVE_TOOLBAR
CreateSeparatorControl( window, &toolrect, &controlHandle );
tool->SetControlHandle( controlHandle );
behaviour, &info, 0, 0, 0, &controlHandle );
}
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
HIToolbarItemRef item;
}
else
err = noErr;
-#endif // wxMAC_USE_NATIVE_TOOLBAR
+#endif // wxOSX_USE_NATIVE_TOOLBAR
wxMacReleaseBitmapButton( &info );
case wxTOOL_STYLE_CONTROL:
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
wxCHECK_MSG( tool->GetControl(), false, _T("control must be non-NULL") );
wxSize sz = ((wxToolBarTool*)tool)->GetSize();
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
CFIndex removeIndex = tool->GetIndex();
#endif
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
if ( removeIndex != -1 && m_macHIToolbarRef )
tool2->SetPosition( pt );
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macHIToolbarRef != NULL)
{
if ( removeIndex != -1 && tool2->GetIndex() > removeIndex )
void wxToolBar::OnPaint(wxPaintEvent& event)
{
-#if wxMAC_USE_NATIVE_TOOLBAR
+#if wxOSX_USE_NATIVE_TOOLBAR
if ( m_macUsesNativeToolbar )
{
event.Skip(true);
void wxMacControl::SetFont( const wxFont & font , const wxColour& foreground , long windowStyle )
{
m_font = font;
-#if wxMAC_USE_CORE_TEXT
+#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
HIViewPartCode part = 0;
}
}
#endif
-#if wxMAC_USE_ATSU_TEXT
+#if wxOSX_USE_ATSU_TEXT
ControlFontStyleRec fontStyle;
if ( font.MacGetThemeFontID() != kThemeCurrentPortFont )
{