wxSystemSettings settings;
m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_BTNFACE);
- m_foregroundColour = *wxBLACK; // TODO take this from sys settings too?
-#ifndef __WXMAC__
+ // m_foregroundColour = *wxBLACK; // TODO take this from sys settings too?
+ m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
+
+#if !defined(__WXMAC__) && !defined(__WXGTK__)
m_font = *wxSWISS_FONT; // and this?
#else
m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
const wxPoint& WXUNUSED(pos),
const wxSize& WXUNUSED(size),
long style,
-#if wxUSE_VALIDATORS
-# if defined(__VISAGECPP__)
- const wxValidator* validator,
-# else
const wxValidator& validator,
-# endif
-#endif
const wxString& name)
{
// m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other
SetName(name);
SetWindowStyleFlag(style);
SetParent(parent);
+
+#if wxUSE_VALIDATORS
SetValidator(validator);
+#endif // wxUSE_VALIDATORS
return TRUE;
}
// validators
// ----------------------------------------------------------------------------
-# if defined(__VISAGECPP__)
-void wxWindowBase::SetValidator(const wxValidator* validator)
-{
- if ( m_windowValidator )
- delete m_windowValidator;
-
- m_windowValidator = (wxValidator *)validator->Clone();
-
- if ( m_windowValidator )
- m_windowValidator->SetWindow(this) ;
-}
-# else
void wxWindowBase::SetValidator(const wxValidator& validator)
{
if ( m_windowValidator )
if ( m_windowValidator )
m_windowValidator->SetWindow(this) ;
}
-# endif // __VISAGECPP__
#endif // wxUSE_VALIDATORS
// ----------------------------------------------------------------------------
}
#endif // wxUSE_CHECKBOX
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
wxRadioButton *radiobtn = wxDynamicCast(this, wxRadioButton);
if ( radiobtn )
{
if ( event.GetSetChecked() )
radiobtn->SetValue(event.GetChecked());
}
-#endif // wxUSE_RADIOBUTTON
+#endif // wxUSE_RADIOBTN
}
}