From 5aaa962f3eb741cf7adfd43b05871a7e9092367a Mon Sep 17 00:00:00 2001 From: "kmcclusk%netscape.com" Date: Thu, 16 Jul 1998 21:43:15 +0000 Subject: [PATCH] Removed commented out CreateWindow code --- widget/src/motif/nsWindow.cpp | 129 ---------------------------------- 1 file changed, 129 deletions(-) diff --git a/widget/src/motif/nsWindow.cpp b/widget/src/motif/nsWindow.cpp index 38f059e2139..a1ecebe6691 100644 --- a/widget/src/motif/nsWindow.cpp +++ b/widget/src/motif/nsWindow.cpp @@ -450,135 +450,6 @@ void nsWindow::CreateWindow(nsNativeWidget aNativeParent, } -#if 0 -//------------------------------------------------------------------------- -// -// Create a window. -// -// Note: aNativeParent is always non-null if aWidgetParent is non-null. -// aNativeaParent is set regardless if the parent for the Create() was an -// nsIWidget or a Native widget. -// aNativeParent is equal to aWidgetParent->GetNativeData(NS_NATIVE_WIDGET) -//------------------------------------------------------------------------- - -void nsWindow::CreateWindow(nsNativeWidget aNativeParent, - nsIWidget *aWidgetParent, - const nsRect &aRect, - EVENT_CALLBACK aHandleEventFunction, - nsIDeviceContext *aContext, - nsIToolkit *aToolkit, - nsWidgetInitData *aInitData) -{ - Widget mainWindow = 0, frame = 0; - Widget parentWidget = 0; - mBounds = aRect; - - InitToolkit(aToolkit, aWidgetParent); - - // save the event callback function - mEventCallback = aHandleEventFunction; - - if (0==aNativeParent) { - parentWidget = (Widget) aInitData ; - } - else - parentWidget = (Widget)aNativeParent; - - InitDeviceContext(aContext, parentWidget); - - Widget frameParent = 0; - if (!aNativeParent) { - - if (gFirstTopLevelWindow == 0) { - mainWindow = ::XtVaCreateManagedWidget("mainWindow", - xmMainWindowWidgetClass, - parentWidget, - nsnull); - gFirstTopLevelWindow = mainWindow; - } - else { - Widget shell = ::XtVaCreatePopupShell(" ", - xmDialogShellWidgetClass, - parentWidget, 0); - XtVaSetValues(shell, - XmNwidth, aRect.width, XmNheight, aRect.height, nsnull); - mainWindow = ::XtVaCreateManagedWidget("mainWindow", - xmMainWindowWidgetClass, - shell, - nsnull); - XtVaSetValues(mainWindow, XmNwidth, aRect.width, XmNheight, aRect.height, nsnull); - - } - - frameParent = mainWindow; - - } - else - frameParent = (Widget)aNativeParent; - - frame = ::XtVaCreateManagedWidget("frame", - xmDrawingAreaWidgetClass, - frameParent, - XmNwidth, aRect.width, - XmNheight, aRect.height, - XmNmarginHeight, 0, - XmNmarginWidth, 0, - nsnull); - - - mWidget = frame ; - - if (mainWindow) { - XmMainWindowSetAreas (mainWindow, nsnull, nsnull, nsnull, nsnull, frame); - } - - if (aWidgetParent) { - aWidgetParent->AddChild(this); - } - - // Force cursor to default setting - mCursor = eCursor_select; - SetCursor(eCursor_standard); - - InitCallbacks(); - - XtAddCallback(mWidget, - XmNresizeCallback, - nsXtWidget_Resize_Callback, - this); - - - /*XtAddCallback(mWidget, - XmNexposeCallback, - nsXtWidget_Expose_Callback, - this);*/ - - - // Create a Writeable GC for this Widget. Unfortunatley, - // the Window for the Widget is not created properly at this point and - // we Need the GC prior to the Rendering Context getting created, so - // we create a small dummy window of the default depth as our dummy Drawable - // to create a compatible GC - - if (nsnull == mGC) { - - XGCValues values; - Window w; - Display * d = XtDisplay(mWidget); - - w = ::XCreateSimpleWindow(d, - RootWindow(d,DefaultScreen(d)), - 0,0,1,1,0, - BlackPixel(d,DefaultScreen(d)), - WhitePixel(d,DefaultScreen(d))); - mGC = ::XCreateGC(d, w, nsnull, &values); - - ::XDestroyWindow(d,w); - } - -} -#endif - //------------------------------------------------------------------------- //