- familyChoice = (wxChoice*) FindWindow(wxID_FONT_FAMILY);
- styleChoice = (wxChoice*) FindWindow(wxID_FONT_STYLE);
- weightChoice = (wxChoice*) FindWindow(wxID_FONT_WEIGHT);
- colourChoice = (wxChoice*) FindWindow(wxID_FONT_COLOUR);
- pointSizeChoice = (wxChoice*) FindWindow(wxID_FONT_SIZE);
- underLineCheckBox = (wxCheckBox*) FindWindow(wxID_FONT_UNDERLINE);
-
- familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) );
- styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle()));
- weightChoice->SetStringSelection(wxFontWeightIntToString(dialogFont.GetWeight()));
- wxString name(wxTheColourDatabase->FindName(m_fontData.GetColour()));
- if (name.length())
- colourChoice->SetStringSelection(name);
- else
- colourChoice->SetStringSelection(wxT("BLACK"));
-
- underLineCheckBox->SetValue(dialogFont.GetUnderlined());
- pointSizeChoice->SetSelection(dialogFont.GetPointSize()-1);
+ m_familyChoice = (wxChoice*) FindWindow(wxID_FONT_FAMILY);
+ m_styleChoice = (wxChoice*) FindWindow(wxID_FONT_STYLE);
+ m_weightChoice = (wxChoice*) FindWindow(wxID_FONT_WEIGHT);
+ m_colourChoice = (wxChoice*) FindWindow(wxID_FONT_COLOUR);
+ m_underLineCheckBox = (wxCheckBox*) FindWindow(wxID_FONT_UNDERLINE);
+
+ m_familyChoice->SetStringSelection( wxFontFamilyIntToString(m_dialogFont.GetFamily()) );
+ m_styleChoice->SetStringSelection(wxFontStyleIntToString(m_dialogFont.GetStyle()));
+ m_weightChoice->SetStringSelection(wxFontWeightIntToString(m_dialogFont.GetWeight()));
+
+ if (m_colourChoice)
+ {
+ wxString name(wxTheColourDatabase->FindName(m_fontData.GetColour()));
+ if (name.length())
+ m_colourChoice->SetStringSelection(name);
+ else
+ m_colourChoice->SetStringSelection(wxT("BLACK"));
+ }
+
+ if (m_underLineCheckBox)
+ {
+ m_underLineCheckBox->SetValue(m_dialogFont.GetUnderlined());
+ }
+
+#if USE_SPINCTRL_FOR_POINT_SIZE
+ spinCtrl->SetValue(m_dialogFont.GetPointSize());
+#else
+ m_pointSizeChoice = (wxChoice*) FindWindow(wxID_FONT_SIZE);
+ m_pointSizeChoice->SetSelection(m_dialogFont.GetPointSize()-1);
+#endif