home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / TEMPLGEN / AP1EDONE.INC < prev    next >
Encoding:
Text File  |  1988-02-11  |  8.0 KB  |  235 lines

  1. <<* APPEDONE.INC *>>
  2. <<#
  3.  
  4. procedure EditOne  <<*Single Page: (Simple,Bracketed)*>>
  5. string line1,line2
  6. begin
  7.   line1 := '@ row,0 SAY "EDIT/VIEW:  {E}dit  {F}ind  {G}oto  {L}ocate  <Del> "'
  8.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}rev-record  <Return>"'
  9.          <<*12345678901234567890123456789012345678901234567890*>>
  10.   if ismultials
  11.     line2 := stuff( line2,47,0,'{S}elect  ' )
  12.   endif
  13.   if feat(featlabel)
  14.     line2 := stuff( line2,47,0,'{O}utput  ' )
  15.   endif
  16.   if Simple
  17.     line1 := ChangePat( line1,'{','(' )
  18.     line2 := ChangePat( line2,'{','(' )
  19.     line1 := ChangePat( line1,'}',')' )
  20.     line2 := ChangePat( line2,'}',')' )
  21.   endif
  22.   genln( line2 )   <<*Gen them in reverse order*>>
  23.   genln( line1 )
  24.          <<*1234567890123456789012345678901234567890*>>
  25.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+Returnkey'
  26.   if ismultials
  27.     line1 := stuff( line1,34,0,'S' )
  28.   endif
  29.   if feat(featlabel)
  30.     line1 := stuff( line1,33,0,'O' )
  31.   endif
  32.   genln( line1 )
  33. end EditOne
  34.  
  35.  
  36. procedure EditPage
  37. string line1,line2
  38. begin
  39. <<*         123456789012345678901234567890123456789012345678901234567890*>>
  40.   line1 := '@ row,0 SAY "EDIT/VIEW:  {E}dit  {F}ind  {G}oto  {L}ocate  <PgDn>  <PgUp> "'
  41.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}revious-record  <Del>  <Return>"'
  42.   if ismultials
  43.     line1 := stuff( line1,60,0,'<Del>  ' )     <<*insert*>>
  44.     line2 := stuff( line2,51,5,'{S}elect' )    <<*delete/insert*>>
  45.   endif
  46.   if feat(featlabel)
  47.     line2 := stuff( line2,51,0,'{O}utput  ' )
  48.   endif
  49.   if ismultials or feat(featlabel)
  50.     line2 := stuff( line2,38,4,'' )            <<*delete*>>
  51.   endif
  52.   if Simple
  53.     line1 := ChangePat( line1,'{','(' )
  54.     line2 := ChangePat( line2,'{','(' )
  55.     line1 := ChangePat( line1,'}',')' )
  56.     line2 := ChangePat( line2,'}',')' )
  57.   endif
  58.   genln( line2 )   <<*Gen them in reverse order*>>
  59.   genln( line1 )
  60.          <<*1234567890123456789012345678901234567890*>>
  61.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+PgDn+PgUp+Returnkey'
  62.   if ismultials
  63.     line1 := stuff( line1,34,0,'S' )
  64.   endif
  65.   if feat(featlabel)
  66.     line1 := stuff( line1,33,0,'O' )
  67.   endif
  68.   genln( line1 )
  69. end EditPage
  70.  
  71.  
  72. procedure EditOldOne  <<*Single page: dBASE III, version 1.1*>>
  73. string line1,line2
  74. begin
  75.   line1 := '@ row,0 SAY "EDIT/VIEW:  {D}el  {E}dit  {F}ind  {G}oto  {L}ocate '
  76.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}revious-record  '
  77.   if ismultials
  78.     line1 := line1 + ' <Return> "'
  79.     line2 := line2 + '{S}elect"'
  80.   else
  81.     line1 := line1 + '"'
  82.     line2 := line2 + '<Return>"'
  83.   endif
  84.   if Simple
  85.     line1 := ChangePat( line1,'{','(' )
  86.     line2 := ChangePat( line2,'{','(' )
  87.     line1 := ChangePat( line1,'}',')' )
  88.     line2 := ChangePat( line2,'}',')' )
  89.   endif
  90.   genln( line2 )   <<*GEN in reverse order*>>
  91.   genln( line1 )
  92.          <<*1234567890123456789012345678901234567890*>>
  93.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+Returnkey'
  94.   if ismultials
  95.     line1 := stuff( line1,34,0,'S' )
  96.   endif
  97.   genln( line1 )
  98. end EditOldOne
  99.  
  100.  
  101. procedure EditOldPage  <<*Multipage: dBASE III, version 1.1*>>
  102. string line1,line2
  103. begin
  104.   line1 := '@ row,0 SAY "EDIT/VIEW:  {D}el  {E}dit  {F}ind  {G}oto  {L}ocate  {T}urn-page "'
  105.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}revious-record  <Return>"'
  106.          <<*123456789012345678901234567890123456789012345678901234567890*>>
  107.   if ismultials
  108.     line2 := stuff( line2,51,0,'{S}elect  ' )
  109.     line2 := stuff( line2,38,4,'' )
  110.   endif
  111.   if Simple
  112.     line1 := ChangePat( line1,'{','(' )
  113.     line2 := ChangePat( line2,'{','(' )
  114.     line1 := ChangePat( line1,'}',')' )
  115.     line2 := ChangePat( line2,'}',')' )
  116.   endif
  117.   genln( line2 )
  118.   genln( line1 )
  119.          <<*1234567890123456789012345678901234567890*>>
  120.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+PgDn+Returnkey'
  121.   if ismultials
  122.     line1 := stuff( line1,34,0,'S' )
  123.   endif
  124.   genln( line1 )
  125. end EditOldPage
  126.  
  127.  
  128. procedure prompts( row,col : integer; p1,p2,p3,p4,p5,p6,p7 : string )
  129.  
  130. procedure atprompt( token : string )
  131. begin
  132.   col := col + val( token[1] )   <<* 1st char is GAP value between items *>>
  133.   if token
  134.     if row = 0
  135.       gen( '@ row,' )
  136.     else
  137.       gen( '@ row+1,' )
  138.     endif
  139.     genln( col,' PROMPT "',substr( token,2,255 ),'"' )
  140.   endif
  141.   col := col + len( token ) - 1
  142. end atprompt
  143.  
  144. begin <<*prompts*>>
  145.   atprompt( p1 )
  146.   atprompt( p2 )
  147.   atprompt( p3 )
  148.   atprompt( p4 )
  149.   atprompt( p5 )
  150.   atprompt( p6 )
  151.   atprompt( p7 )
  152. end prompts
  153.  
  154.  
  155. procedure EditLiteOne
  156. <<*       1         2         3         4         5         6
  157. 0123456789012345678901234567890123456789012345678901234567890
  158. EDIT/VIEW:  Edit   Find   Goto   Locate   <Delete> "
  159.             Next-record   Prev-record   <Return>"
  160.             Next-record   Prev-record   Select   <Return>"
  161.             Next-record   Prev-record   Output   <Return>"
  162.  
  163. EDIT/VIEW:  Edit   Find   Goto   Locate   <Del>   Output "
  164.             Next-record   Prev-record   Select   <Return>"
  165. *>>
  166. string keys
  167. begin
  168.   if feat(featlabel) and ismultials
  169.     genln( '@ row,0 SAY "EDIT/VIEW:  Edit   Find   Goto   Locate   <Del>   Output"' )
  170.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Select   <Return>"' )
  171.     prompts( 0,12,'0Edit','3Find','3Goto','3Locate','4Del','4Output','' )
  172.     prompts( 1,12,'0Next-record','3Prev-record','3Select','4Return','','','' )
  173.     keys := '"EFGL"+DelRecord+"ONPS"+Returnkey'
  174.   else
  175.     genln( '@ row,0 SAY "EDIT/VIEW:  Edit   Find   Goto   Locate   <Delete>"' )
  176.     prompts( 0,12,'0Edit','3Find','3Goto','3Locate','4Delete','','' )
  177.     if feat(featlabel)
  178.       genln( '@ row+1,12 SAY "Next-record   Prev-record   Output   <Return>"' )
  179.       prompts( 1,12,'0Next-record','3Prev-record','3Output','4Return','','','' )
  180.       keys := '"EFGL"+DelRecord+"NPO"+Returnkey'
  181.     elsif ismultials
  182.       genln( '@ row+1,12 SAY "Next-record   Prev-record   Select   <Return>"' )
  183.       prompts( 1,12,'0Next-record','3Prev-record','3Select','4Return','','','' )
  184.       keys := '"EFGL"+DelRecord+"NPS"+Returnkey'
  185.     else
  186.       genln( '@ row+1,12 SAY "Next-record   Previous-record   <Return>"' )
  187.       prompts( 1,12,'0Next-record','3Previous-record','4Return','','','','' )
  188.       keys := '"EFGL"+DelRecord+"NP"+Returnkey'
  189.     endif
  190.   endif
  191. #>>
  192. MENU TO menuchoice
  193. editchoice=SUBSTR(Returnkey+{keys},menuchoice+1,1)
  194. <<end EditLiteOne>>
  195.  
  196.  
  197. <<#
  198. procedure EditLitePage
  199. <<*       1         2         3         4         5
  200. 01234567890123456789012345678901234567890123456789012345
  201. EDIT/VIEW:  Edit   Find   Goto   Locate   <Delete>   Turn-page
  202.             Next-record   Previous-record   <Return>
  203.  
  204.             Next-record   Prev-record   Select   <Return>
  205.             Next-record   Prev-record   Output   <Return>
  206.             Next-record   Prev-record   Output   Select   <Return>
  207. *>>
  208. string keys
  209. begin
  210.   genln( '@ row,0 SAY "EDIT/VIEW:  Edit   Find   Goto   Locate   <Delete>   Turn-page"' )
  211.   prompts( 0,12,'0Edit','3Find','3Goto','3Locate','4Delete','4Turn-page','' )
  212.   if feat(featlabel) and ismultials
  213.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Output   Select   <Return>"' )
  214.     prompts( 1,12,'0Next-record','3Prev-record','3Output','3Select','4Return','','' )
  215.     keys := '"EFGL"+DelRecord+PgDn+"NPOS"+Returnkey'
  216.   elsif feat(featlabel)
  217.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Output   <Return>"' )
  218.     prompts( 1,12,'0Next-record','3Prev-record','3Output','4Return','','','' )
  219.     keys := '"EFGL"+DelRecord+PgDn+"NPO"+Returnkey'
  220.   elsif ismultials
  221.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Select   <Return>"' )
  222.     prompts( 1,12,'0Next-record','3Prev-record','3Select','4Return','','','' )
  223.     keys := '"EFGL"+DelRecord+PgDn+"NPS"+Returnkey'>>
  224.   else
  225.     genln( '@ row+1,12 SAY "Next-record   Previous-record   <Return>"' )
  226.     prompts( 1,12,'0Next-record','3Previous-record','4Return','','','','' )
  227.     keys := '"EFGL"+DelRecord+PgDn+"NP"+Returnkey'>>
  228.   endif
  229. #>>
  230. MENU TO menuchoice
  231. editchoice=SUBSTR(Returnkey+{keys},menuchoice+1,1)
  232. <<end EditLitePage>>
  233.  
  234. <<* EOF: APPEDONE.INC *>>
  235.