SP_BUNGUNDROP

BUNGUNDROP()

  Short:
  ------
  BUNGUNDROP() Ends dropdown during BUNGEE() menu def sequence

  Returns:
  --------
  NIL

  Syntax:
  -------
  BUNGUNDROP()

  Description:
  ------------
  BUNGUNDROP() ends a dropdown during a BUNGEE() menu
  definition sequence.

  Use BUNGSTART(), BUNGEND(), BUNGOPTION(),
  BUNGDROP(), BUNGUNDROP() together to create a menu definition
  array for BUNGEE(). While it is not necessary to use these
  functions to create the array, it is helpful when you have
  a complex, multi-level dropdown structure.

  See BUNGEE for more information.

  Examples:
  ---------

  bungstart()

     bungoption("Files")
     bungdrop()
          bungoption("Open" ,{} ,{||!lFileIsOpen} )
          bungoption("Close",{||nil},{||lFileIsOpen } )
     bungundrop()
     bungoption("Edit")
     bungdrop()
          bungoption("DBF"  ,{||nil},nil )
          bungoption("Ascii",{||nil},nil )
     bungundrop()
     bungoption("Quit",{||bungeequit()},nil)

  aMenu := bungend()
  bungee(0,0,79,aMenu)

  Source:
  -------
  S_BUNGDEF.PRG

SP_BUNGSTART

BUNGSTART()
  Short:
  ------
  BUNGSTART() Starts a BUNGEE() menu array definition sequence

  Returns:
  --------
  NIL

  Syntax:
  -------
  BUNGSTART()

  Description:
  ------------
  BUNGSTART() initializes a BUNGEE() menu definition sequence.

  Use BUNGSTART(), BUNGEND(), BUNGOPTION(),
  BUNGDROP(), BUNGUNDROP() together to create a menu definition
  array for BUNGEE(). While it is not necessary to use these
  functions to create the array, it is helpful when you have
  a complex, multi-level dropdown structure.

  See BUNGEE for more information.

  Examples:
  ---------

  bungstart()

     bungoption("Files")
     bungdrop()
          bungoption("Open" ,{} ,{||!lFileIsOpen} )
          bungoption("Close",{||nil},{||lFileIsOpen } )
     bungundrop()
     bungoption("Edit")
     bungdrop()
          bungoption("DBF"  ,{||nil},nil )
          bungoption("Ascii",{||nil},nil )
     bungundrop()
     bungoption("Quit",{||bungeequit()},nil)

  aMenu := bungend()
  bungee(0,0,79,aMenu)

  Source:
  -------
  S_BUNGDEF.PRG

 

SP_BUNGREDRAW

