// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "fontdlgg.h"
#endif
if (ret != wxID_CANCEL)
{
- m_fontData.chosenFont = dialogFont;
+ m_fontData.m_chosenFont = dialogFont;
}
return ret;
familyChoice->SetStringSelection( wxFontFamilyIntToString(dialogFont.GetFamily()) );
styleChoice->SetStringSelection(wxFontStyleIntToString(dialogFont.GetStyle()));
weightChoice->SetStringSelection(wxFontWeightIntToString(dialogFont.GetWeight()));
- wxString name(wxTheColourDatabase->FindName(m_fontData.fontColour));
+ wxString name(wxTheColourDatabase->FindName(m_fontData.GetColour()));
colourChoice->SetStringSelection(name);
underLineCheckBox->SetValue(dialogFont.GetUnderlined());
int fontSize = 12;
int fontUnderline = FALSE;
- if (m_fontData.initialFont.Ok())
+ if (m_fontData.m_initialFont.Ok())
{
- fontFamily = m_fontData.initialFont.GetFamily();
- fontWeight = m_fontData.initialFont.GetWeight();
- fontStyle = m_fontData.initialFont.GetStyle();
- fontSize = m_fontData.initialFont.GetPointSize();
- fontUnderline = m_fontData.initialFont.GetUnderlined();
+ fontFamily = m_fontData.m_initialFont.GetFamily();
+ fontWeight = m_fontData.m_initialFont.GetWeight();
+ fontStyle = m_fontData.m_initialFont.GetStyle();
+ fontSize = m_fontData.m_initialFont.GetPointSize();
+ fontUnderline = m_fontData.m_initialFont.GetUnderlined();
}
dialogFont = wxFont(fontSize, fontFamily, fontStyle, fontWeight, (fontUnderline != 0));
{
if (!m_useEvents) return;
- int fontFamily = 0; /* shut up buggy egcs warnings */
- fontFamily = wxFontFamilyStringToInt(WXSTRINGCAST familyChoice->GetStringSelection());
- int fontWeight = 0;
- fontWeight = wxFontWeightStringToInt(WXSTRINGCAST weightChoice->GetStringSelection());
- int fontStyle = 0;
- fontStyle = wxFontStyleStringToInt(WXSTRINGCAST styleChoice->GetStringSelection());
+ int fontFamily = wxFontFamilyStringToInt(WXSTRINGCAST familyChoice->GetStringSelection());
+ int fontWeight = wxFontWeightStringToInt(WXSTRINGCAST weightChoice->GetStringSelection());
+ int fontStyle = wxFontStyleStringToInt(WXSTRINGCAST styleChoice->GetStringSelection());
int fontSize = wxAtoi(pointSizeChoice->GetStringSelection());
int fontUnderline = underLineCheckBox->GetValue();
m_previewer->SetFont(dialogFont);
if (colourChoice->GetStringSelection() != wxT(""))
{
- wxColour *col = (wxColour*) NULL;
- col = wxTheColourDatabase->FindColour(colourChoice->GetStringSelection());
- if (col)
+ wxColour col = wxTheColourDatabase->Find(colourChoice->GetStringSelection());
+ if (col.Ok())
{
- m_fontData.fontColour = *col;
- m_previewer->SetForegroundColour(*col);
+ m_fontData.m_fontColour = col;
+ m_previewer->SetForegroundColour(col);
}
}
m_previewer->Refresh();