X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec8a8e042e32437ffbd131d87d59b0a6ce4ed453..a7868cdf6a8782a04a46791dd63de2ade825a8bc:/src/mac/carbon/fontdlg.cpp diff --git a/src/mac/carbon/fontdlg.cpp b/src/mac/carbon/fontdlg.cpp index 737176163d..67b93fb6cb 100644 --- a/src/mac/carbon/fontdlg.cpp +++ b/src/mac/carbon/fontdlg.cpp @@ -20,6 +20,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_FONTDLG + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -115,9 +117,9 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve { fontdata.m_chosenFont.SetFaceName(wxMacCFStringHolder(cfName).AsString(wxLocale::GetSystemEncoding())); fontdata.m_chosenFont.SetPointSize(fontSize); - fontdata.m_chosenFont.SetStyle(fontStyle & italic ? wxFONTSTYLE_ITALIC : 0); - fontdata.m_chosenFont.SetUnderlined(fontStyle & underline ? wxFONTSTYLE_ITALIC : 0); - fontdata.m_chosenFont.SetWeight(fontStyle & bold ? wxBOLD : wxNORMAL); + fontdata.m_chosenFont.SetStyle(fontStyle & italic ? wxFONTSTYLE_ITALIC : wxFONTSTYLE_NORMAL); + fontdata.m_chosenFont.SetUnderlined((fontStyle & underline)!=0); + fontdata.m_chosenFont.SetWeight(fontStyle & bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL); } } @@ -286,7 +288,7 @@ class wxFontColourSwatchCtrl: public wxControl DECLARE_CLASS(wxFontColourSwatchCtrl) public: wxFontColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); - ~wxFontColourSwatchCtrl(); + virtual ~wxFontColourSwatchCtrl(); void OnPaint(wxPaintEvent& event); void OnMouseEvent(wxMouseEvent& event); @@ -535,18 +537,18 @@ void wxFontDialog::CreateControls() wxFontEnumerator enumerator; enumerator.EnumerateFacenames(); - wxArrayString* facenames = enumerator.GetFacenames(); + wxArrayString facenames = enumerator.GetFacenames(); if (facenames) { - facenames->Add(_("")); - facenames->Add(_("")); - facenames->Add(_("")); - facenames->Add(_("")); - facenames->Add(_("")); - facenames->Add(_("")); - facenames->Add(_("")); - facenames->Sort(); - m_facenameCtrl->Append(*facenames); + facenames.Add(_("")); + facenames.Add(_("")); + facenames.Add(_("")); + facenames.Add(_("")); + facenames.Add(_("")); + facenames.Add(_("")); + facenames.Add(_("")); + facenames.Sort(); + m_facenameCtrl->Append(facenames); } InitializeControls(); @@ -782,4 +784,6 @@ int FontFamilyStringToInt(const wxChar *family) #endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX -#endif +#endif // wxMAC_USE_EXPERIMENTAL_FONTDIALOG + +#endif // wxUSE_FONTDLG