; ; Auto Save File For ./event_selector.pro ; ; CODE MODIFICATIONS MADE ABOVE THIS COMMENT WILL BE LOST. ; DO NOT REMOVE THIS COMMENT: BEGIN HEADER ; $Id: lib_template.pro,v 1.2 1994/04/29 16:50:28 dan Exp $ ; ; Copyright (c) 1993, Research Systems, Inc. All rights reserved. ; Unauthorized reproduction prohibited. ; (Of course, if you don't work for RSI, remove these lines or ; modify to suit.) ;+ ; NAME: ; ROUTINE_NAME ; ; PURPOSE: ; Tell what your routine does here. I like to start with the words: ; "This function (or procedure) ..." ; Try to use the active, present tense. ; ; CATEGORY: ; Put a category (or categories) here. For example: ; Widgets. ; ; CALLING SEQUENCE: ; Write the calling sequence here. Include only positional parameters ; (i.e., NO KEYWORDS). For procedures, use the form: ; ; ROUTINE_NAME, Parameter1, Parameter2, Foobar ; ; Note that the routine name is ALL CAPS and arguments have Initial ; Caps. For functions, use the form: ; ; Result = FUNCTION_NAME(Parameter1, Parameter2, Foobar) ; ; Always use the "Result = " part to begin. This makes it super-obvious ; to the user that this routine is a function! ; ; INPUTS: ; Parm1: Describe the positional input parameters here. Note again ; that positional parameters are shown with Initial Caps. ; ; OPTIONAL INPUTS: ; Parm2: Describe optional inputs here. If you don't have any, just ; delete this section. ; ; KEYWORD PARAMETERS: ; KEY1: Document keyword parameters like this. Note that the keyword ; is shown in ALL CAPS! ; ; KEY2: Yet another keyword. Try to use the active, present tense ; when describing your keywords. For example, if this keyword ; is just a set or unset flag, say something like: ; "Set this keyword to use foobar subfloatation. The default ; is foobar superfloatation." ; ; OUTPUTS: ; Describe any outputs here. For example, "This function returns the ; foobar superflimpt version of the input array." This is where you ; should also document the return value for functions. ; ; OPTIONAL OUTPUTS: ; Describe optional outputs here. If the routine doesn't have any, ; just delete this section. ; ; COMMON BLOCKS: ; BLOCK1: Describe any common blocks here. If there are no COMMON ; blocks, just delete this entry. ; ; SIDE EFFECTS: ; Describe "side effects" here. There aren't any? Well, just delete ; this entry. ; ; RESTRICTIONS: ; Describe any "restrictions" here. Delete this section if there are ; no important restrictions. ; ; PROCEDURE: ; You can describe the foobar superfloatation method being used here. ; You might not need this section for your routine. ; ; EXAMPLE: ; Please provide a simple example here. An example from the PICKFILE ; documentation is shown below. ; ; Create a PICKFILE widget that lets users select only files with ; the extensions 'pro' and 'dat'. Use the 'Select File to Read' title ; and store the name of the selected file in the variable F. Enter: ; ; F = PICKFILE(/READ, FILTER = ['pro', 'dat']) ; ; MODIFICATION HISTORY: ; Written by: Your name here, Date. ; July, 1994 Any additional mods get described here. Remember to ; change the stuff above if you add a new keyword or ; something! ;- ; DO NOT REMOVE THIS COMMENT: END HEADER ; CODE MODIFICATIONS MADE BELOW THIS COMMENT WILL BE LOST. ; CODE MODIFICATIONS MADE ABOVE THIS COMMENT WILL BE LOST. ; DO NOT REMOVE THIS COMMENT: BEGIN MAIN13 PRO MAIN13_Event, Event WIDGET_CONTROL,Event.Id,GET_UVALUE=Ev CASE Ev OF 'BUTTON29': BEGIN Print, 'Event for DONE' END 'BGROUP55': BEGIN CASE Event.Value OF 0: Print,'Button CONT Pressed' 1: Print,'Button SHER & SHERB Pressed' 2: Print,'Button HER &HERB Pressed' ELSE: Message,'Unknown button pressed' ENDCASE END 'BGROUP44': BEGIN CASE Event.Value OF 0: Print,'Button HXT Pressed' 1: Print,'Button SXS1 Pressed' 2: Print,'Button SXS2 Pressed' 3: Print,'Button HXS Pressed' 4: Print,'Button GRS1 Pressed' 5: Print,'Button GRS2 Pressed' ELSE: Message,'Unknown button pressed' ENDCASE END 'BGROUP48': BEGIN CASE Event.Value OF 0: Print,'Button HXRBS Pressed' 1: Print,'Button GRSX1 Pressed' 2: Print,'Button GRSX2 Pressed' 3: Print,'Button GRS Pressed' ELSE: Message,'Unknown button pressed' ENDCASE END 'BGROUP59': BEGIN CASE Event.Value OF 0: Print,'Button OTHER Pressed' ELSE: Message,'Unknown button pressed' ENDCASE END 'BGROUP60': BEGIN CASE Event.Value OF 0: Print,'Button 0 Pressed' 1: Print,'Button 1 Pressed' 2: Print,'Button 2 Pressed' 3: Print,'Button 3 Pressed' 4: Print,'Button 4 Pressed' 5: Print,'Button 5 Pressed' 6: Print,'Button 6 Pressed' 7: Print,'Button 7 Pressed' ELSE: Message,'Unknown button pressed' ENDCASE END 'BGROUP24': BEGIN CASE Event.Value OF 0: Print,'Button ALL ONLINE Pressed' 1: Print,'Button DATE Pressed' 2: Print,'Button BATSE ARCHIVE # Pressed' 3: Print,'Button BATSE BURST # Pressed' 4: Print,'Button FILENAME Pressed' 5: Print,'Button NO EFFECT Pressed' ELSE: Message,'Unknown button pressed' ENDCASE END 'FIELD66': BEGIN Print, 'Event for DATATYPE' END 'FIELD67': BEGIN Print, 'Event for DETECTORID' END 'FIELD68': BEGIN Print, 'Event for DATE:' END 'FIELD69': BEGIN Print, 'Event for BATSE ARCHIVE #:' END 'FIELD74': BEGIN Print, 'Event for DIRECTORY' END 'FIELD75': BEGIN Print, 'Event for FILES:' END ENDCASE END ; DO NOT REMOVE THIS COMMENT: END MAIN13 ; CODE MODIFICATIONS MADE BELOW THIS COMMENT WILL BE LOST. PRO event_selector, GROUP=Group IF N_ELEMENTS(Group) EQ 0 THEN GROUP=0 junk = { CW_PDMENU_S, flags:0, name:'' } MAIN13 = WIDGET_BASE(GROUP_LEADER=Group, $ COLUMN=1, $ MAP=1, $ TITLE='SPEX DATA EVENT_SELECTOR', $ UVALUE='MAIN13', $ XOFFSET=200, $ YOFFSET=400) BUTTON29 = WIDGET_BUTTON( MAIN13, $ FONT='-adobe-itc avant garde gothic-demi-r-normal--34-240-100-100-p-182-iso8859-1', $ UVALUE='BUTTON29', $ VALUE='DONE') BASE19 = WIDGET_BASE(MAIN13, $ ROW=2, $ FRAME=4, $ MAP=1, $ TITLE='INSTRUMENT SELECTION', $ UVALUE='BASE19') BASE40 = WIDGET_BASE(BASE19, $ COLUMN=4, $ FRAME=2, $ MAP=1, $ TITLE='selectem', $ UVALUE='BASE40') Btns5412 = [ $ 'CONT', $ 'SHER & SHERB', $ 'HER &HERB' ] BGROUP55 = CW_BGROUP( BASE40, Btns5412, $ COLUMN=1, $ EXCLUSIVE=1, $ LABEL_TOP='BATSE', $ UVALUE='BGROUP55') Btns5414 = [ $ 'HXT', $ 'SXS1', $ 'SXS2', $ 'HXS', $ 'GRS1', $ 'GRS2' ] BGROUP44 = CW_BGROUP( BASE40, Btns5414, $ COLUMN=1, $ EXCLUSIVE=1, $ LABEL_TOP='YOHKOH', $ UVALUE='BGROUP44') Btns5416 = [ $ 'HXRBS', $ 'GRSX1', $ 'GRSX2', $ 'GRS' ] BGROUP48 = CW_BGROUP( BASE40, Btns5416, $ COLUMN=1, $ EXCLUSIVE=1, $ LABEL_TOP='SMM', $ UVALUE='BGROUP48') BASE57 = WIDGET_BASE(BASE40, $ COLUMN=1, $ MAP=1, $ UVALUE='BASE57') Btns5419 = [ $ 'OTHER' ] BGROUP59 = CW_BGROUP( BASE57, Btns5419, $ COLUMN=1, $ EXCLUSIVE=1, $ UVALUE='BGROUP59') Btns5421 = [ $ '0', $ '1', $ '2', $ '3', $ '4', $ '5', $ '6', $ '7' ] BGROUP60 = CW_BGROUP( BASE57, Btns5421, $ COLUMN=2, $ EXCLUSIVE=1, $ LABEL_TOP='DETECTOR ID', $ UVALUE='BGROUP60') BASE21 = WIDGET_BASE(MAIN13, $ ROW=1, $ FRAME=4, $ MAP=1, $ TITLE='EVENT DEFINITION', $ UVALUE='BASE21') Btns5424 = [ $ 'ALL ONLINE', $ 'DATE', $ 'BATSE ARCHIVE #', $ 'BATSE BURST #', $ 'FILENAME', $ 'NO EFFECT' ] BGROUP24 = CW_BGROUP( BASE21, Btns5424, $ COLUMN=1, $ EXCLUSIVE=1, $ LABEL_TOP='SELECT DATA BY:', $ UVALUE='BGROUP24') BASE65 = WIDGET_BASE(BASE21, $ COLUMN=1, $ MAP=1, $ TITLE='SHOWCURRENT_BASE', $ UVALUE='BASE65') FieldVal5427 = [ $ 'BATSE CONT' ] FIELD66 = CW_FIELD( BASE65,VALUE=FieldVal5427, $ ROW=1, $ STRING=1, $ TITLE='INSTRUMENT:', $ UVALUE='FIELD66') FieldVal5429 = [ $ '1' ] FIELD67 = CW_FIELD( BASE65,VALUE=FieldVal5429, $ ROW=1, $ STRING=1, $ TITLE='DETECTOR ID', $ UVALUE='FIELD67') FieldVal5431 = [ $ '30-JUN-91 02:57:00 UT' ] FIELD68 = CW_FIELD( BASE65,VALUE=FieldVal5431, $ ROW=1, $ STRING=1, $ TITLE='DATE:', $ UVALUE='FIELD68') FieldVal5433 = [ $ '665' ] FIELD69 = CW_FIELD( BASE65,VALUE=FieldVal5433, $ ROW=1, $ STRING=1, $ TITLE='BATSE ARCHIVE #:', $ UVALUE='FIELD69') FieldVal5435 = [ $ '/umbra/schwartz/data/spex_data/db_00468' ] FIELD74 = CW_FIELD( BASE65,VALUE=FieldVal5435, $ ROW=1, $ STRING=1, $ FIELDFONT='-adobe-helvetica-bold-r-normal--14-100-100-100-p-82-iso8859-1', $ TITLE='DIRECTORY:', $ UVALUE='FIELD74', $ XSIZE=32) FieldVal5437 = [ $ 'continuous_ibdb_468.fits' ] FIELD75 = CW_FIELD( BASE65,VALUE=FieldVal5437, $ ROW=1, $ STRING=1, $ TITLE='FILES:', $ UVALUE='FIELD75', $ XSIZE=30) WIDGET_CONTROL, MAIN13, /REALIZE XMANAGER, 'MAIN13', MAIN13 END