]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/statbmp.cpp
Changes to WXDLLEXPORT keyword position for VC++ 6.0; changed
[wxWidgets.git] / src / motif / statbmp.cpp
index 5dc08a3296dff9678b2fbbaa850bc619a028af01..20d46299d5f07b32af50195bc31aa41dda0e8449 100644 (file)
@@ -39,6 +39,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
 {
     m_messageBitmap = bitmap;
     SetName(name);
+    m_backgroundColour = parent->GetBackgroundColour();
+    m_foregroundColour = parent->GetForegroundColour();
     if (parent) parent->AddChild(this);
 
     if ( id == -1 )
@@ -64,12 +66,13 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
                     XmNlabelType, XmPIXMAP,
                     NULL);
 
+    m_windowFont = parent->GetFont();
+    ChangeFont(FALSE);
+
     SetCanAddEventHandler(TRUE);
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
 
-    SetFont(* parent->GetFont());
-
-    ChangeColour (m_mainWidget);
+    ChangeBackgroundColour ();
 
     return TRUE;
 }
@@ -112,8 +115,23 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
         // since it is no longer valid.
         XtVaSetValues (widget,
             XmNlabelType, XmSTRING,
-            XmNlabelPixmap, NULL, // TODO: Does this work?
+            XmNlabelPixmap, XmUNSPECIFIED_PIXMAP,
             NULL);
     }
 }
 
+void wxStaticBitmap::ChangeFont(bool keepOriginalSize)
+{
+    wxWindow::ChangeFont(keepOriginalSize);
+}
+
+void wxStaticBitmap::ChangeBackgroundColour()
+{
+    wxWindow::ChangeBackgroundColour();
+}
+
+void wxStaticBitmap::ChangeForegroundColour()
+{
+    wxWindow::ChangeForegroundColour();
+}
+