!**************************************************************************************************!
! Tests the drawing of text on a button 
!
! @bug 2473 GControl: text draws outside of widget if size is reduced
! @author  J Bauer
! @version $Id: test_gcontrol_text.mm,v 1.2 2011/12/22 15:14:49 jwb Exp $
!**************************************************************************************************!

startmacro

  pipe ON
    
    panel/msgid=main/setup/controls=gc
      gcontrol label  macro "MACRO"
        gcontrol menu main "Exit w/ Status = " "PASS,FAIL"  /tleft
        set gc.main.itemcolors {PASS=GREEN,FAIL=RED}

        gcontrol/title TEXT instructions INSTRUCTIONS "(This test is supposed to look compressed). The text for the widgets below and the &
                            PASS/FAIL buttons above should &
                            NOT draw over the borderline of the pane. " 24 12
        
	    gcontrol button wideButt "" "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
      gcontrol prompt myPrompt "Prompt:" "HHHHHHHHHHHHH"
      gcontrol lval   myLVal "LVAL" DEF=888888888888888888 MIN=0 MAX=1000000000000000000000 INC=1 /slider /msgondrag=f /fmt="## MHz"
  pipe OFF

endmacro

procedure processMessage m:msg
  !say "Got msg: ^msg"
  if msg.name eqs "MAIN"
    assert/text="^reg.main.name: user indicated" msg.data eqs "PASS"
    pipe stop
  
  endif

return