File: wlma_ui.prj

package info (click to toggle)
ctn 3.2.0~dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 15,420 kB
  • sloc: ansic: 179,553; makefile: 7,002; java: 1,863; csh: 1,067; yacc: 523; sh: 424; cpp: 394; sql: 389; lex: 170
file content (373 lines) | stat: -rw-r--r-- 11,526 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
! UIMX ascii 2.5 key: 7622                                                      

*wlma_ui.class: Project
*wlma_ui.PjName: wlma_ui
*wlma_ui.PjDoMain: 1
*wlma_ui.PjDoMake: 0
*wlma_ui.PjWriteAll: 1
*wlma_ui.PjRunMake: 0
*wlma_ui.PjWriteCDir: .
*wlma_ui.PjMode: 1

*topLevelShell1_PJinterface.class: PJinterface
*topLevelShell1_PJinterface.PjName: topLevelShell1_PJinterface
*topLevelShell1_PJinterface.PjSwName: topLevelShell1
*topLevelShell1_PJinterface.PjParent: wlma_ui
*topLevelShell1_PJinterface.PjFileName: topLevelShell1.i
*topLevelShell1_PJinterface.PjShowFlag: 0
*topLevelShell1_PJinterface.PjGuiDate: 819611277
*topLevelShell1_PJinterface.PjDate: 819611068
*topLevelShell1_PJinterface.PjMode: 1
*topLevelShell1_PJinterface.PjCFileName: topLevelShell1.c

*databaseForm_PJinterface.class: PJinterface
*databaseForm_PJinterface.PjName: databaseForm_PJinterface
*databaseForm_PJinterface.PjSwName: databaseForm
*databaseForm_PJinterface.PjParent: wlma_ui
*databaseForm_PJinterface.PjFileName: databaseForm.i
*databaseForm_PJinterface.PjShowFlag: 0
*databaseForm_PJinterface.PjGuiDate: 819611370
*databaseForm_PJinterface.PjDate: 819611099
*databaseForm_PJinterface.PjMode: 1
*databaseForm_PJinterface.PjCFileName: databaseForm.c

*demonstrationForm_PJinterface.class: PJinterface
*demonstrationForm_PJinterface.PjName: demonstrationForm_PJinterface
*demonstrationForm_PJinterface.PjSwName: demonstrationForm
*demonstrationForm_PJinterface.PjParent: wlma_ui
*demonstrationForm_PJinterface.PjFileName: demonstrationForm.i
*demonstrationForm_PJinterface.PjShowFlag: 0
*demonstrationForm_PJinterface.PjGuiDate: 819611521
*demonstrationForm_PJinterface.PjDate: 819611123
*demonstrationForm_PJinterface.PjMode: 1
*demonstrationForm_PJinterface.PjCFileName: demonstrationForm.c

*uxmain.class: PJuxmain
*uxmain.PjName: uxmain
*uxmain.PjParent: wlma_ui
*uxmain.PjFileName: wlma_ui.c
*uxmain.PjDate: 0
*uxmain.PjMode: -1

*xtmain.class: PJxtmain
*xtmain.PjName: xtmain
*xtmain.PjParent: wlma_ui
*xtmain.PjFileName: wlma_ui.c
*xtmain.PjDate: 819611151
*xtmain.PjMode: 1
*xtmain.PjBody: /*\
          Copyright (C) 1993, 1994, RSNA and Washington University\
 \
          The software and supporting documentation for the Radiological\
          Society of North America (RSNA) 1993, 1994 Digital Imaging and\
          Communications in Medicine (DICOM) Demonstration were developed\
          at the\
                  Electronic Radiology Laboratory\
                  Mallinckrodt Institute of Radiology\
                  Washington University School of Medicine\
                  510 S. Kingshighway Blvd.\
                  St. Louis, MO 63110\
          as part of the 1993, 1994 DICOM Central Test Node project for, and\
          under contract with, the Radiological Society of North America.\
 \
          THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR\
          WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS\
          PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR\
          USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY\
          SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF\
          THE SOFTWARE IS WITH THE USER.\
 \
          Copyright of the software and supporting documentation is\
          jointly owned by RSNA and Washington University, and free access\
          is hereby granted as a license to use this software, copy this\
          software and prepare derivative works based upon this software.\
          However, any distribution of this software source code or\
          supporting documentation or derivative works (source code and\
          supporting documentation) must include the three paragraphs of\
          the copyright notice.\
*/\
/* Copyright marker.  Copyright will be inserted above.  Do not remove */\
\
/*\
**                   Electronic Radiology Laboratory\
**                 Mallinckrodt Institute of Radiology\
**              Washington University School of Medicine\
**\
** Module Name(s):	main\
** Author, Date:	Steve Moore\
** Intent:		This file contains the "main" function for the\
**			wlma_ui application.  This application allows a\
**			user to view an existing database of (scheduled)\
**			exams (the worklist) and to send DICOM study\
**			scheduled events to applications that are assumed\
**			to be DICOM instruments.\
** Last Update:         $Author: smm $, $Date: 1995-12-22 17:28:10 $\
** Source File:         $RCSfile: wlma_ui.prj,v $\
** Revision:            $Revision: 1.15 $\
** Status:              $State: Exp $\
*/\
 \
