Sha256: c2f37d0046ba7fec702fe161ea50e31e56bb5449132952b51de5f07f27c57810

Contents?: true

Size: 1.08 KB

Versions: 22

Compression:

Stored size: 1.08 KB

Contents

MENU OBJECT TYPE
  NAME: menu
  SHORTCUT: menu

  DESCRIPTION
    A CLI menu.
    This can be used for the main loop of a CLI application.

  CHILDREN
    prompt - string - '> '
      The shortcut may be used to select the  menu item.
    items - container
      A textual description of the menu item action.
    loop - boolean
      The script that will be run if the menu item is selected.
    default - script
      Optional script element. Run this if no other option selected.

  MESSAGES
    run - Show the options and the the prompt.
      Then run the script for the user's selection.
      Optionally repeat as long as the loop child is true.

  EXAMPLE

    menu [menu] :
    	on_load [script] :
    		run menu
    	prompt [string] : >
    	loop [bool] : true
    	items [can] :
    		hw [mitem] :
    			shortcut [str] : hw
    			description [str] : Run Hello World
    			do [script] :
            show 'Hello World!'
    		q [mitem] :
    			shortcut [str] : q
    			description [str] : Quit this menu
    			do [script] :
            put false into menu.loop

  SEE ALSO
    menu_item

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
gloo-lang-1.0.2 lib/gloo_lang/help/objs/cli/menu.txt
gloo-1.0.0 lib/gloo/help/objs/cli/menu.txt
gloo-lang-1.0.1 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-1.0.0 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.11 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.10 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.9 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.8 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.7 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.6 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.5 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.4 lib/gloo_lang/help/objs/cli/menu.txt
gloo-lang-0.9.3 lib/gloo_lang/help/objs/cli/menu.txt
gloo-0.8.0 lib/gloo/help/objs/cli/menu.txt
gloo-0.7.7 lib/gloo/help/objs/cli/menu.txt
gloo-0.7.6 lib/gloo/help/objs/cli/menu.txt
gloo-0.7.5 lib/gloo/help/objs/cli/menu.txt
gloo-0.7.4 lib/gloo/help/objs/cli/menu.txt
gloo-0.7.3 lib/gloo/help/objs/cli/menu.txt
gloo-0.7.2 lib/gloo/help/objs/cli/menu.txt