+ if (!wxUSE_INVISIBLE_RESIZE)
+ {
+ XtManageChild(dialogShell);
+ SetSize(pos.x, pos.y, size.x, size.y);
+ }
+ XtAddEventHandler(dialogShell,ExposureMask,FALSE,
+ wxUniversalRepaintProc, (XtPointer) this);
+
+ ChangeBackgroundColour();
+
+ return TRUE;
+}
+
+bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxString& name )
+{
+ Widget parentWidget = (Widget) 0;
+ if( parent )
+ parentWidget = (Widget) parent->GetTopWidget();
+ if( !parent )
+ parentWidget = (Widget) wxTheApp->GetTopLevelWidget();
+
+ wxASSERT_MSG( (parentWidget != (Widget) 0),
+ "Could not find a suitable parent shell for dialog." );
+
+ Arg args[2];
+ XtSetArg (args[0], XmNdefaultPosition, False);
+ XtSetArg (args[1], XmNautoUnmanage, False);
+ Widget dialogShell =
+ XmCreateBulletinBoardDialog( parentWidget,
+ wxConstCast(name.c_str(), char),
+ args, 2);
+ m_mainWidget = (WXWidget) dialogShell;
+
+ // We don't want margins, since there is enough elsewhere.
+ XtVaSetValues( dialogShell,
+ XmNmarginHeight, 0,
+ XmNmarginWidth, 0,
+ XmNresizePolicy, XmRESIZE_NONE,
+ NULL ) ;
+
+ XtTranslations ptr ;
+ XtOverrideTranslations(dialogShell,
+ ptr = XtParseTranslationTable("<Configure>: resize()"));
+ XtFree((char *)ptr);
+
+ XtRealizeWidget(dialogShell);
+
+ wxAddWindowToTable( (Widget)m_mainWidget, this );
+
+ return TRUE;