!
! Test using a rollup (label) in a GDialog (BUG 2082)
!
! Author:  J. Hallam / J. Bauer
! Version: $Id: test_gcontrol_dialog_rollup.mm,v 1.1 2010/02/15 20:32:28 jwb Exp $
!

startmacro
pipe on
  panel/controls=gc/setup
  gcontrol label mainLabel "Main"
   gcontrol menu main "Exit with Status = " "PASS,FAIL" /tleft
   set gc.main.itemColors {PASS=GREEN,FAIL=RED}
  gcontrol text idtext "Instructions" "Click the button. The label inside the dialog &
     and at the top of the dialog should be able to rollup & rolldown" 40 6 /title
  gcontrol button showDialog "" "Show Dialog"
pipe off
endmacro

procedure processMessage
  if msg.name EQS "MAIN" then
    if msg.data EQS "EXIT" then
      pipe stop
    else
      assert/text="LIST2 tests" "PASS" SUBS msg.data
      pipe stop
    endif

  elseif msg.name EQS "SHOWDIALOG" then
    call showDialog
  
  endif
return

procedure showDialog
  gcontrol/temp/msg=t/handle="PREFERENCES_DIALOG" "DIALOG" preferences_dialog "Preferences" 400 300 "Submit,Cancel" "" 
		
  gcontrol/msg=f/panel="PREFERENCES_DIALOG" label preferences_audioplot_label "Plot Preferences" 	
  gcontrol/panel="PREFERENCES_DIALOG" menu preferences_dothat "Do That?" "Yes,No" "Yes" /tleft /nc=2
  gcontrol/msg=f/panel="PREFERENCES_DIALOG" label preferences_sig_label "Signatures" 		
  gcontrol/panel="PREFERENCES_DIALOG"/nc=2 menu preferences_dothis "Do This?" "Yes,No" "Yes" /tleft 
		
return