]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/statbox.cpp
1. Pause()/Resume() implemented for wxMSW
[wxWidgets.git] / src / motif / statbox.cpp
index d973f83979fc7b0e1a93ca156750228624bc56e2..8f16b556efb95c2600584a6ec877d48cb9ded65b 100644 (file)
@@ -53,6 +53,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
     m_labelWidget = (WXWidget) 0;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
+    m_windowFont = parent->GetFont();
 
     SetName(name);
 
@@ -78,10 +79,13 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
 
     if (hasLabel)
     {
+        XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
+
         wxString label1(wxStripMenuCodes(label));
         XmString text = XmStringCreateSimple ((char*) (const char*) label1);
         m_labelWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) label1,
                                             xmLabelWidgetClass, formWidget,
+                                             XmNfontList, fontList,
                                             XmNlabelString, text,
                                             NULL);
         XmStringFree (text);
@@ -110,10 +114,11 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
                     XmNrightAttachment, XmATTACH_FORM,
                     NULL);
 
-    m_mainWidget = (Widget) formWidget;
+    m_mainWidget = (WXWidget) frameWidget;
+    m_formWidget = (WXWidget) formWidget;
 
     SetCanAddEventHandler(TRUE);
-    AttachWidget (parent, m_mainWidget, (WXWidget) frameWidget, pos.x, pos.y, size.x, size.y);
+    AttachWidget (parent, (WXWidget) frameWidget, (WXWidget) formWidget, pos.x, pos.y, size.x, size.y);
     ChangeBackgroundColour();
 
     return TRUE;
@@ -181,18 +186,18 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
     }
 }
 
-void wxStaticBox::ChangeFont()
+void wxStaticBox::ChangeFont(bool keepOriginalSize)
 {
-    // TODO
+    wxWindow::ChangeFont(keepOriginalSize);
 }
 
 void wxStaticBox::ChangeBackgroundColour()
 {
-    // TODO
+    wxWindow::ChangeBackgroundColour();
 }
 
 void wxStaticBox::ChangeForegroundColour()
 {
-    // TODO
+    wxWindow::ChangeForegroundColour();
 }