!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Tutorial procedure about imager.
!   Spectral Line case
! S.Guilloteau 2019
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
if (exist(prompt)) delet /var prompt
define char*8  prompt /global
let prompt "IMAGER> "
if .not.exist(query_mode) then
  define logical query_mode /global
  let test &1+0 /new integer
  let query_mode test.eq.0
endif
!
begin procedure tutorial-do
  !SAY 
  !SAY " --------------- Executing command ------------------------   "
  SAY 'ansi%bold''prompt'" "'ansi%blue'"&1 "'ansi%none''ansi%red'"! &2"'ansi%none'
  if query_mode then
    if pro%narg.le.2 then
      GREG1\DRAW RELO
      if (cursor_code.eq."E") then
        message w tutorial-pause "Exit tutorial"
        return base
      endif
    endif
  endif
  SIC\EXECUTE "&1"    ! It gets ambiguous with MCMC\EXECUTE
  !SAY "Done { "'ansi%blue'"&1 &2 &3 &4 &5 &6 &7 &8 &9"'ansi%none'" }"
end procedure tutorial-do
!
begin procedure tutorial-pause
  !
  greg1\draw relo
  if (cursor_code.eq."E") then
    message w tutorial-pause "Exit tutorial"
    return base
  endif
  !
end procedure tutorial-pause
!
sic precis auto
clear
set box /def
set expand 2.0
pen /weight 4
draw text 0 1 "Click in this Window to continue" 5 0 /char 5
draw text 0 -1 "  or press E to exit script"  5 0 /char 5
set expand 1.0
pen /weight 1
!
! Reset defaults
let method hogbom
let gain 0.2
let map_robust 0
let map_size 0
let map_cell 0
let map_field 0
let size 0
let center 0
let spacing 0  UNITS
let space_type LIN
let spacing_rule%c "Units"
support /reset
let do_nice NO
let do_rcoord NO    ! Unused in principle
let do_bit YES
!
let show_color -8   ! Good for the Demo
let last_shown " "  ! Nothing shown so far
let uvshow%fit NO
let error_bars NO
!
let scale 0 0       ! Reset Bitmap Scale
!
change lut dynamic
symbol DO "@ tutorial-do"
SAY " "
SAY "At any time, Click in Graphic Window to continue"
SAY "             or type E to exit script"

