+ // Can't remember what this was about... but I think it's necessary.
+ if (wxUSE_INVISIBLE_RESIZE)
+ {
+ if (pos.x > -1)
+ XtVaSetValues(dialogShell, XmNx, pos.x,
+ NULL);
+ if (pos.y > -1)
+ XtVaSetValues(dialogShell, XmNy, pos.y,
+ NULL);
+
+ if (size.x > -1)
+ XtVaSetValues(dialogShell, XmNwidth, size.x, NULL);
+ if (size.y > -1)
+ XtVaSetValues(dialogShell, XmNheight, size.y, NULL);
+ }
+
+ // Positioning of the dialog doesn't work properly unless the dialog
+ // is managed, so we manage without mapping to the screen.
+ // To show, we map the shell (actually it's parent).
+ if (!wxUSE_INVISIBLE_RESIZE)
+ XtVaSetValues(shell, XmNmappedWhenManaged, FALSE, NULL);
+
+ 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;