2    Copyright (C) 1996 Scott W. Sadler
 
  10       03-Mar-96 1.0; Scott W. Sadler (ssadler@cisco.com)
 
  18 #include "XsMDIWindow.h"
 
  22 XsMDIWindow::XsMDIWindow (const char *name) : XsComponent (name)
 
  30 // Initial size and placement
 
  32    _initX = (Position)-1;
 
  33    _initY = (Position)-1;
 
  34    _initH = (Dimension)-1;
 
  35    _initW = (Dimension)-1;
 
  41 XsMDIWindow::~XsMDIWindow ( )
 
  48 void XsMDIWindow::raise ( )
 
  51    XRaiseWindow (XtDisplay (_base), XtWindow (_base));
 
  56 void XsMDIWindow::lower ( )
 
  59    XLowerWindow (XtDisplay (_base), XtWindow (_base));
 
  64 void XsMDIWindow::show ( )
 
  67 // Create the window (if necessary)
 
  71       assert (_parent != 0);
 
  72       _createWindow (_parent);
 
  75 // Manage the client area
 
  77    XtManageChild (_clientArea);
 
  79 // Configure the window position and size
 
  87       if (_initX != (Position)-1)
 
  89          XtSetArg (args[n], XmNx, _initX);   n++;
 
  91       if (_initY != (Position)-1)
 
  93          XtSetArg (args[n], XmNy, _initY);   n++;
 
  95       if (_initW != (Dimension)-1)
 
  97          XtSetArg (args[n], XmNwidth, _initW);  n++;
 
  99       if (_initH != (Dimension)-1)
 
 101          XtSetArg (args[n], XmNheight, _initH); n++;
 
 105       XtSetValues (_base, args, n);
 
 110 // Call the base class
 
 112    XsComponent::show ( );
 
 117 void XsMDIWindow::setPosition (Position x, Position y)
 
 120       XtVaSetValues (_base, XmNx, x, XmNy, y, NULL);
 
 130 void XsMDIWindow::setSize (Dimension w, Dimension h)
 
 133       XtVaSetValues (_base, XmNwidth, w, XmNheight, h, NULL);
 
 143 const char* XsMDIWindow::className ( ) const
 
 145    return ("XsMDIWindow");
 
 150 void XsMDIWindow::_setWindowParent (Widget p)
 
 153 // This is called by the canvas to tell us who our parent is