;+ ; ; NAME: ; CPHELP_EV ; ; PURPOSE: ; The event handler for CPHELP ; ; CATEGORY: ; C/P display ; ; CALLING SEQUENCE: ; through XMANAGER ; ; CALLED BY: ; CPHELP (through XMANAGER) ; ; CALLS TO: ; CPHELP1, CPHELP2, CPHELP3 ; ; INPUTS: ; none ; ; OPTIONAL INPUTS: ; none ; ; OUTPUTS: ; none ; ; OPTIONAL OUTPUTS: ; none ; ; COMMON BLOCKS: ; CPHELPCOM to pass values to event handler ; ; SIDE EFFECTS: ; none ; ; RESTRICTIONS: ; The value passed is the exact wording of the topic as it appears ; in the help widget. A change to the wording of the help topic ; (when the widget is created - in CPHELP) or to the widget event ; handler case value (in CPHELP_EV) or to the case values in CPHELPn ; (where n is a number) will require the same changes occur in all 3 ; locations. ; ; PROCEDURE: ; Handle events as input and output text about the selected topic. ; ; MODIFICATION HISTORY: ; May 1993 - Elaine Einfalt (HSTX) ; ;- pro cphelp_ev, event common cphelpcom, second, helpit widget_control, event.id, get_uvalue=input if n_elements(input) eq 0 then input='' type = strmid(tag_names(event, /structure_name),7,1000) case type of 'BUTTON' : case strtrim(input,2) of 'QUITHAT' : widget_control, event.top, /destroy ; kills the widg else : end 'LIST' : begin value= strtrim(input(event.index),2) case value of ; get desired topic 'Getting C/P data to disk' : hval = cphelp1(value) 'Getting started' : hval = cphelp1(value) 'Output display legend' : hval = cphelp1(value) 'Output modes' : hval = cphelp1(value) 'Output mode menues' : hval = cphelp1(value) 'Display one image / Normal' : hval = cphelp1(value) 'Display one image / Difference' : hval = cphelp1(value) 'Show a movie / Normal' : hval = cphelp1(value) 'Show a movie / Difference' : hval = cphelp1(value) '"Quit"' : hval = cphelp2(value) 'Output accessories' : hval = cphelp2(value) '"Draw solar north"' : hval = cphelp2(value) '"Draw solar disk"' : hval = cphelp2(value) '"Draw solar radii lines"' : hval = cphelp2(value) '"Draw radial lines"' : hval = cphelp2(value) 'Input Radius and position angle' : hval = cphelp2(value) '"No R and theta"' : hval = cphelp2(value) '"Pick one R and theta"' : hval = cphelp2(value) '"Pick multiple R and theta"' : hval = cphelp2(value) '"User input R and theta"' : hval = cphelp2(value) '"Use R and theta in memory"' : hval = cphelp2(value) 'Output R and theta' : hval = cphelp3(value) '"Draw R and theta ruler"' : hval = cphelp3(value) '"Mark R and theta click"' : hval = cphelp3(value) '"No R and theta ruler or mark"' : hval = cphelp3(value) '"Plot radial scan"' : hval = cphelp3(value) '"Plot azmuthal scan"' : hval = cphelp3(value) 'Scale options for differences' : hval = cphelp3(value) 'Windowing options' : hval = cphelp3(value) '"Delete windows"' : hval = cphelp3(value) '"Reuse display window"' : hval = cphelp3(value) '"New display windows"' : hval = cphelp3(value) '"Save" [data to a disk file]' : hval = cphelp3(value) '"Help"' : hval = cphelp3(value) else : hval = 'Error - Undocumented feature - '+ value endcase ;display the help info in the text window widget_control, second, set_value = hval endcase else : print, 'Error - invalid widget type' end return end ;+ ; ; NAME: ; CPHELP ; ; PURPOSE: ; Provide the user helpful information about the C/P display code ; ; CATEGORY: ; C/P display ; ; CALLING SEQUENCE: ; CPHELP ; ; CALLED BY: ; CP ; ; CALLS TO: ; none ; ; INPUTS: ; none ; ; OPTIONAL INPUTS: ; none ; ; OUTPUTS: ; none ; ; OPTIONAL OUTPUTS: ; none ; ; COMMON BLOCKS: ; CPHELPCOM to pass values to event handler ; ; SIDE EFFECTS: ; Creates a widget ; ; RESTRICTIONS: ; Need to have widget capability ; ; The value passed is the exact wording of the topic as it appears ; in the help widget. A change to the wording of the help topic ; (when the widget is created - in CPHELP) or to the widget event ; handler case value (in CPHELP_EV) or to the case values in CPHELPn ; (where n is a number) will require the same changes occur in all 3 ; locations. ; ; PROCEDURE: ; Create a widget and call event handler ; ; MODIFICATION HISTORY: ; May 1993 - Elaine Einfalt (HSTX) ; ;- pro cphelp, group=group common cphelpcom, second, helpit if xregistered('cphelp') then return helpit = widget_base(title='C/P help', /row, space=20) first = widget_base(helpit, /column, space=15) quitit = widget_button(first, value='Quit', uvalue='QUITHAT') lab = widget_label(first, value='Click on topic') helplist = [ ' Getting C/P data to disk ', $ ' Output display legend ', $ ' Getting started ', $ ' Output modes ', $ ' Output mode menues ', $ ' Display one image / Normal ', $ ' Display one image / Difference ', $ ' Show a movie / Normal ', $ ' Show a movie / Difference ', $ ' "Quit" ', $ ' Output accessories ', $ ' "Draw solar north" ', $ ' "Draw solar disk" ', $ ' "Draw solar radii lines" ', $ ' "Draw radial lines" ', $ ' Input Radius and position angle ', $ ' "No R and theta" ', $ ' "Pick one R and theta" ', $ ' "Pick multiple R and theta" ', $ ' "User input R and theta" ', $ ' "Use R and theta in memory" ', $ ' Output R and theta ', $ ' "Draw R and theta ruler" ', $ ' "Mark R and theta click" ', $ ' "No R and theta ruler or mark" ', $ ' "Plot radial scan" ', $ ' "Plot azmuthal scan" ', $ ' Scale options for differences ', $ ' Windowing options ', $ ' "Delete windows" ', $ ' "Reuse display window" ', $ ' "New display windows" ', $ ' "Save" [data to a disk file] ', $ ' "Help" '] count = n_elements(helplist) id = strarr(count) for i = 0,count-1 do id(i) = helplist(i) list = widget_list(first, value=helplist, ysize=25, uvalue=id) second = widget_text(helpit, /scroll, /frame, xsize=50, ysize=30) widget_control, helpit, /realize xmanager, 'cphelp', helpit, event_handler='cphelp_ev', group_leader=group return end