BUNGREDRAW(

  Short:
  ------
  Redraws the current menu, with optional change of colors

  Returns:
  --------
  NIL

  Syntax:
  -------
  BUNGEETOP([aColors],[nShadowPos,[nShadowAtt])

  Description:
  ------------
  Redraws the current menu, with optional change of colors and shadows.
  The only time you would use this is to change colors and redraw the
  entire menu. [aColors] is the same as the parameter for BUNGEE() of
  the same name. You can also just use SETCOLOR() to change colors, and
  BUNGREDRAW() will parse out the colors it  needs for the menu. What this
  function does, is 1. Hide the menu 2. Reset the colors  3. Show the menu.

  [nShadowPos]    Optional shadow position for menu dropdown boxes.
                  Valid options are:
                       1. Lower left
                       3. Lower right
                       0. None
                  Upper left and upper right shadow positions are not
                  allowed. (they can overwrite parts of the menu bar)
                  Default is SLS_SHADPOS(), unless SLS_SHADPOS() is
                  upper left or upper right (7,9), in which case it
                  is set to 0 (none).

                  To force no shadows for the menu, pass 0.

                  Boxes may not always have shadows, if the shadow would
                  be drawn offscreen.

  [nShadowAtt]   Numeric shadow attribute. Default is SLS_SHADATT(), whose
                 default is 8. (grey on black)

  Examples:
  ---------
  bungstart()
          bungoption("Files")
          [etc...]
          bungoption("Colors",{||setcolors(),bungredraw()}  )
          [etc...]
    aMenu := bungend()

    bungee(0,0,79,aMenu)

  Source:
  -------
  S_BUNGEE.PRG

 

SP_BUNGOPTION

BUNGOPTION()
  Short:
  ------
  BUNGOPTION() Adds option during a BUNGEE() menu definition sequence

  Returns:
  --------
  NIL

  Syntax:
  -------
  BUNGOPTION(cPrompt,expAction,bActive)

  Description:
  ------------
  BUNGOPTION() adds an option during a BUNGEE() menu initialization
  sequence.

  [cPrompt] is the menu prompt, a character prompt, which is what will be
            displayed. i.e. "Files", "Edit". Imbed a tilde (~) to determine
            the trigger character which will be highlighted i.e.
            "Files","e~xit". The default trigger is the first letter.

            A specialized form of the character prompt is
            "CROSSBAR". If you include "CROSSBAR" as the text,
            a crossbar will be drawn joining the left and right sides of the
            dropdown box.

  [expAction] can be one of 3 things:
            1. a codeblock. this is simply evaluated
               when the option is selected
            2. An array (or nil) if the action is a dropdown box
               Creates a dropdown box when the prompt is selected.
               (this option must be then followed by a BUNGDROP()..
                BUNGUNDROP() sequence to define the dropdown menu. )
            3. NIL for CROSSBAR types

  [bActive] is the "is this option active?" codeblock
            This can either be NIL (always active)
            or is a codeblock which _must_ return type L
            (logical). This will determine if the prompt
            is active (available) or not (disabled). If disabled,
            the prompt is show in the disabled color.

  Use BUNGSTART(), BUNGEND(), BUNGOPTION(),
  BUNGDROP(), BUNGUNDROP() together to create a menu definition
  array for BUNGEE(). While it is not necessary to use these
  functions to create the array, it is helpful when you have
  a complex, multi-level dropdown structure.

  See BUNGEE for more information.

  Examples:
  ---------

  bungstart()

     bungoption("Files")
     bungdrop()
          bungoption("Open" ,{} ,{||!lFileIsOpen} )
          bungoption("Close",{||nil},{||lFileIsOpen } )
     bungundrop()
     bungoption("Edit")
     bungdrop()
          bungoption("DBF"  ,{||nil},nil )
          bungoption("Ascii",{||nil},nil )
     bungundrop()
     bungoption("Quit",{||bungeequit()},nil)

  aMenu := bungend()
  bungee(0,0,79,aMenu)

  Source:
  -------
  S_BUNGDEF.PRG

 

SP_BUNGEND

BUNGEND()

  Short:
  ------
  BUNGEND() Ends a BUNGEE() menu array definition sequence

  Returns:
  --------
  <aBungeeMenu> => a BUNGEE() menu array

  Syntax:
  -------
  BUNGEND()

  Description:
  ------------
  BUNGEND() ends a BUNGEE() menu definition sequence, returning
  a completed BUNGEE() menu array.

  Use BUNGSTART(), BUNGEND(), BUNGOPTION(),
  BUNGDROP(), BUNGUNDROP() together to create a menu definition
  array for BUNGEE(). While it is not necessary to use these
  functions to create the array, it is helpful when you have
  a complex, multi-level dropdown structure.

  See BUNGEE for more information.

  Examples:
  ---------

  bungstart()

     bungoption("Files")
     bungdrop()
          bungoption("Open" ,{} ,{||!lFileIsOpen} )
          bungoption("Close",{||nil},{||lFileIsOpen } )
     bungundrop()
     bungoption("Edit")
     bungdrop()
          bungoption("DBF"  ,{||nil},nil )
          bungoption("Ascii",{||nil},nil )
     bungundrop()
     bungoption("Quit",{||bungeequit()},nil)

  aMenu := bungend()
  bungee(0,0,79,aMenu)

  Source:
  -------
  S_BUNGDEF.PRG

 

SP_BUNGEETOP

BUNGEETOP()

  Short:
  ------
  Sends the current menu back to the top level box (not all
  the way to the top bar, but to the bar plus the current box)

  Returns:
  --------
  NIL

  Syntax:
  -------

  BUNGEETOP()

  Description:
  ------------
  Sends the current menu back to the top level box (not all
  the way to the top bar, but to the bar plus the current box)

  Examples:
  ---------
  bungstart()
  bungoption("Files")
  bungdrop()
     bungoption("Open" ,{} ,{||!lFileIsOpen} )
     bungdrop()
       bungoption("DBF" ,{||opendbf(),bungeetop()},nil )  // go back to top
       bungoption("Ascii",{||opendbf(),bungeetop()},nil )  // after these two
     bungundrop()
     bungoption("Close",{||nil},{||lFileIsOpen } )
  bungundrop()
  bungoption("Edit")
          bungoption("Quit",{||bungeequit()},nil)
  aMenu := bungend()

  bungee(0,0,79,aMenu)

  Source:
  -------
  S_BUNGEE.PRG

SP_BUNGEEQUIT

BUNGEEQUIT()                             *new*

  Short:
  ------
  BUNGEEQUIT( ) is how a Bungee menu is terminated. You would normally
  call it from one of the menu option codeblocks.

  Returns:
  --------
  NIL

  Syntax:
  -------

  BUNGEEQUIT()

  Description:
  ------------
  BUNGEEQUIT( ) is how a Bungee menu is terminated. You would normally
  call it from one of the menu option codeblocks.

  Examples:
  ---------
  bungstart()
  bungoption("Files")
  bungdrop()
          bungoption("Open" ,{} ,{||!lFileIsOpen} )
          bungoption("Close",{||nil},{||lFileIsOpen } )
  bungundrop()
  bungoption("Edit")
  bungdrop()
          bungoption("DBF"  ,{||nil},nil )
          bungoption("Ascii",{||nil},nil )
  bungundrop()
  bungoption("Quit",{||bungeequit()},nil)

  aMenu := bungend()

  @24,0 say "ALT-X=exit"   // set up Alt-X as a hotkey exit also
  aHotKeys := { {K_ALT_X,{||bungeequit()}}  }

  bungee(0,0,79,aMenu,nil,nil,nil,aHotKeys)

  Source:
  -------
  S_BUNGEE.PRG