Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_menubar() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_MENUBAR()

 DESCRIPTION

 C_MENUBAR() displays a one level, bar style menu at the top of the
 screen.  Optional messages can be displayed for each menu item
 under the menu.  Additionally, the box style, colors, space between
 menu items, and menu title can be specified.

 SYNTAX

 C_MENUBAR(items [,msg] [,first] [,box] [,color] [,draw_opt] [,space]
 [,exit_keys] [,title])

 PARAMETERS

 items (A) is an array of character strings to be displayed as menu
 items.  The array must be declared the same size as the number of items.

 msg (A) is an array containing messages to be displayed for each
 menu item.  There must be one message in the msg array for every
 menu item specified, but a null ("") value may be used to skip a message.

 first (N) is the number of the first menu item to highlight when
 C_MENUBAR() first begins.  The first parameter can be any menu item
 specified in the items array.

 box (N) is the box type (0 - 5) to draw.  If box is not specified,
 box type 2 (double) is used.  The box types are as follows:

 BOX TYPE     DESCRIPTION
 --------     -----------
 0            No box
 1            Single top/bottom, single sides
 2            Double top/bottom, double sides
 3            Double top/bottom, single sides
 4            Single top/bottom, double sides
 5            Solid graphics characters

 color (C) is the color to display the menu.  The color parameter
 consists of four parts:  menu/border, highlight bar, first letter,
 and title, each separated by a comma  (i.e. "W/B,W+/R,W+/B,BG+/B").
 If color is not specified, the current Clipper color is used.

 draw_opt (L) indicates whether or not the menu should be drawn on
 the screen upon entry into the function.  This provides the ability
 to transparently exit and re-enter the function.  Specify true
 (.T.) to draw the menu or false (.F.) to suppress drawing.  If
 draw_opt is not specified, the default of true (.T.) is used.

 space (N) is the number of spaces that should appear between each
 menu item.  If space is not specified, the default of 2 is used.

 exit_keys (C) is a string containing the INKEY() codes that will
 allow C_MENUBAR() to exit.  Each key code in the string must use
 three spaces and be divided by a comma.  For example, the exit_keys
 string " 27, 13,286,  1" would allow the keys escape, enter, alt+a,
 and home to exit.  If exit_keys is not specified, the default of
 the escape key (27) is used to exit.

 title (C) is the optional menu title to display on the screen in
 the far right corner.  The title is drawn using the third color
 part of the color parameter, if specified.

 KEY DEFINITIONS AND ACTIONS

 KEY PRESSED     ACTION TAKEN
 -----------     ------------
 ESC             Exit
 ENTER           Exit
 HOME            Highlight first menu item
 END             Highlight last menu item
 RT-ARROW        Highlight next menu item, if last item highlight first
 LT-ARROW        Highlight previous item, if first item highlight last
 A-Z, a-z, 0-9   Highlight first item matching letter, exit

 RETURNS

 C_MENUBAR() returns the current menu item number when the function
 exits.  Use Clipper's LASTKEY() function to determine the keystroke
 used to exit.

 EXAMPLES

 declare xmenu[5], xmsg[5]
 xmenu[1] = "File Management"
 xmenu[2] = "Disk Control"
 xmenu[3] = "Utilities"
 xmenu[4] = "Setup"
 xmenu[5] = "Quit"

 xmsg[1] = "Update, Add, Delete Records"
 xmsg[2] = "View Directory, Check Disk, Format"
 xmsg[3] = "Backup, Restore, Copy Files"
 xmsg[4] = "Set Colors, Drive, Printer"
 xmsg[5] = "Quit, Return to DOS"

 ans = c_menubar(xmenu,xmsg,1,2,"W/B,W+/R",.t.,2,"","MAIN MENU")


See Also: C_MENU() C_POP() C_PICK()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson