! Macro - Graphics Lab
!
! Author: George P. Burdell
!
startmacro
  pipe on
    panel/setup/controls=gc
    
    plot/id=plot1/readout=+OnAxis sinewave.prm
    plot/id=plot2/readout=+OnAxis fftdemo.prm
    plot/id=plot3/readout=+OnAxis world.prm|cities.prm
    plot/id=plot4/readout=+OnAxis world.shp{LAYER={LABEL=NAME}}

    list2/id=list1 sinewave.prm
    list2/id=list2 fftdemo.prm
    list2/id=list3 cities.prm
    list2/id=list4 world.dbf
    
    gcontrol button state "" "Exit"
  pipe off
endmacro


procedure processMessage m:msg
  !say "Got message name=^msg.name info=^msg.info data=^msg.data"
  
  if msg.name eqs "STATE" and msg.data eqs "EXIT" then
    pipe stop
  else
    warn "Unhandled message name=^msg.name info=^msg.info data=^msg.data"
  endif
return

