4 * $XConsortium: Dialog.C /main/4 1996/04/21 19:41:15 drk $
6 * RESTRICTED CONFIDENTIAL INFORMATION:
8 * The information in this document is subject to special
9 * restrictions in a confidential disclosure agreement between
10 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
11 * document outside HP, IBM, Sun, USL, SCO, or Univel without
12 * Sun's specific written approval. This document and all copies
13 * and derivative works thereof must be returned or destroyed at
16 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
22 #include "Application.h"
23 #include "RoamMenuWindow.h"
24 #include <Xm/DialogS.h>
28 // The following header is private to CDE and should NOT be required
29 // but unfortunately is.
32 #include <Dt/HourGlass.h>
36 Dialog::Dialog(char *name, RoamMenuWindow *parent) : UIComponent(name)
41 _w = XtCreatePopupShell(_name,
42 xmDialogShellWidgetClass,
46 XtVaSetValues(_w, XmNdefaultPosition, False, NULL);
48 assert( theApplication != NULL );
51 Dialog::Dialog(RoamMenuWindow *parent) : UIComponent("")
68 XmNdefaultPosition, False, NULL );
72 ( XtCallbackProc ) &Dialog::popupCallback,
77 ( XtCallbackProc ) &Dialog::popdownCallback,
80 _workArea = createWorkArea ( _w );
81 assert ( _workArea != NULL );
82 printHelpId("_workArea", _workArea);
83 /* add help callback */
84 // XtAddCallback(_workArea, XmNhelpCallback, HelpCB, helpId);
86 if ( !XtIsManaged ( _workArea ) )
87 XtManageChild ( _workArea );
96 XtVaSetValues ( _w, XmNtitle, text, NULL );
101 Dialog::popupCallback( Widget ,
102 XtPointer clientData,
103 XmAnyCallbackStruct *
106 Dialog *window=( Dialog * ) clientData;
114 Dialog::popdownCallback( Widget , // w
115 XtPointer clientData,
116 XmAnyCallbackStruct *
119 Dialog *window=( Dialog * ) clientData;
121 window->popped_down();
128 if ( !XtIsManaged ( _workArea ) )
129 XtManageChild ( _workArea );
130 UIComponent::manage();
136 // Do nothing if the widget has not been realized.
138 if (XtIsRealized(_w)) {
139 _DtTurnOnHourGlass(_w);
144 Dialog::normalCursor()
146 // Do nothing if the widget has not been realized
148 if (XtIsRealized(_w)) {
149 _DtTurnOffHourGlass(_w);