home *** CD-ROM | disk | FTP | other *** search
- BoxMenu function: this function will do a box select menu. the user is
- allowed to select an item from that line by EITHER
- using the Left or Up and Right or Down arrow keys,
- followed by pressing the <Enter> key OR may
- alternately press any character that matches the first
- character of one of the words in the menu (case does
- not matter). The function returns a byte argument
- that corresponds to the number of the field selected.
- There may be from 1 to 10 fields.
-
- Special features to make it even easier for your users
- are that the space-bar and tab act just like the right
- arrow. The backspace and reverse-tab act just like the
- left arrow. Home jumps to beginning of the list and
- End jumps to the end of the list.
-
- You may set options that either end the menu if the
- user presses the Escape key or, alternately, you may
- trap the Funtion keys (unshifted f1 thru f10 only).
-
- If Escape is allowed, the pressing Escape returns a
- zero, if function keys are allowed, the number
- returned is the item number as if selected from the
- list.
-
- To test this program, compile and run the BOXDEMO.PAS
- program that should have been distributed with this
- function.
-
-
- Original Author: Philip R. Burns
- Highly Modified: Randall L. Smith
- Elkridge-All-Purpose (301) 796-1223
- Capital PC Stat SIG (301) 596-3569
- Forbin Project (319) 266-8086
-
-
-
- My Apoligies, but the arguments for the functions get kind of complicated:
-
- Parameters for BOXMENU
-
- Col = Byte : The screen position (1-80) that defines the top
- left corner column of the menu.
- Line = Byte : The screen line # (1-25) that defines the top
- lefthand corner of the menu.
- Width = byte : The width of the menu.
- ItemCtr = byte : the number of menu items to use (1-10). Max of ten.
-
- Forgrnd = byte : the forground color (0-15)
- Bkgrnd = byte : the background color (0-7)
- Note: if Forground and background are the same (or
- obvious illegal combos) the NormVideo and LowVideo
- commands will be used instead of the TextColor and
- TextBackground commands.
- Frame = byte : the foreground color of the frame drawn around the
- window. The Bkgrnd is used for the background color.
- HiLight = integer: The amount added to the Forgrnd color to create
- the High lighted field color. If the Bkgrnd is
- not White (7) then the background of the
- selected field will be set to White (7). If the
- Background color is White (7), the background of
- the selected field will be set to Black (0).
-
- Header = String : Max length = Menu Width -4 : The non-menu
- portion of the 1st line.
-
- Code = Byte : Special code that defines and allows for special
- keys to terminate the menu.
- 1 = End if user selects a field and also
- if user presses the <ESCape> key.
- 2 = End only when user selects a field. Does not
- recognize Escape key or function keys.
- 3 = End if user selects a field and also end if the
- user presses the Escape key or any of the 10
- function keys.
- 4 = Like 3 above but Escape is not recognized.
- Note: if an invalid number is passed, the default is 1.
-
- Start = byte : the number of the menu item you want highlighted when
- the menu is first brought up.
-
- ExpN : Explanation fields Exp1 thru Exp10
- = String : Max length = Menu Width - 4 characters :
- These fields hold the descriptions or whatever
- you want displayed. All of these strings must
- be passed to the function, this is true even if
- you don't want to use this field. Just use 2
- single quotes or something to define a null
- field. If the ItemCtr is less than the ExpN
- position, this line will not be displayed.
-
- Special Usage Note: You may call the BoxMenuDisplay procedure to
- display a blank menu and then "fill" the menu
- with something else. If you do this, the screen
- is not saved or restored however!
-
-
- Parameters for BOXMENUDISPLAY
-
- Col = Byte : The screen position (1-80) that defines the top
- left corner column of the menu.
- Line = Byte : The screen line # (1-25) that defines the top
- lefthand corner of the menu.
- Width = byte : The width of the menu.
- ItemCtr = byte : the number of menu items to use (1-10). Max of ten.
-
- Forgrnd = byte : the forground color (0-15) of the frame drawn around
- the window.
- Bkgrnd = byte : the background color (0-7)
- Note: if Forground and background are the same (or
- obvious illegal combos) the NormVideo and LowVideo
- commands will be used instead of the TextColor and
- TextBackground commands.
-
- Special Usage Note: You may call the BoxMenuDisplay procedure to
- display a blank menu and then "fill" the menu
- with something else. If you do this, the screen
- is not saved or restored however!
-
-
-
-
-
- Parameters for BoxString
-
- Col = Byte : The screen position (1-80) that defines the top
- left corner column of the menu.
- Line = Byte : The screen line # (1-25) that defines the top
- lefthand corner of the menu.
- Width = byte : The width of the menu.
-
- Depth = byte : The number of lines available for data display.
-
- Forgrnd = byte : the forground color (0-15)
- Bkgrnd = byte : the background color (0-7)
- Field = byte : the foreground color of the field input.
- The Bkgrnd is used for the background color.
-
- Header = String : Max length = Menu Width -4 : The non-menu
- portion of the 1st line.
- Initial = String : A string supplied as an initial value.
-
- Position = byte : the position on the line for the input field
- Line = byte : the line for then input field
- Length = byte : The maximum length of the string to be returned.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-