]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/font/font.cpp
Disable the rest of Editable() test for wxBitmapComboBox.
[wxWidgets.git] / samples / font / font.cpp
index 4c78adc24d281d8d2010646baf6e653d547bb4dd..8ffde87c072a7a0ca24995fd37c10ad4704f0c8b 100644 (file)
@@ -518,9 +518,7 @@ bool MyFrame::DoEnumerateFamilies(bool fixedWidthOnly,
 
         if ( !facename.empty() )
         {
-            wxFont font(wxNORMAL_FONT->GetPointSize(),
-                        wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
-                        wxFONTWEIGHT_NORMAL, false, facename, encoding);
+            wxFont font(wxFontInfo().FaceName(facename).Encoding(encoding));
 
             DoChangeFont(font);
         }
@@ -978,10 +976,7 @@ void MyFrame::OnViewMsg(wxCommandEvent& WXUNUSED(event))
     // and now create the correct font
     if ( !DoEnumerateFamilies(false, fontenc, true /* silent */) )
     {
-        wxFont font(wxNORMAL_FONT->GetPointSize(),
-                    wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
-                    wxFONTWEIGHT_NORMAL, false /* !underlined */,
-                    wxEmptyString /* facename */, fontenc);
+        wxFont font(wxFontInfo(wxNORMAL_FONT->GetPointSize()).Encoding(fontenc));
         if ( font.IsOk() )
         {
             DoChangeFont(font);
@@ -1023,7 +1018,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
     PrepareDC(dc);
 
     // set background
-    dc.SetBackground(wxBrush(wxT("white"), wxSOLID));
+    dc.SetBackground(*wxWHITE_BRUSH);
     dc.Clear();
     dc.SetFont(m_font);
 
@@ -1105,7 +1100,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
     }
 
     // draw the lines between them
-    dc.SetPen(wxPen(wxColour(wxT("blue")), 1, wxSOLID));
+    dc.SetPen(*wxBLUE_PEN);
     int l;
 
     // horizontal