Added the managed widget to make it work.

git-svn-id: svn://10.0.0.236/trunk@8973 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
1998-09-01 15:28:40 +00:00
parent 72367ff251
commit 25d3af84a1
2 changed files with 17 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ void nsDialog::Create(nsIWidget *aParent,
if (DBG) fprintf(stderr, "Parent 0x%x\n", parentWidget);
mWidget = ::XtVaCreateManagedWidget("Dialog",
mShell = ::XtVaCreateManagedWidget("Dialog",
xmDialogShellWidgetClass,
parentWidget,
XmNwidth, aRect.width,
@@ -74,6 +74,21 @@ void nsDialog::Create(nsIWidget *aParent,
XmNy, aRect.y,
nsnull);
// Initially used xmDrawingAreaWidgetClass instead of
// newManageClass. Drawing area will spontaneously resize
// to fit it's contents.
mWidget = ::XtVaCreateManagedWidget("drawingArea",
newManageClass,
mShell,
XmNwidth, aRect.width,
XmNheight, aRect.height,
XmNmarginHeight, 0,
XmNmarginWidth, 0,
XmNrecomputeSize, False,
XmNuserData, this,
nsnull);
if (DBG) fprintf(stderr, "Dialog 0x%x this 0x%x\n", mWidget, this);
// save the event callback function

View File

@@ -61,6 +61,7 @@ public:
//virtual void PreCreateWidget(nsWidgetInitData *aInitData);
private:
Widget mShell;
// this should not be public
static PRInt32 GetOuterOffset() {