]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
1. added wxEnhMetaFileXXX classes
[wxWidgets.git] / src / common / wincmn.cpp
index 782d3bf7d17e2f035834e947e04c37ea4ae0d6d1..d545072003f5bf9c87ebffc0eb103e48e5a1adf2 100644 (file)
@@ -118,8 +118,10 @@ void wxWindowBase::InitBase()
     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);
@@ -158,13 +160,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
                               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
@@ -178,7 +174,10 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
     SetName(name);
     SetWindowStyleFlag(style);
     SetParent(parent);
+
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
     return TRUE;
 }
@@ -619,18 +618,6 @@ void wxWindowBase::SetCaret(wxCaret *caret)
 // 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 )
@@ -641,7 +628,6 @@ void wxWindowBase::SetValidator(const wxValidator& validator)
     if ( m_windowValidator )
         m_windowValidator->SetWindow(this) ;
 }
-#  endif // __VISAGECPP__
 #endif // wxUSE_VALIDATORS
 
 // ----------------------------------------------------------------------------
@@ -1233,14 +1219,14 @@ void wxWindowBase::UpdateWindowUI()
         }
 #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
     }
 }