/[debian-med]/trunk/packages/ctn/ctn/apps/cfg_ctn_tables/imageStorageAccessForm.i
ViewVC logotype

Contents of /trunk/packages/ctn/ctn/apps/cfg_ctn_tables/imageStorageAccessForm.i

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Sun Feb 26 12:28:36 2006 UTC (7 years, 2 months ago) by kink-guest
File size: 15941 byte(s)
add current package v3.06-7
1 ! UIMX ascii 2.5 key: 5270
2
3 *imageStorageAccessForm.class: form
4 *imageStorageAccessForm.gbldecl: /*\
5 Copyright (C) 1993, 1994, RSNA and Washington University\
6 \
7 The software and supporting documentation for the Radiological\
8 Society of North America (RSNA) 1993, 1994 Digital Imaging and\
9 Communications in Medicine (DICOM) Demonstration were developed\
10 at the\
11 Electronic Radiology Laboratory\
12 Mallinckrodt Institute of Radiology\
13 Washington University School of Medicine\
14 510 S. Kingshighway Blvd.\
15 St. Louis, MO 63110\
16 as part of the 1993, 1994 DICOM Central Test Node project for, and\
17 under contract with, the Radiological Society of North America.\
18 \
19 THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR\
20 WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS\
21 PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR\
22 USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY\
23 SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF\
24 THE SOFTWARE IS WITH THE USER.\
25 \
26 Copyright of the software and supporting documentation is\
27 jointly owned by RSNA and Washington University, and free access\
28 is hereby granted as a license to use this software, copy this\
29 software and prepare derivative works based upon this software.\
30 However, any distribution of this software source code or\
31 supporting documentation or derivative works (source code and\
32 supporting documentation) must include the three paragraphs of\
33 the copyright notice.\
34 */\
35 /* Copyright marker. Copyright will be inserted above. Do not remove */\
36 \
37 /*\
38 ** Electronic Radiology Laboratory\
39 ** Mallinckrodt Institute of Radiology\
40 ** Washington University School of Medicine\
41 **\
42 ** Module Name(s): create_imageStorageAccessForm\
43 ** loadImageStorageAccessList\
44 ** Author, Date: Steve Moore, Summer 1994\
45 ** Intent: This file provides the user interface\
46 ** for defining and modifying entries in\
47 ** the Image Storage Access table. This table\
48 ** is used to define which (external) applications\
49 ** have access rights to storage areas manged\
50 ** by the image server or other applications.\
51 ** The public entry points are\
52 ** call to create the widget hierarchy\
53 ** and to populate the list application\
54 ** entities. All other functions are\
55 ** local to this specific interface.\
56 ** Last Update: $Author: smm $, $Date: 1995/04/10 13:19:51 $\
57 ** Source File: $RCSfile: imageStorageAccessForm.i,v $\
58 ** Revision: $Revision: 1.4 $\
59 ** Status: $State: Exp $\
60 */\
61 \
62 #include <stdio.h>\
63 \
64 #include "dicom.h"\
65 #include "condition.h"\
66 #include "lst.h"\
67 #include "tbl.h"\
68 #include "manage.h"\
69 #include "mut.h"\
70 \
71 #include "format.h"\
72 \
73 static LST_HEAD *storageAccessList = NULL;\
74 extern DMAN_HANDLE *dmanHandle;\
75 void loadImageStorageAccessList();
76 *imageStorageAccessForm.ispecdecl:
77 *imageStorageAccessForm.funcdecl: swidget create_imageStorageAccessForm(swidget UxParent)
78 *imageStorageAccessForm.funcname: create_imageStorageAccessForm
79 *imageStorageAccessForm.funcdef: "swidget", "<create_imageStorageAccessForm>(%)"
80 *imageStorageAccessForm.argdecl: swidget UxParent;
81 *imageStorageAccessForm.arglist: UxParent
82 *imageStorageAccessForm.arglist.UxParent: "swidget", "%UxParent%"
83 *imageStorageAccessForm.icode:
84 *imageStorageAccessForm.fcode: return(rtrn);\
85
86 *imageStorageAccessForm.auxdecl: void loadImageStorageAccessList()\
87 {\
88 CONDITION cond;\
89 DMAN_STORAGEACCESS s, criteria;\
90 char buf[120];\
91 \
92 if (storageAccessList == NULL)\
93 storageAccessList = LST_Create();\
94 \
95 if (storageAccessList == NULL)\
96 return;\
97 \
98 memset(&s, 0, sizeof(s));\
99 memset(&criteria, 0, sizeof(criteria));\
100 s.Type = DMAN_K_STORAGEACCESS;\
101 criteria.Type = DMAN_K_STORAGEACCESS;\
102 \
103 cond = DMAN_Select(&dmanHandle, (DMAN_GENERICRECORD *)&s,\
104 (DMAN_GENERICRECORD *)&criteria,\
105 storageAccessList, NULL, NULL, NULL);\
106 if (cond != DMAN_NORMAL) {\
107 COND_DumpConditions();\
108 return;\
109 }\
110 \
111 MUT_LoadList(wStorageAccessList, storageAccessList,\
112 formatStorageAccess, buf);\
113 }\
114 \
115 static CONDITION readStorageAccess(DMAN_STORAGEACCESS *s)\
116 {\
117 CONDITION cond;\
118 CTNBOOLEAN nullFlag;\
119 \
120 memset(s, 0, sizeof(*s));\
121 s->Type = DMAN_K_STORAGEACCESS;\
122 s->Flag = 0;\
123 cond = MUT_ScanWidget(wApplicationTitleTxt, MUT_TEXT, &nullFlag, s->Title);\
124 if (cond != MUT_NORMAL || nullFlag)\
125 return 0;\
126 s->Flag |= DMAN_K_STORAGEACCESS_TITLE;\
127 \
128 cond = MUT_ScanWidget(wDatabaseKeyTxt, MUT_TEXT, &nullFlag, s->DbKey);\
129 if (cond != MUT_NORMAL || nullFlag) {\
130 return 0;\
131 }\
132 s->Flag |= DMAN_K_STORAGEACCESS_DBKEY;\
133 \
134 cond = MUT_ScanWidget(wOwnerTxt, MUT_TEXT, &nullFlag, s->Owner);\
135 if (cond != MUT_NORMAL) {\
136 return 0;\
137 }\
138 if (!nullFlag)\
139 s->Flag |= DMAN_K_STORAGEACCESS_OWNER;\
140 \
141 cond = MUT_ScanWidget(wGroupNameTxt, MUT_TEXT, &nullFlag, s->GroupName);\
142 if (cond != MUT_NORMAL) {\
143 return 0;\
144 }\
145 if (!nullFlag)\
146 s->Flag |= DMAN_K_STORAGEACCESS_GROUPNAME;\
147 \
148 s->Access = 0xffffff;\
149 s->Flag |= DMAN_K_STORAGEACCESS_ACCESS;\
150 \
151 cond = MUT_ScanWidget(wCommentTxt, MUT_TEXT, &nullFlag, s->Comment);\
152 if (cond != MUT_NORMAL) {\
153 return 0;\
154 }\
155 if (!nullFlag)\
156 s->Flag |= DMAN_K_STORAGEACCESS_COMMENT;\
157 \
158 return 1;\
159 }\
160 \
161 static void displayStorageAccess(DMAN_STORAGEACCESS *s)\
162 {\
163 if (s == NULL)\
164 return;\
165 \
166 if (s->Flag & DMAN_K_STORAGEACCESS_TITLE)\
167 XmTextSetString(wApplicationTitleTxt, s->Title);\
168 else\
169 XmTextSetString(wApplicationTitleTxt, "");\
170 \
171 if (s->Flag & DMAN_K_STORAGEACCESS_DBKEY)\
172 XmTextSetString(wDatabaseKeyTxt, s->DbKey);\
173 else\
174 XmTextSetString(wDatabaseKeyTxt, "");\
175 \
176 if (s->Flag & DMAN_K_STORAGEACCESS_OWNER)\
177 XmTextSetString(wOwnerTxt, s->Owner);\
178 else\
179 XmTextSetString(wOwnerTxt, "");\
180 \
181 if (s->Flag & DMAN_K_STORAGEACCESS_GROUPNAME)\
182 XmTextSetString(wGroupNameTxt, s->GroupName);\
183 else\
184 XmTextSetString(wGroupNameTxt, "");\
185 \
186 if (s->Flag & DMAN_K_STORAGEACCESS_COMMENT)\
187 XmTextSetString(wCommentTxt, s->Comment);\
188 else\
189 XmTextSetString(wCommentTxt, "");\
190 }\
191
192 *imageStorageAccessForm.static: true
193 *imageStorageAccessForm.name: imageStorageAccessForm
194 *imageStorageAccessForm.parent: NO_PARENT
195 *imageStorageAccessForm.parentExpression: UxParent
196 *imageStorageAccessForm.defaultShell: topLevelShell
197 *imageStorageAccessForm.width: 795
198 *imageStorageAccessForm.height: 647
199 *imageStorageAccessForm.resizePolicy: "resize_none"
200 *imageStorageAccessForm.isCompound: "true"
201 *imageStorageAccessForm.compoundIcon: "form.xpm"
202 *imageStorageAccessForm.compoundName: "form_"
203 *imageStorageAccessForm.x: 275
204 *imageStorageAccessForm.y: 249
205 *imageStorageAccessForm.unitType: "pixels"
206
207 *frame5.class: frame
208 *frame5.static: true
209 *frame5.name: frame5
210 *frame5.parent: imageStorageAccessForm
211 *frame5.width: 782
212 *frame5.height: 170
213 *frame5.isCompound: "true"
214 *frame5.compoundIcon: "frame.xpm"
215 *frame5.compoundName: "frame_"
216 *frame5.x: 8
217 *frame5.y: 8
218 *frame5.resizable: "false"
219 *frame5.resizeRecursion: "up"
220
221 *scrolledWindowList7.class: scrolledWindow
222 *scrolledWindowList7.static: true
223 *scrolledWindowList7.name: scrolledWindowList7
224 *scrolledWindowList7.parent: frame5
225 *scrolledWindowList7.scrollingPolicy: "application_defined"
226 *scrolledWindowList7.visualPolicy: "variable"
227 *scrolledWindowList7.scrollBarDisplayPolicy: "static"
228 *scrolledWindowList7.shadowThickness: 0
229 *scrolledWindowList7.isCompound: "true"
230 *scrolledWindowList7.compoundIcon: "scrllist.xpm"
231 *scrolledWindowList7.compoundName: "scrolled_List"
232 *scrolledWindowList7.x: 62
233 *scrolledWindowList7.y: 12
234
235 *wStorageAccessList.class: scrolledList
236 *wStorageAccessList.static: true
237 *wStorageAccessList.name: wStorageAccessList
238 *wStorageAccessList.parent: scrolledWindowList7
239 *wStorageAccessList.width: 330
240 *wStorageAccessList.height: 140
241 *wStorageAccessList.browseSelectionCallback: {\
242 XmListCallbackStruct *l;\
243 DMAN_STORAGEACCESS *s;\
244 \
245 l = (XmListCallbackStruct *)UxCallbackArg;\
246 s = LST_Index(&storageAccessList, l->item_position);\
247 \
248 displayStorageAccess(s);\
249 }
250
251 *label16.class: label
252 *label16.static: true
253 *label16.name: label16
254 *label16.parent: imageStorageAccessForm
255 *label16.isCompound: "true"
256 *label16.compoundIcon: "label.xpm"
257 *label16.compoundName: "label_"
258 *label16.x: 50
259 *label16.y: 190
260 *label16.width: 250
261 *label16.height: 40
262 *label16.labelString: "Application Title (CTN)"
263
264 *label17.class: label
265 *label17.static: true
266 *label17.name: label17
267 *label17.parent: imageStorageAccessForm
268 *label17.isCompound: "true"
269 *label17.compoundIcon: "label.xpm"
270 *label17.compoundName: "label_"
271 *label17.x: 50
272 *label17.y: 280
273 *label17.width: 250
274 *label17.height: 40
275 *label17.leftAttachment: "attach_opposite_widget"
276 *label17.leftOffset: 0
277 *label17.leftWidget: "label16"
278 *label17.topAttachment: "attach_widget"
279 *label17.topOffset: 5
280 *label17.topWidget: "label16"
281 *label17.labelString: "Database Key (Name)"
282
283 *label18.class: label
284 *label18.static: true
285 *label18.name: label18
286 *label18.parent: imageStorageAccessForm
287 *label18.isCompound: "true"
288 *label18.compoundIcon: "label.xpm"
289 *label18.compoundName: "label_"
290 *label18.x: 50
291 *label18.y: 330
292 *label18.width: 250
293 *label18.height: 40
294 *label18.leftAttachment: "attach_opposite_widget"
295 *label18.leftOffset: 0
296 *label18.leftWidget: "label16"
297 *label18.topAttachment: "attach_widget"
298 *label18.topOffset: 5
299 *label18.topWidget: "label17"
300 *label18.labelString: "Owner (AE Title - optional)"
301
302 *label19.class: label
303 *label19.static: true
304 *label19.name: label19
305 *label19.parent: imageStorageAccessForm
306 *label19.isCompound: "true"
307 *label19.compoundIcon: "label.xpm"
308 *label19.compoundName: "label_"
309 *label19.x: 50
310 *label19.y: 380
311 *label19.width: 250
312 *label19.height: 40
313 *label19.leftAttachment: "attach_opposite_widget"
314 *label19.leftOffset: 0
315 *label19.leftWidget: "label16"
316 *label19.topAttachment: "attach_widget"
317 *label19.topOffset: 5
318 *label19.topWidget: "label18"
319 *label19.labelString: "Group Name (optional)"
320
321 *label20.class: label
322 *label20.static: true
323 *label20.name: label20
324 *label20.parent: imageStorageAccessForm
325 *label20.isCompound: "true"
326 *label20.compoundIcon: "label.xpm"
327 *label20.compoundName: "label_"
328 *label20.x: 50
329 *label20.y: 450
330 *label20.width: 250
331 *label20.height: 40
332 *label20.topAttachment: "attach_widget"
333 *label20.topOffset: 30
334 *label20.topWidget: "label19"
335 *label20.leftAttachment: "attach_opposite_widget"
336 *label20.leftOffset: 0
337 *label20.leftWidget: "label16"
338 *label20.labelString: "Access"
339
340 *label21.class: label
341 *label21.static: true
342 *label21.name: label21
343 *label21.parent: imageStorageAccessForm
344 *label21.isCompound: "true"
345 *label21.compoundIcon: "label.xpm"
346 *label21.compoundName: "label_"
347 *label21.x: 50
348 *label21.y: 530
349 *label21.width: 250
350 *label21.height: 40
351 *label21.leftAttachment: "attach_opposite_widget"
352 *label21.leftOffset: 0
353 *label21.leftWidget: "label16"
354 *label21.topAttachment: "attach_widget"
355 *label21.topOffset: 35
356 *label21.topWidget: "label20"
357 *label21.labelString: "Comment"
358
359 *wApplicationTitleTxt.class: textField
360 *wApplicationTitleTxt.static: true
361 *wApplicationTitleTxt.name: wApplicationTitleTxt
362 *wApplicationTitleTxt.parent: imageStorageAccessForm
363 *wApplicationTitleTxt.width: 390
364 *wApplicationTitleTxt.isCompound: "true"
365 *wApplicationTitleTxt.compoundIcon: "textfield.xpm"
366 *wApplicationTitleTxt.compoundName: "text_Field"
367 *wApplicationTitleTxt.x: 400
368 *wApplicationTitleTxt.y: 210
369 *wApplicationTitleTxt.height: 40
370 *wApplicationTitleTxt.leftAttachment: "attach_widget"
371 *wApplicationTitleTxt.leftOffset: 15
372 *wApplicationTitleTxt.leftWidget: "label16"
373 *wApplicationTitleTxt.topAttachment: "attach_opposite_widget"
374 *wApplicationTitleTxt.topOffset: 0
375 *wApplicationTitleTxt.topWidget: "label16"
376
377 *wDatabaseKeyTxt.class: textField
378 *wDatabaseKeyTxt.static: true
379 *wDatabaseKeyTxt.name: wDatabaseKeyTxt
380 *wDatabaseKeyTxt.parent: imageStorageAccessForm
381 *wDatabaseKeyTxt.width: 390
382 *wDatabaseKeyTxt.isCompound: "true"
383 *wDatabaseKeyTxt.compoundIcon: "textfield.xpm"
384 *wDatabaseKeyTxt.compoundName: "text_Field"
385 *wDatabaseKeyTxt.x: 400
386 *wDatabaseKeyTxt.y: 250
387 *wDatabaseKeyTxt.height: 40
388 *wDatabaseKeyTxt.leftAttachment: "attach_widget"
389 *wDatabaseKeyTxt.leftOffset: 15
390 *wDatabaseKeyTxt.leftWidget: "label16"
391 *wDatabaseKeyTxt.topAttachment: "attach_opposite_widget"
392 *wDatabaseKeyTxt.topOffset: 0
393 *wDatabaseKeyTxt.topWidget: "label17"
394
395 *wOwnerTxt.class: textField
396 *wOwnerTxt.static: true
397 *wOwnerTxt.name: wOwnerTxt
398 *wOwnerTxt.parent: imageStorageAccessForm
399 *wOwnerTxt.width: 390
400 *wOwnerTxt.isCompound: "true"
401 *wOwnerTxt.compoundIcon: "textfield.xpm"
402 *wOwnerTxt.compoundName: "text_Field"
403 *wOwnerTxt.x: 400
404 *wOwnerTxt.y: 290
405 *wOwnerTxt.height: 40
406 *wOwnerTxt.leftAttachment: "attach_widget"
407 *wOwnerTxt.leftOffset: 15
408 *wOwnerTxt.leftWidget: "label16"
409 *wOwnerTxt.topAttachment: "attach_opposite_widget"
410 *wOwnerTxt.topOffset: 0
411 *wOwnerTxt.topWidget: "label18"
412
413 *wGroupNameTxt.class: textField
414 *wGroupNameTxt.static: true
415 *wGroupNameTxt.name: wGroupNameTxt
416 *wGroupNameTxt.parent: imageStorageAccessForm
417 *wGroupNameTxt.width: 390
418 *wGroupNameTxt.isCompound: "true"
419 *wGroupNameTxt.compoundIcon: "textfield.xpm"
420 *wGroupNameTxt.compoundName: "text_Field"
421 *wGroupNameTxt.x: 400
422 *wGroupNameTxt.y: 340
423 *wGroupNameTxt.height: 40
424 *wGroupNameTxt.leftAttachment: "attach_widget"
425 *wGroupNameTxt.leftOffset: 15
426 *wGroupNameTxt.leftWidget: "label16"
427 *wGroupNameTxt.topAttachment: "attach_opposite_widget"
428 *wGroupNameTxt.topOffset: 0
429 *wGroupNameTxt.topWidget: "label19"
430
431 *wCommentTxt.class: textField
432 *wCommentTxt.static: true
433 *wCommentTxt.name: wCommentTxt
434 *wCommentTxt.parent: imageStorageAccessForm
435 *wCommentTxt.width: 390
436 *wCommentTxt.isCompound: "true"
437 *wCommentTxt.compoundIcon: "textfield.xpm"
438 *wCommentTxt.compoundName: "text_Field"
439 *wCommentTxt.x: 400
440 *wCommentTxt.y: 480
441 *wCommentTxt.height: 40
442 *wCommentTxt.leftAttachment: "attach_widget"
443 *wCommentTxt.leftOffset: 15
444 *wCommentTxt.leftWidget: "label16"
445 *wCommentTxt.topAttachment: "attach_opposite_widget"
446 *wCommentTxt.topOffset: 0
447 *wCommentTxt.topWidget: "label21"
448
449 *pushButton15.class: pushButton
450 *pushButton15.static: true
451 *pushButton15.name: pushButton15
452 *pushButton15.parent: imageStorageAccessForm
453 *pushButton15.x: 40
454 *pushButton15.y: 540
455 *pushButton15.width: 180
456 *pushButton15.height: 50
457 *pushButton15.labelString: "Add"
458 *pushButton15.activateCallback: {\
459 CONDITION cond;\
460 DMAN_STORAGEACCESS s;\
461 \
462 cond = readStorageAccess(&s);\
463 if (cond != 1)\
464 return;\
465 \
466 cond = DMAN_Insert(&dmanHandle, (DMAN_GENERICRECORD *)&s);\
467 if (cond != DMAN_NORMAL)\
468 COND_DumpConditions();\
469 \
470 loadImageStorageAccessList();\
471 }
472
473 *pushButton16.class: pushButton
474 *pushButton16.static: true
475 *pushButton16.name: pushButton16
476 *pushButton16.parent: imageStorageAccessForm
477 *pushButton16.x: 310
478 *pushButton16.y: 540
479 *pushButton16.width: 180
480 *pushButton16.height: 50
481 *pushButton16.labelString: "Update"
482 *pushButton16.sensitive: "false"
483
484 *pushButton17.class: pushButton
485 *pushButton17.static: true
486 *pushButton17.name: pushButton17
487 *pushButton17.parent: imageStorageAccessForm
488 *pushButton17.x: 580
489 *pushButton17.y: 540
490 *pushButton17.width: 180
491 *pushButton17.height: 50
492 *pushButton17.labelString: "Delete"
493 *pushButton17.activateCallback: {\
494 CONDITION cond;\
495 DMAN_STORAGEACCESS s;\
496 \
497 cond = readStorageAccess(&s);\
498 if (cond != 1)\
499 return;\
500 \
501 cond = DMAN_Delete(&dmanHandle, (DMAN_GENERICRECORD *)&s);\
502 if (cond != DMAN_NORMAL)\
503 COND_DumpConditions();\
504 \
505 loadImageStorageAccessList();\
506 }
507

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5