]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/button.cpp
minor changes for windows compilability
[wxWidgets.git] / src / motif / button.cpp
index 8a8ae59c49965a69647dc69d2b681c4f032a60b8..6a402a0229b1bf5ea607d667fc5dd0937fc688b6 100644 (file)
@@ -38,6 +38,8 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     SetName(name);
     SetValidator(validator);
     m_windowStyle = style;
+    m_backgroundColour = parent->GetBackgroundColour();
+    m_foregroundColour = parent->GetForegroundColour();
 
     parent->AddChild((wxButton *)this);
 
@@ -77,7 +79,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
 
     SetFont(* parent->GetFont());
-    ChangeColour(m_mainWidget);
+    ChangeBackgroundColour();
 
     return TRUE;
 }
@@ -132,3 +134,19 @@ void wxButtonCallback (Widget w, XtPointer clientData, XtPointer ptr)
   event.SetEventObject(item);
   item->ProcessCommand (event);
 }
+
+void wxButton::ChangeFont()
+{
+    wxWindow::ChangeFont();
+}
+
+void wxButton::ChangeBackgroundColour()
+{
+    DoChangeBackgroundColour(m_mainWidget, m_backgroundColour, TRUE);
+}
+
+void wxButton::ChangeForegroundColour()
+{
+    wxWindow::ChangeForegroundColour();
+}
+