home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / dos / tools / inter47 / int2guid / pophints.txt < prev   
Text File  |  1994-03-19  |  7KB  |  161 lines

  1. Some Hints Concerning the POPHELP Program.
  2.  
  3. ***** 1993-04-04: Editings after 1992-12-19 are marked with 5 asterisks.
  4.  
  5. Small modifications to the Turbo Power POPHELP program can make it better
  6. suited for displaying the interrupt list and for many other purposes. This
  7. file describes four modifications that are recommended. They cover 1) minimum
  8. length of the screen search string 2) default Hot Keys 3) sort order in the
  9. main menu and 4) color attributes.
  10.  
  11. The POPHELP program included in the Object Professional package comes in
  12. two parts, POPHELP.PAS and PHMAIN.PAS. The changes should be made in the
  13. PHMAIN.PAS file, and the line numbers mentioned below refer to version 1.11
  14. dated 18-MAR-91. Before editing PHMAIN.PAS, save a copy of the original
  15. version, and insert a comment in the beginning of PHMAIN.PAS stating the
  16. changes to the code.
  17.  
  18.  
  19. 1) Minimum Length of the Screen Search String.
  20.  
  21. The Screen Search facility tries to pop up on a topic referenced by a word
  22. at the cursor position. A word is one or more consecutive letters, digits,
  23. or underscores. POPHELP can pop up either on an exact match, or on a partial
  24. match to the beginning of a window header with a predefined minimum string
  25. length. The minimum string length is defined to be 4. This implies that no
  26. match will be found to e.g. the window header "PSP Format" because the search
  27. string "psp" is too short, and a space cannot be included in the search
  28. string to prolong it to "psp ". Also, if Function Classification is enabled
  29. (after Interrupt List release 33), e.g. INT 00 will have the header 00_H, and
  30. "00" will no longer cause an exact match. 3 is a better choice for the minimum
  31. search string length, then "psp" and "10_" will find partial matches to the
  32. two windows.
  33.  
  34. To change the minimum partial search string length from 4 to 3, edit line
  35. 198:
  36.   MinPartialMatch = 4;                        {Min length for partial matches}
  37. to read:
  38.   MinPartialMatch = 3;                        {Min length for partial matches}
  39.  
  40.  
  41. 2) Default Hot Keys.
  42.  
  43. The three predefined Hot Keys are F1, F2, and F3 together with the left shift
  44. key. Because shifted function keys are used in many programs, that choice
  45. forces the user to either consequently using the right shift key with the
  46. function keys in programs, or to change the Hot Keys when POPHELP is
  47. installed. I find it more convenient to predefine the combinations F1, F2,
  48. and F3 with Ctrl + left shift.
  49.  
  50. To change the hot keys to use Ctrl left shift rather than left shift, edit
  51. lines 84-89:
  52.   HotKeyScreen : Word = $023B;    {LShift-F1}
  53.   HotKeyLast   : Word = $023C;    {LShift-F2}
  54.   HotKeyIndex  : Word = $023D;    {LShift-F3}
  55.   HotKeyNameScreen : String[19] = '<Left Shift><F1>';
  56.   HotKeyNameLast   : String[19] = '<Left Shift><F2>';
  57.   HotKeyNameIndex  : String[19] = '<Left Shift><F3>';
  58. to read:
  59.   HotKeyScreen : Word = $063B;    {Ctrl-LShift-F1}
  60.   HotKeyLast   : Word = $063C;    {Ctrl-LShift-F2}
  61.   HotKeyIndex  : Word = $063D;    {Ctrl-LShift-F3}
  62.   HotKeyNameScreen : String[19] = '<Ctrl><Left Sh><F1>';
  63.   HotKeyNameLast   : String[19] = '<Ctrl><Left Sh><F2>';
  64.   HotKeyNameIndex  : String[19] = '<Ctrl><Left Sh><F3>';
  65.  
  66.  
  67. 3) Sort Order in the Main Menu.
  68.  
  69. The POPHELP program uses a facility called a pick list for the main menu
  70. window. The Object Professional package supports three kinds of pick lists:
  71. PickHorizontal, PickVertical, and PickSnaking. They are illustrated in the
  72. following:
  73.  
  74. PickHorizontal
  75.  
  76.    1  2
  77.  ┌──────┐  A vertically scrolling viewport always contains consecutive
  78.  │ 3  4 │  entries, but the entries are not ordered as a normal index.
  79.  │ 5  6 │
  80.  │ 7  8 │
  81.  └──────┘
  82.    9 10
  83.   11 
  84.  
  85. PickVertical
  86.  
  87.    1  7
  88.  ┌──────┐  A vertically scrolling viewport does not contain consecutive
  89.  │ 2  8 │  entries in two adjacent columns. This method produces the
  90.  │ 3  9 │  shortest code, 260 bytes shorter than PickHorizontal.
  91.  │ 4 10 │
  92.  └──────┘
  93.    5 11
  94.    6
  95.  
  96. PickSnaking
  97.  
  98.    ┌──────┐     The viewport scrolls horizontally. It contains consecutive
  99.  1 │ 4  7 │ 10  entries in a natural order. This method produces the longest
  100.  2 │ 5  8 │ 11  code, 96 bytes longer than PickHorizontal and 356 bytes
  101.  3 │ 6  9 │     longer than PickVertical.
  102.    └──────┘
  103.  
  104. If the viewport can hold all entries, the PickVertical and PickSnaking
  105. windows appear equal.
  106. ***** 1994-03-19: Corrected from "PickHorizontal and PickSnaking" above.
  107.  
  108. POPHELP uses the PickHorizontal list with the anomalous sort order of the
  109. entries. 
  110.  
  111. To change the pick list sorting from horizontal to vertical or snaking, edit
  112. the last line of lines 792-799 (in procedure LoadHelpObject):
  113.     Help := New(ScrollingHelpWindowPtr,
  114.                 InitCustom(InitHelpX, InitHelpY,
  115.                            InitHelpX+InitHelpWidth-1,
  116.                            InitHelpY+InitHelpHeight-1,
  117.                            HelpColorSet,
  118.                            HelpWinOpts,
  119.                            CurName,
  120.                            PickHorizontal));
  121. so line 799 reads:
  122.                            PickVertical));
  123. or
  124.                            PickSnaking));
  125.  
  126. ***** 1993-04-04: Added:
  127. If PickSnaking is selected, also the "More" indicators in the main index
  128. should be changed from vertical arrows to horizontal arrows. Edit line 767
  129. (in procedure CustomizeHelpWindow) from
  130.       AddMoreHeader(' || ', heTL, #24, #25, '', 2, 3, 0);
  131. to
  132.       AddMoreHeader(' || ', heTL, #27, #26, '', 2, 3, 0);
  133.  
  134.  
  135. 4) POPHELP Color Attributes.
  136.  
  137. It is very common to use screen attribute bit 3 to select bright colors, and
  138. this is also used in the original version of POPHELP. However, programs (word
  139. processors for example) can alter the mode of the video board, so bit 3
  140. selects an alternate character set rather than a bright color. It is
  141. inconvenient to pop up using bright attributes in a program that has changed
  142. the video board mode, so the following changes are recommended to
  143. HelpColorSet defined in lines 125 - 157:
  144.  
  145.     BlockColor      : $74 (* $1E *); BlockMono      : $70;
  146.  
  147.     SelItemColor    : $63 (* $5E *); SelItemMono    : $70;
  148.  
  149.     FlexAHelpColor  : $17 (* $1F *); FlexAHelpMono  : $70;
  150.     FlexBHelpColor  : $34 (* $3E *); FlexBHelpMono  : $0F;
  151.  
  152.     UnselXrefColor  : $70 (* $3B *); UnselXrefMono  : $01;
  153.     SelXrefColor    : $71 (* $5E *); SelXrefMono    : $70;
  154.  
  155. If you leave the old values commented out like above, insert a space between
  156. "(*" or "{" and "$", or else they will be interpreted as compiler directives.
  157.  
  158.  
  159. After editing PHMAIN.PAS, compile POPHELP.PAS to get a modified POPHELP
  160. program.
  161.