!******************************************************************************!
! This tests the functionality of a collapsable menubar at the top of a panel
! that has a tsetup.
!
! Arguments: None
!
! @bug      NXM-3324 Jeff's panel menubar
! @since    3.9.0
! @author:  Jeanette McCall
!******************************************************************************!
startmacro
  switch INTERACTIVE  interAct     GET DEF=TRUE  SDEF=TRUE
  switch BASELINE     baseline     GET DEF=FALSE SDEF=TRUE
  switch COREGRAPHICS coreGraphics GET DEF=FALSE SDEF=TRUE ! for a quick check of graphics - more extreme tests - since 3.8.1

  set inst  "This tests the panel MENUBAR in tsetup mode.\n\n&
             The GLabel groups are initially displayed on a menu bar across the top.\n\n&
             1) Expand the collapsed section / pane that normally holds the GControls. &
                The menu bar should disappear and the GControls should move to that pane.\n\n&
             2) Collapse the GContol pane again and the all the controls should move back&
                to the menu bar.\n\n&
             3) Open the MACRO tab and click PASS if everything worked."

  if interAct or coreGraphics then
    pipe on
      panel/msgid=MAIN/controls=gc/menubar/tsetup
      textdisplay text=inst

      gcontrol label macro "  MACRO    "
      gcontrol menu main "Exit with Status = " "PASS,FAIL" /tleft
        set gc.main.itemColors {PASS=GREEN,FAIL=RED}
        gcontrol text idtext "Instructions" "Should see detailed instructions in the main pane to the right." 30 5 /title
      gcontrol label label_group "LABEL_GROUP"
        gcontrol text idtext2 "Hello" "Hang in there on testing!" 30 5 /title

    pipe off

  endif

endmacro

!******************************************************************************!
procedure processMessage
  if msg.name EQS "MAIN" then
    assert/text="^reg.main.name: User indicated tests" msg.data eqss "PASS"
    pipe stop
  endif
return
