]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/font/font.cpp
added missing includes required for CW8 Carbon compilation
[wxWidgets.git] / samples / font / font.cpp
index 5fc9a0693ddcaf3c958dfc3cb30b3a30cf7b2398..8277b873e9ecd36c780225e71f59d7652ba9f833 100644 (file)
@@ -86,8 +86,8 @@ public:
     void OnQuit(wxCommandEvent& event);
     void OnAbout(wxCommandEvent& event);
 
-    void OnIncFont(wxCommandEvent& event) { DoResizeFont(+2); }
-    void OnDecFont(wxCommandEvent& event) { DoResizeFont(-2); }
+    void OnIncFont(wxCommandEvent& WXUNUSED(event)) { DoResizeFont(+2); }
+    void OnDecFont(wxCommandEvent& WXUNUSED(event)) { DoResizeFont(-2); }
 
     void OnBold(wxCommandEvent& event);
     void OnItalic(wxCommandEvent& event);
@@ -144,6 +144,7 @@ enum
     Font_wxSMALL_FONT,
     Font_wxITALIC_FONT,
     Font_wxSWISS_FONT,
+    Font_Standard,
 
     Font_Choose = 100,
     Font_EnumFamiliesForEncoding,
@@ -260,7 +261,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     menuStdFonts->Append(Font_wxSMALL_FONT,  wxT("wxSMALL_FONT"),  wxT("Small font used by wxWindows"));
     menuStdFonts->Append(Font_wxITALIC_FONT, wxT("wxITALIC_FONT"), wxT("Italic font used by wxWindows"));
     menuStdFonts->Append(Font_wxSWISS_FONT,  wxT("wxSWISS_FONT"),  wxT("Swiss font used by wxWindows"));
-    menuSelect->Append(-2, wxT("Standar&d fonts"), menuStdFonts);
+    menuSelect->Append(Font_Standard, wxT("Standar&d fonts"), menuStdFonts);
 
     menuSelect->AppendSeparator();
     menuSelect->Append(Font_EnumFamilies, wxT("Enumerate font &families\tCtrl-F"));
@@ -424,6 +425,7 @@ void MyFrame::OnEnumerateFamiliesForEncoding(wxCommandEvent& WXUNUSED(event))
         wxFONTENCODING_ISO8859_7,
         wxFONTENCODING_ISO8859_15,
         wxFONTENCODING_KOI8,
+        wxFONTENCODING_KOI8_U,
         wxFONTENCODING_CP1250,
         wxFONTENCODING_CP1251,
         wxFONTENCODING_CP1252,
@@ -437,6 +439,7 @@ void MyFrame::OnEnumerateFamiliesForEncoding(wxCommandEvent& WXUNUSED(event))
         wxT("Greek (ISO-8859-7)"),
         wxT("Western European with Euro (ISO-8859-15)"),
         wxT("KOI8-R"),
+        wxT("KOI8-U"),
         wxT("Windows Central European (CP 1250)"),
         wxT("Windows Cyrillic (CP 1251)"),
         wxT("Windows Western European (CP 1252)"),
@@ -747,11 +750,9 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
     if ( m_font.Ok() )
     {
-        wxNativeFontInfo *info = m_font.GetNativeFontInfo();
+        const wxNativeFontInfo *info = m_font.GetNativeFontInfo();
         if ( info )
         {
-            delete info;
-
             wxString fontDesc = m_font.GetNativeFontInfoUserDesc();
             fontInfo.Printf(wxT("Native font info: %s"), fontDesc.c_str());
 
@@ -792,7 +793,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
     }
 
     // draw the lines between them
-    dc.SetPen(wxPen(wxColour("blue"), 1, wxSOLID));
+    dc.SetPen(wxPen(wxColour(_T("blue")), 1, wxSOLID));
     int l;
 
     // horizontal