static char rcsid[] = "$Revision: 1.15 $ $RCSfile: wlma_ui.prj,v $";\
\
/*-----------------------------------------------------------\
 * This is the project main program file for Xt generated \
 * code. You may add application dependent source code \
 * at the appropriate places. \
 * 			     \
 * Do not modify the statements preceded by the dollar\
 * sign ($), these statements will be replaced with\
 * the appropriate source code when the main program is  \
 * generated.  \
 *\
 * $Date: 1995-12-22 17:28:10 $  		$Revision: 1.15 $ \
 *-----------------------------------------------------------*/ \
\
#include <X11/Intrinsic.h>\
#include <X11/StringDefs.h>\
#include <X11/Xlib.h>\
\
#include <Xm/Xm.h>\
\
#include <stdio.h>\
\
#include "dicom.h"\
#include "condition.h"\
#include "lst.h"\
#include "dicom_objects.h"\
#include "tbl.h"\
#include "manage.h"\
#include "fis.h"\
#include "wlma.h"\
\
/*---------------------------------------------------- \
 * UxXt.h needs to be included only when compiling a \
 * stand-alone application. \
 *---------------------------------------------------*/\
#ifndef DESIGN_TIME\
#include "UxXt.h"\
#endif /* DESIGN_TIME */\
\
XtAppContext	UxAppContext;\
Widget		UxTopLevel;\
Display		*UxDisplay;\
int		UxScreen;\
FIS_HANDLE	*fisHandle;\
DMAN_HANDLE	*dmanHandle;\
char		applicationTitle[20] = "WLMA_MIR";\
static void		usageerror();\
\
/*----------------------------------------------\
 * Insert application global declarations here\
 *---------------------------------------------*/\
\
\
#ifdef _NO_PROTO\
main(argc,argv)\
        int     argc;\
        char    *argv[];\
