// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_FONTDLG
+
#ifdef __BORLANDC__
#pragma hdrstop
#endif
{
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);
}
}
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);
wxFontEnumerator enumerator;
enumerator.EnumerateFacenames();
- wxArrayString* facenames = enumerator.GetFacenames();
+ wxArrayString facenames = enumerator.GetFacenames();
if (facenames)
{
- facenames->Add(_("<Any>"));
- facenames->Add(_("<Any Roman>"));
- facenames->Add(_("<Any Decorative>"));
- facenames->Add(_("<Any Modern>"));
- facenames->Add(_("<Any Script>"));
- facenames->Add(_("<Any Swiss>"));
- facenames->Add(_("<Any Teletype>"));
- facenames->Sort();
- m_facenameCtrl->Append(*facenames);
+ facenames.Add(_("<Any>"));
+ facenames.Add(_("<Any Roman>"));
+ facenames.Add(_("<Any Decorative>"));
+ facenames.Add(_("<Any Modern>"));
+ facenames.Add(_("<Any Script>"));
+ facenames.Add(_("<Any Swiss>"));
+ facenames.Add(_("<Any Teletype>"));
+ facenames.Sort();
+ m_facenameCtrl->Append(facenames);
}
InitializeControls();
#endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
-#endif
+#endif // wxMAC_USE_EXPERIMENTAL_FONTDIALOG
+
+#endif // wxUSE_FONTDLG