git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52246
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
14 files changed:
OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
verify_noerr( err );
OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
verify_noerr( err );
- wxCFStringRef str( m_label, m_font.GetEncoding() );
+ wxCFStringRef str( m_label, GetFont().GetEncoding() );
#if wxMAC_USE_ATSU_TEXT
SInt16 baseline;
#if wxMAC_USE_ATSU_TEXT
SInt16 baseline;
UMAInsertMenuItem(MAC_WXHMENU( m_macPopUpMenuHandle ),
items[i],
UMAInsertMenuItem(MAC_WXHMENU( m_macPopUpMenuHandle ),
items[i],
+ GetFont().GetEncoding(),
idx);
m_datas.Insert( NULL, idx );
AssignNewItemClientData(idx, clientData, i, type);
idx);
m_datas.Insert( NULL, idx );
AssignNewItemClientData(idx, clientData, i, type);
#if USE_HICOMBOBOX
CFStringRef myString;
HIComboBoxCopyTextItemAtIndex( m_peer->GetControlRef(), (CFIndex)GetSelection(), &myString );
#if USE_HICOMBOBOX
CFStringRef myString;
HIComboBoxCopyTextItemAtIndex( m_peer->GetControlRef(), (CFIndex)GetSelection(), &myString );
- return wxMacCFStringHolder( myString, m_font.GetEncoding() ).AsString();
+ return wxMacCFStringHolder( myString, GetFont().GetEncoding() ).AsString();
HIComboBoxInsertTextItemAtIndex(m_peer->GetControlRef(),
(CFIndex)pos,
wxMacCFStringHolder(items[i],
HIComboBoxInsertTextItemAtIndex(m_peer->GetControlRef(),
(CFIndex)pos,
wxMacCFStringHolder(items[i],
- m_font.GetEncoding()));
+ GetFont().GetEncoding()));
AssignNewItemClientData(pos, clientData, i, type);
}
AssignNewItemClientData(pos, clientData, i, type);
}
{
#if USE_HICOMBOBOX
verify_noerr ( HIComboBoxInsertTextItemAtIndex( m_peer->GetControlRef(), (CFIndex) n,
{
#if USE_HICOMBOBOX
verify_noerr ( HIComboBoxInsertTextItemAtIndex( m_peer->GetControlRef(), (CFIndex) n,
- wxMacCFStringHolder(s, m_font.GetEncoding()) ) );
+ wxMacCFStringHolder(s, GetFont().GetEncoding()) ) );
verify_noerr ( HIComboBoxRemoveItemAtIndex( m_peer->GetControlRef(), (CFIndex) n + 1 ) );
#else
m_choice->SetString( n , s );
verify_noerr ( HIComboBoxRemoveItemAtIndex( m_peer->GetControlRef(), (CFIndex) n + 1 ) );
#else
m_choice->SetString( n , s );
wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
#if wxCHECK_VERSION(2,9,0)
wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
#if wxCHECK_VERSION(2,9,0)
- wxCFStringRef title(columnPtr->GetTitle(),this->m_font.Ok() ? this->m_font.GetEncoding() : wxLocale::GetSystemEncoding());
+ wxCFStringRef title(columnPtr->GetTitle(),this->m_font.Ok() ? this->GetFont().GetEncoding() : wxLocale::GetSystemEncoding());
- wxMacCFStringHolder title(columnPtr->GetTitle(),this->m_font.Ok() ? this->m_font.GetEncoding() : wxLocale::GetSystemEncoding());
+ wxMacCFStringHolder title(columnPtr->GetTitle(),this->m_font.Ok() ? this->GetFont().GetEncoding() : wxLocale::GetSystemEncoding());
wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
#if wxCHECK_VERSION(2,9,0)
wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
#if wxCHECK_VERSION(2,9,0)
- wxCFStringRef title(columnPtr->GetTitle(),this->m_font.Ok() ? this->m_font.GetEncoding() : wxLocale::GetSystemEncoding());
+ wxCFStringRef title(columnPtr->GetTitle(),this->m_font.Ok() ? this->GetFont().GetEncoding() : wxLocale::GetSystemEncoding());
- wxMacCFStringHolder title(columnPtr->GetTitle(),this->m_font.Ok() ? this->m_font.GetEncoding() : wxLocale::GetSystemEncoding());
+ wxMacCFStringHolder title(columnPtr->GetTitle(),this->m_font.Ok() ? this->GetFont().GetEncoding() : wxLocale::GetSystemEncoding());
options.optionFlags &= ~kNavAllowMultipleFiles;
if (err == noErr)
{
options.optionFlags &= ~kNavAllowMultipleFiles;
if (err == noErr)
{
- wxCFStringRef message(m_message, m_font.GetEncoding());
+ wxCFStringRef message(m_message, GetFont().GetEncoding());
options.message = message;
err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL, this , &dialog);
if (err == noErr)
options.message = message;
err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL, this , &dialog);
if (err == noErr)
// this was always unset in the old code
dialogCreateOptions.optionFlags &= ~kNavSelectDefaultLocation;
// this was always unset in the old code
dialogCreateOptions.optionFlags &= ~kNavSelectDefaultLocation;
- wxCFStringRef message(m_message, m_font.GetEncoding());
+ wxCFStringRef message(m_message, GetFont().GetEncoding());
dialogCreateOptions.windowTitle = message;
dialogCreateOptions.windowTitle = message;
- wxCFStringRef defaultFileName(m_fileName, m_font.GetEncoding());
+ wxCFStringRef defaultFileName(m_fileName, GetFont().GetEncoding());
dialogCreateOptions.saveFileName = defaultFileName;
dialogCreateOptions.saveFileName = defaultFileName;
myData.menuitems = dialogCreateOptions.popupExtension ;
for ( size_t i = 0 ; i < numFilters ; ++i )
{
myData.menuitems = dialogCreateOptions.popupExtension ;
for ( size_t i = 0 ; i < numFilters ; ++i )
{
- CFArrayAppendValue( popup , (CFStringRef) wxCFStringRef( myData.name[i] , m_font.GetEncoding() ) ) ;
+ CFArrayAppendValue( popup , (CFStringRef) wxCFStringRef( myData.name[i] , GetFont().GetEncoding() ) ) ;
{
wxFontEncoding enc;
if ( m_font.Ok() )
{
wxFontEncoding enc;
if ( m_font.Ok() )
- enc = m_font.GetEncoding();
+ enc = GetFont().GetEncoding();
else
enc = wxLocale::GetSystemEncoding();
wxCFStringRef cfTitle;
else
enc = wxLocale::GetSystemEncoding();
wxCFStringRef cfTitle;
- UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , m_titles[i], m_font.GetEncoding() ) ;
+ UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , m_titles[i], GetFont().GetEncoding() ) ;
menu->MacBeforeDisplay(false) ;
::InsertMenu(MAC_WXHMENU(_wxMenuAt(m_menus, i)->GetHMenu()), 0);
menu->MacBeforeDisplay(false) ;
::InsertMenu(MAC_WXHMENU(_wxMenuAt(m_menus, i)->GetHMenu()), 0);
::DeleteMenu( menuOld->MacGetMenuId() /* m_menus[pos]->MacGetMenuId() */ ) ;
menu->MacBeforeDisplay( false ) ;
::DeleteMenu( menuOld->MacGetMenuId() /* m_menus[pos]->MacGetMenuId() */ ) ;
menu->MacBeforeDisplay( false ) ;
- UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , m_font.GetEncoding() ) ;
+ UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , GetFont().GetEncoding() ) ;
if ( pos == m_menus.GetCount() - 1)
::InsertMenu( MAC_WXHMENU(menu->GetHMenu()) , 0 ) ;
else
if ( pos == m_menus.GetCount() - 1)
::InsertMenu( MAC_WXHMENU(menu->GetHMenu()) , 0 ) ;
else
m_titles.Insert(title, pos);
m_titles.Insert(title, pos);
- UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , m_font.GetEncoding() ) ;
+ UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , GetFont().GetEncoding() ) ;
if ( IsAttached() && s_macInstalledMenuBar == this )
{
if ( IsAttached() && s_macInstalledMenuBar == this )
{
- UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , m_font.GetEncoding() ) ;
+ UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , title , GetFont().GetEncoding() ) ;
CFStringRef alternateButtonTitle = NULL;
CFStringRef otherButtonTitle = NULL;
CFStringRef alternateButtonTitle = NULL;
CFStringRef otherButtonTitle = NULL;
- wxCFStringRef cfTitle( msgtitle, m_font.GetEncoding() );
- wxCFStringRef cfText( msgtext, m_font.GetEncoding() );
+ wxCFStringRef cfTitle( msgtitle, GetFont().GetEncoding() );
+ wxCFStringRef cfText( msgtext, GetFont().GetEncoding() );
- wxCFStringRef cfNoString( m_no.c_str(), m_font.GetEncoding() );
- wxCFStringRef cfYesString( m_yes.c_str(), m_font.GetEncoding() );
- wxCFStringRef cfOKString( m_ok.c_str() , m_font.GetEncoding()) ;
- wxCFStringRef cfCancelString( m_cancel.c_str(), m_font.GetEncoding() );
+ wxCFStringRef cfNoString( m_no.c_str(), GetFont().GetEncoding() );
+ wxCFStringRef cfYesString( m_yes.c_str(), GetFont().GetEncoding() );
+ wxCFStringRef cfOKString( m_ok.c_str() , GetFont().GetEncoding()) ;
+ wxCFStringRef cfCancelString( m_cancel.c_str(), GetFont().GetEncoding() );
int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ };
int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ };
short result;
AlertStdCFStringAlertParamRec param;
short result;
AlertStdCFStringAlertParamRec param;
- wxCFStringRef cfNoString( m_no.c_str(), m_font.GetEncoding() );
- wxCFStringRef cfYesString( m_yes.c_str(), m_font.GetEncoding() );
- wxCFStringRef cfOKString( m_ok.c_str(), m_font.GetEncoding() );
- wxCFStringRef cfCancelString( m_cancel.c_str(), m_font.GetEncoding() );
+ wxCFStringRef cfNoString( m_no.c_str(), GetFont().GetEncoding() );
+ wxCFStringRef cfYesString( m_yes.c_str(), GetFont().GetEncoding() );
+ wxCFStringRef cfOKString( m_ok.c_str(), GetFont().GetEncoding() );
+ wxCFStringRef cfCancelString( m_cancel.c_str(), GetFont().GetEncoding() );
- wxCFStringRef cfTitle( msgtitle, m_font.GetEncoding() );
- wxCFStringRef cfText( msgtext, m_font.GetEncoding() );
+ wxCFStringRef cfTitle( msgtitle, GetFont().GetEncoding() );
+ wxCFStringRef cfText( msgtext, GetFont().GetEncoding() );
param.movable = true;
param.flags = 0;
param.movable = true;
param.flags = 0;
page = m_pages[ii];
info.version = kControlTabInfoVersionOne;
info.iconSuiteID = 0;
page = m_pages[ii];
info.version = kControlTabInfoVersionOne;
info.iconSuiteID = 0;
- wxCFStringRef cflabel( page->GetLabel(), m_font.GetEncoding() ) ;
+ wxCFStringRef cflabel( page->GetLabel(), GetFont().GetEncoding() ) ;
info.name = cflabel ;
m_peer->SetData<ControlTabInfoRecV1>( ii + 1, kControlTabInfoTag, &info ) ;
info.name = cflabel ;
m_peer->SetData<ControlTabInfoRecV1>( ii + 1, kControlTabInfoTag, &info ) ;
OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
verify_noerr( err );
OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
verify_noerr( err );
- wxCFStringRef str( m_label, m_font.GetEncoding() );
+ wxCFStringRef str( m_label, GetFont().GetEncoding() );
#if wxMAC_USE_ATSU_TEXT
SInt16 baseline;
#if wxMAC_USE_ATSU_TEXT
SInt16 baseline;
m_labelOrig = label;
m_label = RemoveMnemonics(label);
m_labelOrig = label;
m_label = RemoveMnemonics(label);
- wxCFStringRef str( m_label, m_font.GetEncoding() );
+ wxCFStringRef str( m_label, GetFont().GetEncoding() );
OSStatus err = m_peer->SetData<CFStringRef>(kControlEntireControl, kControlStaticTextCFStringTag, str);
verify_noerr( err );
}
OSStatus err = m_peer->SetData<CFStringRef>(kControlEntireControl, kControlStaticTextCFStringTag, str);
verify_noerr( err );
}
InstallEventHandler(
HIObjectGetEventTarget(item), GetwxMacToolBarEventHandlerUPP(),
GetEventTypeCount(toolBarEventList), toolBarEventList, tool, NULL );
InstallEventHandler(
HIObjectGetEventTarget(item), GetwxMacToolBarEventHandlerUPP(),
GetEventTypeCount(toolBarEventList), toolBarEventList, tool, NULL );
- HIToolbarItemSetLabel( item, wxCFStringRef(label, m_font.GetEncoding()) );
+ HIToolbarItemSetLabel( item, wxCFStringRef(label, GetFont().GetEncoding()) );
HIToolbarItemSetImage( item, info2.u.imageRef );
HIToolbarItemSetCommandID( item, kHIToolbarCommandPressAction );
tool->SetToolbarItemRef( item );
HIToolbarItemSetImage( item, info2.u.imageRef );
HIToolbarItemSetCommandID( item, kHIToolbarCommandPressAction );
tool->SetToolbarItemRef( item );
SetWindowBounds( (WindowRef) m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ;
SetWindowBounds( (WindowRef) m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ;
- SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , m_font.GetEncoding() ) );
+ SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , GetFont().GetEncoding() ) );
m_peer = new wxMacControl(this , true /*isRootControl*/) ;
// There is a bug in 10.2.X for ::GetRootControl returning the window view instead of
m_peer = new wxMacControl(this , true /*isRootControl*/) ;
// There is a bug in 10.2.X for ::GetRootControl returning the window view instead of
void wxTopLevelWindowMac::SetTitle(const wxString& title)
{
wxWindow::SetLabel( title ) ;
void wxTopLevelWindowMac::SetTitle(const wxString& title)
{
wxWindow::SetLabel( title ) ;
- SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , m_font.GetEncoding() ) ) ;
+ SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxCFStringRef( title , GetFont().GetEncoding() ) ) ;
}
wxString wxTopLevelWindowMac::GetTitle() const
}
wxString wxTopLevelWindowMac::GetTitle() const
m_macIsUserPane = true;
m_clipChildren = false ;
m_cachedClippedRectValid = false ;
m_macIsUserPane = true;
m_clipChildren = false ;
m_cachedClippedRectValid = false ;
-
- // we need a valid font for the encodings
- wxWindowBase::SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
}
wxWindowMac::~wxWindowMac()
}
wxWindowMac::~wxWindowMac()