#else\
main( int argc, char *argv[])\
#endif /* _NO_PROTO */\
{\
\
  char *databaseName = "CTNControl";\
  CONDITION cond = 1;\
  CTNBOOLEAN\
    verboseTBL = FALSE,\
    verboseFIS = FALSE;\
\
	/*-----------------------------------------------------------\
	 * Declarations.\
         * The default identifier - mainIface will only be declared \
	 * if the interface function is global and of type swidget.\
	 * To change the identifier to a different name, modify the\
	 * string mainIface in the file "xtmain.dat". If "mainIface"\
         * is declared, it will be used below where the return value\
	 * of  PJ_INTERFACE_FUNCTION_CALL will be assigned to it.\
         *----------------------------------------------------------*/ \
\
  	$PJ_INTERFACE_RETVAL_TYPE\
\
	/*---------------------------------\
	 * Interface function declaration\
	 *--------------------------------*/	\
\
 	$PJ_INTERFACE_FUNCTION_DECL\
	$PJ_INTERFACE_FUNCTION_ARG_DECL\
\
	/*---------------------\
	 * Initialize program\
	 *--------------------*/\
\
#ifdef XOPEN_CATALOG\
	if (XSupportsLocale()) {\
		XtSetLanguageProc(NULL,(XtLanguageProc)NULL,NULL);\
	}\
#endif\
\
	SgePreInitialize(&argc, argv);\
  	UxTopLevel = XtAppInitialize(&UxAppContext, "$PJ_APP_CLASS_NAME",\
				     NULL, 0, &argc, argv, NULL, NULL, 0);\
\
	UxDisplay = XtDisplay(UxTopLevel);\
	UxScreen = XDefaultScreen(UxDisplay);\
\
	/* We set the geometry of UxTopLevel so that dialogShells\
	   that are parented on it will get centered on the screen\
	   (if defaultPosition is true). */\
\
	XtVaSetValues(UxTopLevel,\
			XtNx, 0,\
			XtNy, 0,\
			XtNwidth, DisplayWidth(UxDisplay, UxScreen),\
			XtNheight, DisplayHeight(UxDisplay, UxScreen),\
			NULL);\
\
	/*-------------------------------------------------------\
	 * Insert initialization code for your application here \
	 *------------------------------------------------------*/\
	while (--argc > 0 && *(++argv)[0] == '-') {\
	    switch((*argv)[1]) {\
		case 'a':\
			if (--argc < 1)\
				usageerror();\
			argv++;\
			strncpy(applicationTitle, *argv, sizeof(applicationTitle)-1);\
			applicationTitle[sizeof(applicationTitle)-1] = '\0';\
			break;\
		case 'f':\
			if (--argc < 1)\
				usageerror();\
			argv++;\
			databaseName = *argv;\
			break;\
		case 'h':\
			usageerror();\
			break;\
		case 'v':\
			verboseTBL = TRUE;\
			verboseFIS = TRUE;\
			break;\
		case 'x':\
			if (--argc < 1)\
				usageerror();\
			argv++;\
			if (strcmp(*argv, "TBL") == 0)\
				verboseTBL = TRUE;\
			else if (strcmp(*argv, "FIS") == 0)\
				verboseFIS = TRUE;\
			break;\
		default:\
			printf("Unrecognized option: %s\n", *argv);\
			break;\
	    }\
	}\
	(void) TBL_Debug(verboseTBL);\
	FIS_Debug(verboseFIS);\
#ifdef RUNTIME\
	cond = openTables(databaseName, applicationTitle, &dmanHandle,\
		&fisHandle);\
#endif\
	if (cond != 1) {\
	    COND_DumpConditions();\
	    exit(1);\
	}\
/*\
	cond = FIS_Open(databaseName, &fisHandle);\
	if (cond != FIS_NORMAL) {\
	    COND_DumpConditions();\
	    exit(1);\
	}\
	cond = DMAN_Open(databaseName, "", "", &dmanHandle);\
	if (cond != DMAN_NORMAL) {\
	    COND_DumpConditions();\
	    exit(1);\
	}\
*/\
\
	/*----------------------------------------------------------------\
	 * Create and popup the first window of the interface.  The 	 \
	 * return value can be used in the popdown or destroy functions.\
         * The Widget return value of  PJ_INTERFACE_FUNCTION_CALL will \
         * be assigned to "mainIface" from  PJ_INTERFACE_RETVAL_TYPE. \
	 *---------------------------------------------------------------*/\
\
	$PJ_INTERFACE_FUNCTION_CALL\
	$PJ_POPUP_CALL\
\
	/*-----------------------\
	 * Enter the event loop \
	 *----------------------*/\
\
  	$PJ_EVENT_LOOP\
	return 0;\
}\
\
static void usageerror()\
{\
  char msg[] = "\\
Usage: [-a application] [-f databaseName] [-v] [-x <facility>] \n\\
\n\\
    -a  Use application as application title instead of default (WLMA_MIR)\n\\
    -f  Use a new database rather than the default (CTNControl)\n\\
    -h  See help page\n\\
    -v  Place all facilities in verbose mode\n\\
    -x  Place <facility> in verbose mode (DCM, DUL, FIS, SRV, TBL)\n";\
\
    fprintf(stderr, "%s", msg);\
    exit(1);\
}\

*xtmain.PjExplicitEventLoop: {\
\
	XEvent event;\
\
	for (;;)\
	{\
	    XtAppNextEvent(UxAppContext, &event);\
\
	    switch (event.type)\
	    {\
\
	       /*---------------------------------------------------\
	 	* Insert code here to handle any events that you do\
		* not wish to be handled by the interface.\
		*---------------------------------------------------*/\
\
		default:\
	    	    XtDispatchEvent(&event);\
	    	    break;\
	    }\
	}\
}
*xtmain.PjEdited: 1
*xtmain.PjHasImplicitLoop: 1
*xtmain.PjHasExplicitLoop: 0

*uilmain.class: PJuilmain
*uilmain.PjName: uilmain
*uilmain.PjParent: wlma_ui
*uilmain.PjFileName: wlma_ui.c
*uilmain.PjDate: 0
*uilmain.PjMode: -1

*uxmake.class: PJuxmake
*uxmake.PjName: uxmake
*uxmake.PjParent: wlma_ui
*uxmake.PjFileName: wlma_ui.mk
*uxmake.PjDate: 0
*uxmake.PjMode: -1

*xtmake.class: PJxtmake
*xtmake.PjName: xtmake
*xtmake.PjParent: wlma_ui
*xtmake.PjFileName: wlma_ui.mk
*xtmake.PjDate: 0
*xtmake.PjMode: -1

*uilmake.class: PJuilmake
*uilmake.PjName: uilmake
*uilmake.PjParent: wlma_ui
*uilmake.PjFileName: wlma_ui.mk
*uilmake.PjDate: 0
*uilmake.PjMode: -1