+ Widget parentWidget = (Widget) parent->GetClientWidget();
+
+ m_mainWidget = XtVaCreateManagedWidget ("staticboxframe",
+ xmFrameWidgetClass, parentWidget,
+ XmNshadowType, XmSHADOW_IN,
+ //XmNmarginHeight, 0,
+ //XmNmarginWidth, 0,
+ NULL);
+
+ bool hasLabel = (!label.IsNull() && !label.IsEmpty()) ;
+ if (hasLabel)
+ {
+ XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
+ wxString label1(wxStripMenuCodes(label));
+ wxXmString text(label1);
+ m_labelWidget = (WXWidget) XtVaCreateManagedWidget (label1.c_str(),
+ xmLabelWidgetClass, (Widget)m_mainWidget,
+ XmNfontList, fontList,
+ XmNlabelString, text(),
+#if (XmVersion > 1200)
+ XmNframeChildType, XmFRAME_TITLE_CHILD,
+#else
+ XmNchildType, XmFRAME_TITLE_CHILD,
+#endif
+ NULL);
+ }
+
+ SetCanAddEventHandler(TRUE);
+ AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
+ ChangeBackgroundColour();
+
+ return TRUE;
+}
+
+wxStaticBox::~wxStaticBox()
+{
+ DetachWidget(m_mainWidget);
+ XtDestroyWidget((Widget) m_mainWidget);
+
+ m_mainWidget = (WXWidget) 0;
+ m_labelWidget = (WXWidget) 0;