!------------------------------------------------------------------------------!
! Tests for GControl CHOICE /INPUT switch with /TEMP switch (BUG 2081) and
!   enhancements to the /TEMP switch (BUG 2080)
!
!   Author : J. Hallam / J. Bauer
!   Version: $Id: test_gcontrol_input.mm,v 1.2 2010/02/15 16:55:46 jwb Exp $
!------------------------------------------------------------------------------!

startmacro

  pipe on
    panel/controls=gc/setup
    gcontrol label  macro   "MACRO"
      gcontrol menu MAIN "Exit with Status = " "PASS,FAIL" /tleft
      set gc.MAIN.itemColors {PASS=GREEN,FAIL=RED}
      res instructions "Test /INPUT and /TEMP switches in GControl Choice (2081). &
        Click on the buttons below. You should be able to right-click on the &
        Choice control that appears and enter text. "
      gcontrol text idtext "Instructions" "^instructions" 24 10 /title
    gcontrol button buttonC "" "Choice"
    gcontrol button buttonD "" "DVAL"
  pipe off

endmacro

procedure processMessage m:msg
  if msg.name EQS "MAIN" then
    if msg.data EQS "EXIT" then
      pipe stop
    else
      assert/text="GControl /INPUT /TEMP" "PASS" SUBS msg.data
      pipe stop
    endif
  elseif msg.name EQS "BUTTONC" then
    gcontrol choice tchoice "Choice temp" "x,y,z" "x" /input /temp /msg=f
  elseif msg.name EQS "BUTTOND" then
    gcontrol dval tdval "Dval temp" 1 1 10 /temp /msg=f
  endif

return
