home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / FOXPRO / VLIST110 / VLIST.HDR < prev    next >
Text File  |  1992-03-23  |  37KB  |  789 lines

  1. VARDEF EXTERN
  2.   BYTE __color_skip
  3.   BYTE __color_hit
  4.   BYTE __color_bar
  5.   BYTE __color_tab
  6.   INT __scroll_offset
  7.   BYTE __color_hi_std
  8.   BYTE __color_hi_enhcd
  9.   CHAR( 1 ) __embed_char
  10. ENDDEF
  11.  
  12. #DEFINE jl_continue         0
  13. #DEFINE jl_ignore           1
  14. #DEFINE jl_repaint          2
  15. #DEFINE jl_select           3
  16. #DEFINE jl_abort            4
  17. #DEFINE jl_paint_key        5
  18. #DEFINE jl_bad_element      6
  19. #DEFINE jl_repaint_element  7
  20. #DEFINE jl_repaint_ignore   8
  21. #DEFINE jl_goto_mouse       9
  22. #DEFINE jl_rescan_menu     10
  23.  
  24. #DEFINE jl_mouse_ignore     0
  25. #DEFINE jl_mouse_right      1
  26. #DEFINE jl_mouse_up         2
  27. #DEFINE jl_mouse_down       3
  28. #DEFINE jl_mouse_scroll     4
  29. #DEFINE jl_mouse_new        5
  30. #DEFINE jl_mouse_select     6
  31. #DEFINE jl_mouse_left       7
  32. #DEFINE jl_mouse_both       8
  33. #DEFINE jl_mouse_xright     9
  34. #DEFINE jl_mouse_xup        10
  35. #DEFINE jl_mouse_xdown      11
  36. #DEFINE jl_mouse_xscroll    12
  37. #DEFINE jl_mouse_xnew       13
  38. #DEFINE jl_mouse_xselect    14
  39. #DEFINE jl_mouse_xleft      15
  40. #DEFINE jl_normal           1
  41. #DEFINE jl_skip             2
  42. #DEFINE jl_hit              3
  43. #DEFINE jl_hide             4
  44. #DEFINE jl_default         -1
  45. #DEFINE jl_error           -3
  46. #DEFINE jl_forward          1
  47. #DEFINE jl_backward         0
  48.  
  49. *- used with VLIST_POPUP or VLIST_PULLDOWN
  50. FUNCTION INT VLIST_Default_Menu_Handler PROTOTYPE
  51.   PARAMETERS VALUE LONG list_handle,;
  52.              VALUE UINT list_element,;
  53.                    UINT mouse_stat,;
  54.              VALUE UINT mrow,;
  55.              VALUE UINT mcol,;
  56.                     INT pick_key,;
  57.              VALUE UINT top_element,;
  58.              VALUE UINT last_element,;
  59.              VALUE UINT ur,;
  60.              VALUE UINT uc,;
  61.              VALUE UINT lr,;
  62.              VALUE UINT lc
  63.  
  64. *- use with VLIST_PICK
  65. FUNCTION INT VLIST_Default_Key_Handler PROTOTYPE
  66.   PARAMETERS VALUE LONG list_handle,;
  67.              VALUE UINT list_element,;
  68.                    UINT mouse_stat,;
  69.              VALUE UINT mrow,;
  70.              VALUE UINT mcol,;
  71.                     INT pick_key,;
  72.              VALUE UINT top_element,;
  73.              VALUE UINT last_element,;
  74.              VALUE UINT ur,;
  75.              VALUE UINT uc,;
  76.              VALUE UINT lr,;
  77.              VALUE UINT lc
  78.  
  79. *- used with VLIST_PROMPT
  80. FUNCTION INT VLIST_Default_Prompt_Handler PROTOTYPE
  81.   PARAMETERS VALUE LONG list_handle,;
  82.              VALUE UINT list_element,;
  83.                    UINT mouse_stat,;
  84.              VALUE UINT mrow,;
  85.              VALUE UINT mcol,;
  86.                     INT pick_key,;
  87.              VALUE UINT top_element,;
  88.              VALUE UINT last_element
  89.  
  90. FUNCTION UINT Vlist_SIMPLE PROTOTYPE
  91.   PARAMETERS VALUE LONG plist,;
  92.        VALUE UINT r,;
  93.        VALUE UINT c,;
  94.        VALUE UINT r1,;
  95.        VALUE UINT c1,;
  96.        VALUE UINT idx, ;
  97.        VALUE UINT first_allowed,;
  98.        VALUE UINT last_allowed,;
  99.        VALUE LOGICAL disp_only,;
  100.        VALUE LOGICAL ret
  101.  
  102. FUNCTION UINT Vlist_PICK PROTOTYPE
  103.   PARAMETERS VALUE LONG    handle,;
  104.              VALUE INT     upper_row,;
  105.              VALUE INT     upper_col,;
  106.              VALUE INT     lower_row,;
  107.              VALUE INT     lower_col,;
  108.                    UINT    top_element,;
  109.              VALUE UINT    initial_element,;
  110.              VALUE UINT    first_element_allowed,;
  111.              VALUE UINT    last_element_allowed,;
  112.              VALUE UINT    left_string_marker,;
  113.              VALUE UINT    right_string_marker,;
  114.              VALUE UINT    number_of_columns,;
  115.              VALUE UINT    spaces_between_columns,;
  116.              UNTYPED       key_handler_proc,;
  117.              VALUE LOGICAL display_only,;
  118.              VALUE LOGICAL scroll_bar,;
  119.              VALUE LOGICAL return_on_left_right,;
  120.              VALUE LOGICAL is_mouse,;
  121.              VALUE LOGICAL allow_embedded
  122.  
  123. FUNCTION LONG Vlist_Init PROTOTYPE
  124.   PARAMETERS VALUE UINT str_len
  125.  
  126. FUNCTION LOGICAL Vlist_Append PROTOTYPE
  127.   PARAMETERS VALUE LONG handle,;
  128.              VALUE UINT item_status,;
  129.              VALUE INT  item_color,;
  130.              CONST CHAR add_string
  131.  
  132. FUNCTION LOGICAL Vlist_Add PROTOTYPE
  133.   PARAMETERS VALUE LONG handle,;
  134.              CONST CHAR add_str
  135.  
  136. FUNCTION UINT Vlist_Max PROTOTYPE
  137.   PARAMETERS VALUE LONG handle
  138.  
  139. FUNCTION LOGICAL Vlist_Tol PROTOTYPE
  140.   PARAMETERS VALUE LONG handle
  141.  
  142. FUNCTION LOGICAL Vlist_Bol PROTOTYPE
  143.   PARAMETERS VALUE LONG handle
  144.  
  145. PROCEDURE Vlist_Skip PROTOTYPE
  146.   PARAMETERS VALUE LONG handle,;
  147.              VALUE UINT which_way
  148.  
  149. FUNCTION UINT Vlist_Number PROTOTYPE
  150.   PARAMETERS VALUE LONG handle
  151.  
  152. PROCEDURE Vlist_Top PROTOTYPE
  153.   PARAMETERS VALUE LONG handle
  154.  
  155. PROCEDURE Vlist_Bottom PROTOTYPE
  156.   PARAMETERS VALUE LONG handle
  157.  
  158. FUNCTION LOGICAL Vlist_Goto PROTOTYPE
  159.   PARAMETERS VALUE LONG handle,;
  160.              VALUE UINT which_element
  161.  
  162. FUNCTION CHAR Vlist_Str PROTOTYPE
  163.   PARAMETERS VALUE LONG handle,;
  164.              VALUE UINT which_element
  165.  
  166. FUNCTION CHAR Vlist_Cstr PROTOTYPE
  167.   PARAMETERS VALUE LONG handle
  168.  
  169. FUNCTION LOGICAL Vlist_Set_Status PROTOTYPE
  170.   PARAMETERS VALUE LONG handle,;
  171.              VALUE UINT which_element,;
  172.              VALUE UINT new_status
  173.  
  174. FUNCTION LOGICAL Vlist_Cset_Status PROTOTYPE
  175.   PARAMETERS VALUE LONG handle,;
  176.              VALUE UINT new_status
  177.  
  178. FUNCTION UINT Vlist_Get_Status PROTOTYPE
  179.   PARAMETERS VALUE LONG handle,;
  180.              VALUE UINT which_element
  181.  
  182. FUNCTION UINT Vlist_Cget_Status PROTOTYPE
  183.   PARAMETERS VALUE LONG handle
  184.  
  185. FUNCTION LOGICAL Vlist_Set_Color PROTOTYPE
  186.   PARAMETERS VALUE LONG handle,;
  187.              VALUE UINT which_element,;
  188.              VALUE INT  new_color
  189.  
  190. FUNCTION LOGICAL Vlist_Cset_Color PROTOTYPE
  191.   PARAMETERS VALUE LONG handle,;
  192.              VALUE INT  new_color
  193.  
  194. FUNCTION INT Vlist_Get_Color PROTOTYPE
  195.   PARAMETERS VALUE LONG handle,;
  196.              VALUE UINT which_element
  197.  
  198. FUNCTION INT Vlist_Cget_Color PROTOTYPE
  199.   PARAMETERS VALUE LONG handle
  200.  
  201. FUNCTION LOGICAL Vlist_Is_Init PROTOTYPE
  202.   PARAMETERS VALUE LONG handle
  203.  
  204. FUNCTION UINT Vlist_Get_Strlen PROTOTYPE
  205.   PARAMETERS VALUE LONG handle
  206.  
  207. FUNCTION LOGICAL Vlist_Edit PROTOTYPE
  208.   PARAMETERS VALUE LONG handle,;
  209.              VALUE UINT which_element,;
  210.              CONST CHAR edit_str
  211.  
  212. FUNCTION LOGICAL Vlist_Cedit PROTOTYPE
  213.   PARAMETERS VALUE LONG handle,;
  214.              CONST CHAR edit_str
  215.  
  216. FUNCTION LOGICAL Vlist_Replace PROTOTYPE
  217.   PARAMETERS VALUE LONG handle,;
  218.              VALUE UINT which_element,;
  219.              VALUE UINT item_status,;
  220.              VALUE INT  item_color,;
  221.              CONST CHAR edit_str
  222.  
  223. FUNCTION LOGICAL Vlist_Creplace PROTOTYPE
  224.   PARAMETERS VALUE LONG handle,;
  225.              VALUE UINT item_status,;
  226.              VALUE INT  item_color,;
  227.              CONST CHAR edit_str
  228.  
  229. PROCEDURE Vlist_SORT_Substr PROTOTYPE
  230.   PARAMETERS VALUE LONG handle,;
  231.              VALUE UINT start_element,;
  232.              VALUE UINT end_element,;
  233.              VALUE UINT start_sub_string,;
  234.              VALUE UINT end_sub_string
  235.  
  236. PROCEDURE Vlist_SORT PROTOTYPE
  237.   PARAMETERS VALUE LONG handle,;
  238.              VALUE UINT start_element,;
  239.              VALUE UINT end_element
  240.  
  241. *! fuck
  242.  
  243. *******************************************************************************
  244. * VList_Insert()                                                              *
  245. *                                                                             *
  246. * insert an element before the specified element.                             *
  247. *                                                                             *
  248. * the current element pointer is moved to this new element.                   *
  249. *******************************************************************************
  250.  
  251. FUNCTION LOGICAL Vlist_Insert PROTOTYPE
  252.   PARAMETERS VALUE LONG handle,;
  253.              VALUE UINT which_element,;
  254.              VALUE UINT item_status,;
  255.              VALUE INT  item_color,;
  256.              CONST CHAR add_str
  257.  
  258.  
  259. *******************************************************************************
  260. * VList_CInsert()                                                             *
  261. *                                                                             *
  262. * insert an element before the current element.                               *
  263. *                                                                             *
  264. * the current element pointer is moved to the new element.                    *
  265. *******************************************************************************
  266.  
  267. FUNCTION LOGICAL Vlist_Cinsert PROTOTYPE
  268.   PARAMETERS VALUE LONG handle,;
  269.              VALUE UINT item_status,;
  270.              VALUE INT  item_color,;
  271.              CONST CHAR add_str
  272.  
  273.  
  274. *******************************************************************************
  275. * VList_Delete()                                                              *
  276. *                                                                             *
  277. * delete a specified element.                                                 *
  278. *******************************************************************************
  279.  
  280. FUNCTION LOGICAL Vlist_Delete PROTOTYPE
  281.   PARAMETERS VALUE LONG handle,;
  282.              VALUE UINT which_element
  283.  
  284.  
  285. *******************************************************************************
  286. * VList_CDelete()                                                             *
  287. *                                                                             *
  288. * delete the current element                                                  *
  289. *******************************************************************************
  290.  
  291. FUNCTION LOGICAL Vlist_Cdelete PROTOTYPE
  292.   PARAMETERS VALUE LONG handle
  293.  
  294.  
  295. *******************************************************************************
  296. * VList_Copy()                                                                *
  297. *                                                                             *
  298. * copy the contents of one element to another specified element               *
  299. *******************************************************************************
  300.  
  301. FUNCTION LOGICAL Vlist_Copy PROTOTYPE
  302.   PARAMETERS VALUE LONG handle,;
  303.              VALUE UINT source,;
  304.              VALUE UINT dest
  305.  
  306.  
  307. *******************************************************************************
  308. * VList_CCopy()                                                               *
  309. *                                                                             *
  310. * copy the contents of the CURRENT element to a specified element             *
  311. *******************************************************************************
  312.  
  313. FUNCTION LOGICAL Vlist_Ccopy PROTOTYPE
  314.   PARAMETERS VALUE LONG handle,;
  315.              VALUE UINT dest
  316.  
  317.  
  318. *******************************************************************************
  319. * VList_Clear()                                                               *
  320. *                                                                             *
  321. * erase the entire contents of a list and free all of the attached memory.    *
  322. * the list is no longer valid.                                                *
  323. *******************************************************************************
  324.  
  325. PROCEDURE Vlist_Clear PROTOTYPE
  326.   PARAMETERS VALUE LONG handle
  327.  
  328.  
  329. *******************************************************************************
  330. * VList_Save()                                                                *
  331. *                                                                             *
  332. * save a list (or partial list) to disk.  If the 'encrypt' parameter is .T.   *
  333. * the list is saved in an encrypted format.                                   *
  334. *                                                                             *
  335. * if 'start_element' and 'end_element' is 0, the entire list is assumed.      *
  336. *******************************************************************************
  337.  
  338. FUNCTION LOGICAL Vlist_Save PROTOTYPE
  339.   PARAMETERS VALUE LONG handle,;           && handle of list
  340.              CONST CHAR filename,;         && file to save to
  341.              VALUE UINT start_element,;    && first element
  342.              VALUE UINT end_element,;      && last element
  343.              VALUE LOGICAL encrypt
  344.  
  345. *******************************************************************************
  346. * VList_Save_Append()                                                         *
  347. *                                                                             *
  348. * save a list onto the end of an existing file.                               *
  349. *******************************************************************************
  350.  
  351. FUNCTION LOGICAL Vlist_Save_Append PROTOTYPE
  352.   PARAMETERS VALUE LONG handle,;
  353.              CONST CHAR filename,;
  354.              VALUE UINT start_element,;
  355.              VALUE UINT end_element
  356.  
  357.  
  358. *******************************************************************************
  359. * VList_Restore()                                                             *
  360. *                                                                             *
  361. * creates a list from a LIST-FILE.  This list is initialized internally       *
  362. * and no VLIST_INIT() is needed.                                              *
  363. *                                                                             *
  364. * new_list = VLIST_RESTORE(...)                                               *
  365. *******************************************************************************
  366.  
  367. FUNCTION LONG Vlist_Restore PROTOTYPE
  368.   PARAMETERS CONST CHAR filename,;
  369.              VALUE UINT start_element,;
  370.              VALUE UINT end_element
  371.  
  372.  
  373. *******************************************************************************
  374. * VList_Restore_Append()                                                      *
  375. *                                                                             *
  376. * reads a LIST-FILE and appends its contents to the end of an existing        *
  377. * list.                                                                       *
  378. *******************************************************************************
  379.  
  380. FUNCTION LOGICAL Vlist_Restore_Append PROTOTYPE
  381.   PARAMETERS VALUE LONG handle,;
  382.              CONST CHAR filename,;
  383.              VALUE UINT start_element,;
  384.              VALUE UINT end_element
  385.  
  386.  
  387. *******************************************************************************
  388. * VList_FullView()                                                            *
  389. *                                                                             *
  390. * view a text file with mouse support                                         *
  391. *******************************************************************************
  392.  
  393. FUNCTION LOGICAL Vlist_Fullview PROTOTYPE
  394.   PARAMETERS CONST CHAR filename,;
  395.              VALUE UINT ur,;        && display area
  396.              VALUE UINT uc,;
  397.              VALUE UINT lr,;
  398.              VALUE UINT lc,;
  399.              VALUE LOGICAL mice     && is mouse present?
  400.  
  401.  
  402.  
  403. *******************************************************************************
  404. * VList_SmallView()                                                           *
  405. *                                                                             *
  406. * view a text file with NO mouse support.                                     *
  407. *******************************************************************************
  408.  
  409. FUNCTION LOGICAL Vlist_Smallview PROTOTYPE
  410.   PARAMETERS CONST CHAR filename,;
  411.              VALUE UINT ur,;         && display area
  412.              VALUE UINT uc,;
  413.              VALUE UINT lr,;
  414.              VALUE UINT lc
  415.  
  416.  
  417. *******************************************************************************
  418. * VList_Locate()                                                              *
  419. *                                                                             *
  420. * a sequential search for a string.                                           *
  421. *                                                                             *
  422. * if the 'from_current' parameter is .T., the search starts from the          *
  423. * current element, else the search starts from the list top.                  *
  424. *******************************************************************************
  425.  
  426. FUNCTION LOGICAL VList_Locate PROTOTYPE
  427.   PARAMETERS VALUE LONG handle,;
  428.        CONST CHAR look_string,;
  429.        VALUE LOGICAL exact_match,;
  430.        VALUE LOGICAL from_current   && start from current pointer or
  431.  
  432. *******************************************************************************
  433. * VList_Locate()                                                              *
  434. *                                                                             *
  435. * a sequential search for a substring.                                        *
  436. *******************************************************************************
  437.  
  438. FUNCTION LOGICAL VList_Locate_SubStr PROTOTYPE
  439.   PARAMETERS VALUE LONG handle,;
  440.        CONST CHAR look_string,;
  441.        VALUE UINT start_sub,;
  442.        VALUE UINT end_sub,;
  443.        VALUE LOGICAL exact_match,;
  444.        VALUE LOGICAL from_current
  445.  
  446.  
  447. *******************************************************************************
  448. * VList_PopUp()                                                               *
  449. *                                                                             *
  450. * displays a pop-up menu from a list.  The list must be in the following      *
  451. * format:                                                                     *
  452. *                                                                             *
  453. *    <system>.<row> | <text>                                                  *
  454. *                                                                             *
  455. *  all '|' must line-up.                                                      *
  456. *                                                                             *
  457. * example:                                                                    *
  458. *                                                                             *
  459. *   vlist_add( handle, "1.0   | title" )                                      *
  460. *   vlist_add( handle, "1.1   | choice 1" )                                   *
  461. *   vlist_add( handle, "1.2   | choice 2" )                                   *
  462. *   vlist_add( handle, "1.3   | choice 3" )                                   *
  463. *   vlist_append( handle, &jl_skip, &jl_default, "1.?   |─..." )              *
  464. *   vlist_add( handle, "1.4   | choice 4" )                                   *
  465. *   vlist_add( handle, "1.8   | choice 5" )                                   *
  466. *                                                                             *
  467. * NOTES:                                                                      *
  468. *    after the title (<system>.0) element.  The <row> parameter does not      *
  469. *    specify the actual displayed row, yet the return value of the element.   *
  470. *    therefore the selection of 'choice 5' would return 8.                    *
  471. *                                                                             *
  472. *    The "1.?" from above is a horizontal line across the displayed menu.     *
  473. *    the ? is not required yet helps keep the format easy to read.  The       *
  474. *    line is actually made by the "─..." text.                                *
  475. *                                                                             *
  476. *    Multiple menus can be kept in the same list by giving each menu a        *
  477. *    seperate system number.                                                  *
  478. *                                                                             *
  479. *    to omit a title, you still need the element added, but do as follows:    *
  480. *       vlist_add( handle, "1.0  |" )                                         *
  481. *                                                                             *
  482. *<    IF you set the 'save_under' parameter to .T., but not the 'restore_under'
  483. *    parameter, you must clear the 'save_var' variable yourself.  This can    *
  484. *    be done by either using RESTORESCRN() procedure or VLIST_FREE_SCREEN().  *
  485. *******************************************************************************
  486.  
  487. FUNCTION LOGICAL VList_PopUp PROTOTYPE
  488.   PARAMETERS VALUE LONG      handle,;     && list handle
  489.        VALUE UINT      system,;     && menu <SYSTEM> number
  490.        UINT            selected,;   && ACTUAL SELECTED element value
  491.        UNTYPED         key_board_handler,;  && user defined handler such as VLIST_DEFAULT_MENU_HANDLER
  492.        VALUE INT       s_row,;      && upper left coordinates
  493.        VALUE INT       s_col,;
  494.        VALUE UINT      max_row,;    && lowest row allowed to occupy
  495.        CONST CHAR( 8 ) border_chars,;  && border character string (must be 8 chars)
  496.        VALUE BYTE      border_color,;  && color for border
  497.        VALUE BYTE      title_color,;   && color for title
  498.        VALUE LOGICAL   shadow,;        && do you want a shadow?
  499.        VALUE LOGICAL   save_under,;    && save screen under the menu?
  500.              UINT      save_var,;      && variable to save screen to...
  501.        VALUE LOGICAL   restore_under,; && restore and clear 'save_var'
  502.        VALUE LOGICAL   scroll_bar,;    && do you want scroll-bar?
  503.        VALUE LOGICAL   mouse,;           && is mouse present?
  504.        VALUE LOGICAL   allow_embedded
  505.  
  506.  
  507. *******************************************************************************
  508. * VList_Empty()                                                               *
  509. *                                                                             *
  510. * is the list empty of any elements?                                          *
  511. *******************************************************************************
  512.  
  513. FUNCTION LOGICAL Vlist_Empty  PROTOTYPE
  514.   PARAMETERS VALUE LONG handle
  515.  
  516.  
  517. *******************************************************************************
  518. * VList_Free_Screen()                                                         *
  519. *                                                                             *
  520. * clear a variable created using SAVESCRN() without restoring the screen.     *
  521. *******************************************************************************
  522.  
  523. PROCEDURE Vlist_Free_Screen PROTOTYPE
  524.   PARAMETERS VALUE UINT screen_var
  525.  
  526.  
  527. *******************************************************************************
  528. * VList_Pulldown()                                                            *
  529. *                                                                             *
  530. *  displays a pulldown menu system from a list.                               *
  531. *                                                                             *
  532. *  the system for pulldown menus should be added to a list in the             *
  533. *  following form:                                                            *
  534. *                                                                             *
  535. *       <system>.<submenu> @<column>                                          *
  536. *       <system>.<submenu>.0     |<title>                                     *
  537. *       <system>.<submenu>.<row> |<text>                                      *
  538. *                                                                             *
  539. *  example:                                                                   *
  540. *                                                                             *
  541. *   vlist_Add( handle, "1.1 @2 |  Left  " )                                   *
  542. *   vlist_Add( handle, "1.1.0  |" )                                           *
  543. *   vlist_Add( handle, "1.1.1  |  Brief " )                                   *
  544. *   vlist_Add( handle, "1.1.2  |  Full " )                                    *
  545. *   vlist_append( handle, &jl_skip, &jl_default, "1.1.?  |─..." )             *
  546. *   vlist_add( handle, "1.1.3  |  Info " )                                    *
  547. *   vlist_add( handle, "1.2 @10 | Files " )                                   *
  548. *   vlist_add( handle, "1.2.0   |" )                                          *
  549. *   vlist_add( handle, "1.2.1   | Help" )                                     *
  550. *   vlist_add( handle, "1.2.2   | View" )                                     *
  551. *   vlist_add( handle, "1.3 @20 | Commands " )                                *
  552. *   vlist_add( handle, "1.3.0   |" )                                          *
  553. *   vlist_add( handle, "1.3.1   | choice 3,1 " )                              *
  554. *   vlist_add( handle, "1.3.2   | choice 3,2 " )                              *
  555. *                                                                             *
  556. *  NOTES:                                                                     *
  557. *                                                                             *
  558. *   a minimum of three elements are required for each submenu.                *
  559. *   The first <system>.<submenu> @<column> | <title> positions                *
  560. *   the header for that submenu at a specific column on the screen.           *
  561. *   The second, <system>.<submenu>.0  | <title> is the title for              *
  562. *   the actual submenu box.  Most programs will NEVER use this, yet           *
  563. *   the element is required.                                                  *
  564. *   The third, <system>.<submenu>.<row>  | <text> is the actual individual    *
  565. *   elements (similar to VList_PopUp).                                        *
  566. *                                                                             *
  567. *   when an element is selected, the UDF that is sent in the                  *
  568. *   'menu_processing_proc' is called to process the selected choice.          *
  569. *   Therefore all selections are processed from within the system without     *
  570. *   leaving.                                                                  *
  571. *                                                                             *
  572. *   The prototype for this function is:                                       *
  573. *     FUNCTION UINT Handle_Select                                             *
  574. *      PARAMETERS VALUE LONG handle,;                                         *
  575. *                 VALUE UINT system,;                                         *
  576. *                 VALUE UINT over,;                                           *
  577. *                 VALUE UINT down                                             *
  578. *                                                                             *
  579. *   A return value of 1 discontinues the menu system.  0 continues with       *
  580. *   the pulldown menu.                                                        *
  581. *                                                                             *
  582. *   Now default handlers for this function are included.                      *
  583. *******************************************************************************
  584.  
  585. FUNCTION LOGICAL VList_Pulldown PROTOTYPE
  586.   PARAMETERS VALUE LONG      handle,;      && list handle
  587.              VALUE UINT      system,;      && menu <SYSTEM>
  588.                    UINT      over,;        && first submenu to start at
  589.                    UINT      down,;        && current row in starting submenu
  590.                UNTYPED       menu_processing_proc,;  && procedure to handle item selection
  591.                UNTYPED       key_board_handler,;     && udf such as VLIST_DEFAULT_MENU_HANLDER
  592.              VALUE UINT      header_row,;            && row for menu titles/headers
  593.              VALUE UINT      menu_row,;              && start row for submenus
  594.              VALUE UINT      max_row,;               && lowest row to occupy
  595.              VALUE INT       col_offset,;            && offset from left of title to display submenu
  596.              CONST CHAR( 8 ) border_chars,;          && border for submenu
  597.              VALUE BYTE      border_color,;          && submenu border color
  598.              VALUE BYTE      header_color,;          && header color
  599.              VALUE LOGICAL   shadow,;                && do you want a shadow for the submenu?
  600.              VALUE LOGICAL   scroll_bar,;            && do you want a scroll-bar on the submenu?
  601.              VALUE LOGICAL   mouse,;                 && is mouse active?
  602.              VALUE LOGICAL   always_down,;           && are menus always pulled down?  (never up)
  603.              VALUE LOGICAL   allow_embedded
  604.  
  605.  
  606.  
  607. *******************************************************************************
  608. * VList_Find_First_Good()                                                     *
  609. *                                                                             *
  610. *  finds first non-hidden and non-skipped element in list                     *
  611. *******************************************************************************
  612.  
  613. FUNCTION UINT Vlist_Find_First_Good PROTOTYPE
  614.   PARAMETERS VALUE LONG handle,;
  615.              VALUE UINT first_allowed
  616.  
  617. *******************************************************************************
  618. * VList_Find_Last_Good()                                                      *
  619. *                                                                             *
  620. *  finds last non-hidden and non-skipped element in list                      *
  621. *******************************************************************************
  622.  
  623. FUNCTION UINT Vlist_Find_Last_Good PROTOTYPE
  624.   PARAMETERS VALUE LONG handle,;
  625.              VALUE UINT last_allowed
  626.  
  627. *******************************************************************************
  628. * VList_Get_Last_Good()                                                       *
  629. *                                                                             *
  630. *  finds the previous non-hidden and non-skipped element                      *
  631. *******************************************************************************
  632.  
  633. FUNCTION UINT Vlist_Get_Last_Good PROTOTYPE
  634.   PARAMETERS VALUE LONG handle,;
  635.              VALUE UINT element,;
  636.              VALUE UINT first_display
  637.  
  638. *******************************************************************************
  639. * VList_Get_Next_Good()                                                       *
  640. *                                                                             *
  641. *  finds the next non-hidden AND non-skipped element                          *
  642. *******************************************************************************
  643.  
  644. FUNCTION UINT Vlist_Get_Next_Good PROTOTYPE
  645.   PARAMETERS VALUE LONG handle,;
  646.              VALUE UINT element,;
  647.              VALUE UINT last_element_allowed
  648.  
  649. *******************************************************************************
  650. * VList_Count_Elements()                                                      *
  651. *                                                                             *
  652. *  counts the number of non-hidden elements between two elements              *
  653. *******************************************************************************
  654.  
  655. FUNCTION UINT Vlist_Count_Elements PROTOTYPE
  656.   PARAMETERS VALUE LONG handle,;
  657.              VALUE UINT start_element,;
  658.              VALUE UINT end_element
  659.  
  660. *******************************************************************************
  661. * VList_Skip_Next()                                                           *
  662. *                                                                             *
  663. *  goes forward to the next non-hidden element                                *
  664. *******************************************************************************
  665.  
  666. FUNCTION LOGICAL Vlist_Skip_Next PROTOTYPE
  667.   PARAMETERS VALUE LONG handle,;
  668.              VALUE UINT last_element_allowed
  669.  
  670. *******************************************************************************
  671. * VList_Skip_Last()                                                           *
  672. *                                                                             *
  673. *  goes backwards to the previous non-hidden element                          *
  674. *******************************************************************************
  675.  
  676. FUNCTION LOGICAL Vlist_Skip_Last PROTOTYPE
  677.   PARAMETERS VALUE LONG handle,;
  678.              VALUE UINT lowest_element_allowed
  679.  
  680. *******************************************************************************
  681. * VList_What_Color()                                                          *
  682. *                                                                             *
  683. *  sets __COLOR_STD to the valid color for the current element                *
  684. *******************************************************************************
  685.  
  686. PROCEDURE Vlist_What_Color PROTOTYPE
  687.   PARAMETERS VALUE LONG handle,;
  688.              VALUE BYTE old_std
  689.  
  690.  
  691. *******************************************************************************
  692. * VList_Say()                                                                 *
  693. *                                                                             *
  694. *  SAY a string taking into account for an embedded __embed_char              *
  695. *******************************************************************************
  696.  
  697. PROCEDURE Vlist_Say PROTOTYPE
  698.   PARAMETERS VALUE UINT srow,;
  699.              VALUE UINT scol,;
  700.              VALUE UINT swidth,;
  701.              CONST CHAR sstring,;
  702.              VALUE LOGICAL selected
  703.  
  704.  
  705. *******************************************************************************
  706. * VList_Embed_Caps()                                                          *
  707. *                                                                             *
  708. *  ADD the __embed_char to the first capital letter in a list range           *
  709. *******************************************************************************
  710.  
  711. PROCEDURE Vlist_Embed_Caps PROTOTYPE
  712.   PARAMETERS VALUE LONG plist,;
  713.              VALUE UINT first_element,;
  714.              VALUE UINT last_element
  715.  
  716. *******************************************************************************
  717. * VList_Prompt()                                                              *
  718. *                                                                             *
  719. *  VList prompt system call.  The list should be structured as:               *
  720. *                                                                             *
  721. *     "<system>.<number> @<row>,<col> |<text>"                                *
  722. *                                                                             *
  723. *  ex.    "1.1 @23, 0  |  Next  "                                             *
  724. *         "1.2 @23, 10 |  Previous  "                                         *
  725. *                                                                             *
  726. *******************************************************************************
  727.  
  728. FUNCTION UINT Vlist_Prompt PROTOTYPE
  729.   PARAMETERS VALUE LONG plist,;
  730.              VALUE UINT system,;
  731.              VALUE UINT first,;
  732.              UNTYPED    handler_proc,;
  733.              VALUE LOGICAL allow_mouse,;
  734.              VALUE LOGICAL allow_embeded
  735.  
  736.   
  737. FUNCTION CHAR VList_Fixpath PROTOTYPE
  738.   PARAMETERS VALUE CHAR filespec
  739.  
  740.  
  741. FUNCTION CHAR VList_ShortPath PROTOTYPE
  742.   PARAMETERS VALUE UINT        leng,;
  743.              CONST CHAR( 128 ) old_path
  744.  
  745. FUNCTION CHAR VList_1_Fpick PROTOTYPE
  746.   PARAMETERS VALUE UINT ur,;
  747.              VALUE UINT uc,;
  748.              VALUE UINT lr,;
  749.              VALUE UINT lc,;
  750.              CONST CHAR border_chars,;
  751.              VALUE BYTE border_color,;
  752.              VALUE BYTE dir_color,;
  753.              CONST CHAR start_path,;
  754.              CONST CHAR start_mask,;
  755.              VALUE LOGICAL leave_dir,;
  756.              VALUE LOGICAL shadow,;
  757.              VALUE LOGICAL is_mouse,;
  758.              VALUE LOGICAL display_dirname
  759.              
  760. *******************************************************************************
  761. *                               VList_Fpick()                                 *
  762. *<
  763. *< -1 on return means memory error
  764. *<  0 on return means esc pressed
  765. *<  # on return means this is a list handle!  use vlist_max to determine
  766. *<       the number selected.
  767. *<
  768. *******************************************************************************
  769.  
  770. FUNCTION LONG VList_Fpick PROTOTYPE
  771.   PARAMETERS VALUE UINT ur,;
  772.              VALUE UINT uc,;
  773.              VALUE UINT lr,;
  774.              VALUE UINT lc,;
  775.              CONST CHAR border_chars,;
  776.              VALUE BYTE border_color,;
  777.              VALUE BYTE dir_color,;
  778.              VALUE BYTE mark_color,;
  779.              CONST CHAR start_path,;
  780.              CONST CHAR start_mask,;
  781.              VALUE LOGICAL leave_dir,;
  782.              VALUE LOGICAL shadow,;
  783.              VALUE LOGICAL is_mouse,;
  784.              VALUE LOGICAL display_dirname,;
  785.              VALUE LOGICAL maintain_list,;
  786.              VALUE UINT    max_select
  787.   
  788.  
  789.