home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / editors / epm / e_macros / window.e < prev   
Encoding:
Text File  |  1991-06-11  |  20.2 KB  |  633 lines

  1. /*
  2.                    ╔═════════════════════╗
  3.                    ║  Tiled  WINDOWING   ║
  4.                    ╚═════════════════════╝
  5.                             and
  6.                  ╔═════════════════════════╗
  7.                  ║  Messy desk WINDOWING   ║
  8.                  ╚═════════════════════════╝
  9. */
  10. compile if WANT_WINDOWS                           -- <<<<<<<<<<<<<<<<<<<<<<<<<<<
  11.  
  12. ;  Note:  This file is not used at all by EPM.
  13.  
  14. /**********************   KEYS  **********************************************/
  15. ;  The following definitions occur in STDKEYS.E
  16. ; def c_w = call pnextwindow()
  17. ; def c_z= call pzoom()
  18. ; def c_a =call pnextwindowstyle()
  19. ; def f10= call pnextfile()
  20. ; def a_f10=call pprevfile()
  21. ; def c_v=call psplitv()
  22. ; def c_h=call psplith()
  23. ; def a_4=call psplit4()
  24.  
  25. /**********************   PROCEDURES   ***************************************/
  26. defproc start_screen
  27.    universal stage
  28.    universal ZoomWindowStyle
  29.    universal messy
  30.  
  31.    stage = 1
  32.    call remove_all_but_one()
  33.    call setzoomwindow(ZoomWindowStyle,1,1,screenheight(),screenwidth())
  34. compile if JHwindow
  35.    if not messy then
  36.       .boxheight=screenheight()+10
  37.    endif
  38. compile else
  39.    if messy then
  40.       call sizepopup(1,1,screenwidth(),screenheight()-1)
  41.    else
  42.       .boxheight=screenheight()+10
  43.    endif
  44. compile endif
  45.  
  46. defproc set_window(x,y,w,h)
  47.    call init_window(x+1,y+1,w-2,h-2)
  48.    .box          = 1
  49.    .boxheight    = h
  50.    .messagex     = 1
  51.    .messagey     = screenheight()
  52.    .commandy     = screenheight()-1
  53.    .commandx     = 1
  54.    .commandwidth = screenwidth()
  55.    .filenamey    = y
  56.    .filenamex    = x+2
  57.    .filenamewidth= min(w-4,screenwidth()%2)
  58.    .statuswidth  = .filenamewidth         /* min(w-4,screenwidth()%2) */
  59.    .statusy      = y+h-1
  60.    .statusx      = .filenamex             /* x+2            */
  61.    call make_status_fit()
  62.  
  63. defproc vertical2
  64.    universal messy
  65.    wdiv2=screenwidth()%2
  66.    call remove_all_but_one()
  67.    call set_window(1,1,wdiv2,screenheight()-2)
  68.    newwindow 'A'
  69.    call set_window(wdiv2+1,1,wdiv2,screenheight()-2)
  70.    if messy then prevwindow; .box=2
  71.    else call pnextwindow() endif
  72. compile if SHOW_MODIFY_METHOD
  73.    correct_modify_color()
  74. compile endif
  75.  
  76. defproc horizontal2
  77.    universal messy
  78.    hdiv2=(screenheight()-1)%2
  79.    call remove_all_but_one()
  80.    call set_window(1,1,screenwidth(),hdiv2)
  81.    newwindow 'A'
  82.    call set_window(1,hdiv2+1,screenwidth(),screenheight()-hdiv2-2)
  83.    if messy then prevwindow; .box=2
  84.    else call pnextwindow() endif
  85. compile if SHOW_MODIFY_METHOD
  86.    correct_modify_color()
  87. compile endif
  88.  
  89. defproc four_guys
  90.    universal messy
  91.    wdiv2=screenwidth()%2
  92.    hdiv2=(screenheight()-1)%2
  93.    call remove_all_but_one()
  94.    call set_window(1,1,wdiv2,hdiv2)
  95.    newwindow 'A'
  96.    call set_window(wdiv2+1,1,wdiv2,hdiv2)
  97.    newwindow 'A'
  98.    call set_window(wdiv2+1,hdiv2+1,wdiv2,screenheight()-hdiv2-2)
  99.    newwindow 'A'
  100.    call set_window(1,hdiv2+1,wdiv2,screenheight()-hdiv2-2)
  101.    if messy then prevwindow; prevwindow; prevwindow; .box=2
  102.    else call pnextwindow() endif
  103. compile if SHOW_MODIFY_METHOD
  104.    correct_modify_color()
  105. compile endif
  106.  
  107. defproc make_status_fit
  108.    sw = .statuswidth
  109.    if sw>38 then
  110.          /* Sample:                                        */
  111.          /*' Line nnnnnn  Col nnn  Replace  E vvvv  '      */
  112.          /* 0····*····1····*····2····*····3····*····4      */
  113.          /* 0         0         0         0         0      */
  114.       .linex        = .statusx+6
  115.       .colx         = .statusx+18
  116.       .insertx      = .statusx+23
  117.       .insertwidth  = 7
  118.       .statustext=' Line         Col                E 'EVERSION' '
  119.    elseif sw>22 then
  120.       .linex        = .statusx+6
  121.       .colx         = .statusx+18
  122.       .insertx      = .statusx+23
  123.       .statustext   = ' Line        Col '
  124.       if sw>29 then
  125.          .insertwidth=7
  126.       elseif sw>25 then
  127.          .insertwidth=3
  128.       else
  129.          .insertwidth=1
  130.       endif
  131.    elseif sw >15 then             /* 0123456789ABCDEF */
  132.      .linex        = .statusx+2   /* L nnnnnn C nnn R */
  133.      .colx         = .statusx+11
  134.      .insertx      = .statusx+15
  135.      .statustext   = 'L        C  '
  136.      .insertwidth=1
  137.    elseif sw>9 then
  138.       .linex        = .statusx
  139.       .colx         = .statusx+7
  140.       .insertx      = 0
  141.       .statustext   = ''
  142.    endif
  143.  
  144. defproc remove_all_but_one
  145.    /* delete multiple views of all files in all windows but current */
  146.    startw=.windowid
  147.    nextwindow
  148.    loop        /* for all windows */
  149.       getfileid s
  150.       w=.windowid
  151.       /* done? */
  152.       if w=startw then leave endif
  153.       /* get the first file in the next window in case we delete
  154.          this window */
  155.       nextwindow
  156.       getfileid nextw
  157.       activatefile s
  158.       loop       /* for all files in the window */
  159.          if .views > 1 then
  160.             quitview
  161.             /* quitting changes window if it's the last file */
  162.             if .windowid<> w then
  163.                /* next window before the quitview */
  164.                activatefile nextw
  165.                leave
  166.             endif
  167.             getfileid s
  168.             iterate
  169.          endif
  170.          nextfile
  171.          getfileid n
  172.          /* done? */
  173.          if n==s then nextwindow; leave endif
  174.       endloop
  175.    endloop
  176. compile if SHOW_MODIFY_METHOD
  177.    correct_modify_color()
  178. compile endif
  179.  
  180. defproc pnextwindow()   /* next window */
  181.    .box = 1
  182.    nextwindow
  183.    .box =2
  184.    call select_edit_keys()
  185.  
  186. defproc pzoom()   /* zoom window */
  187.    call start_screen()
  188. compile if SHOW_MODIFY_METHOD
  189.    correct_modify_color()
  190. compile endif
  191.  
  192. defproc pnextwindowstyle()
  193.    universal stage
  194.    if  stage=1 then
  195.       stage=2
  196.       call vertical2()
  197.    elseif stage=2 then
  198.       stage=3
  199.       call four_guys()
  200.    elseif stage=3 then
  201.       stage=4
  202.       call horizontal2()
  203.    else
  204.       call start_screen()
  205.    endif
  206.  
  207. defproc pnextfile()  -- Ver. 4.11:  Optional argument says to skip select_edit_keys
  208.    universal ZoomWindowStyle,messy
  209.    if messy then
  210.       .box = 1
  211.       nextwindow
  212.       .box=2
  213.    else
  214.       next_file
  215.    endif
  216.    if arg(1) then return; endif
  217.    call select_edit_keys()
  218. compile if JHwindow
  219.    if messy & (ZoomWindowStyle=5) then   -- Make sure filename is displayed
  220.       refresh
  221.       command_toggle; command_toggle
  222.    endif
  223. compile endif
  224.  
  225. defproc pprevfile()  -- Ver. 4.11:  Optional argument says to skip select_edit_keys
  226.    universal ZoomWindowStyle,messy
  227.    if messy then
  228.       .box = 1
  229.       prevwindow
  230.       .box=2
  231.    else
  232.       prevfile
  233.    endif
  234.    if arg(1) then return; endif
  235.    call select_edit_keys()
  236. compile if JHwindow
  237.    if messy & (ZoomWindowStyle=5) then   -- Make sure filename is displayed
  238.       refresh
  239.       command_toggle; command_toggle
  240.    endif
  241. compile endif
  242.  
  243. defproc psplitv()
  244.    universal stage
  245.    stage=2
  246.    call vertical2()
  247.  
  248. defproc psplith()
  249.    universal stage
  250.    stage=4
  251.    call horizontal2()
  252.  
  253. defproc psplit4()
  254.    universal stage
  255.    stage=3
  256.    call four_guys()
  257.  
  258. defproc setzoomwindow(style,x,y,scrheight,scrwidth)
  259.     universal messy
  260.    .messagewidth= scrwidth
  261.  
  262.    if style=1 then
  263.       call windowstyle1(x,y,scrheight,scrwidth)
  264.       .filenamecolor=FILENAMECOLOR;.monofilenamecolor=MONOFILENAMECOLOR
  265.       .statuscolor=STATUSCOLOR;.monostatuscolor=MONOSTATUSCOLOR
  266.    elseif style=2 then
  267.       call windowstyle1(x,y,scrheight,scrwidth)
  268.       .windowheight=.windowheight+1
  269.       .commandy=.commandy+1
  270.       .commandwidth=scrwidth-.statuswidth
  271.       .filenamecolor=.commandcolor;.monofilenamecolor=.monocommandcolor
  272.       .statuscolor=.commandcolor;.monostatuscolor=.monocommandcolor
  273.    elseif style=3 then
  274.       /* how about filename and status at the top */
  275.       call setzoomwindow(2,x,y,scrheight,scrwidth)
  276.       .windowy=.windowy+1
  277.       .windowheight=.windowheight-1
  278.       .commandwidth=scrwidth
  279.       .filenamey=y;.statusy=y
  280.       .filenamecolor=FILENAMECOLOR;.monofilenamecolor=MONOFILENAMECOLOR
  281.       .statuscolor=STATUSCOLOR;.monostatuscolor=MONOSTATUSCOLOR
  282.    elseif style=4 then
  283.       /* how about filename and status at the top */
  284.       /* and the command line at the top */
  285.       call setzoomwindow(3,x,y,scrheight,scrwidth)
  286.       .windowy=.windowy+1
  287.       .commandy=2
  288.    elseif style=5 then          -- Minimalist style from Jim Hurley
  289. ; Only one display line used for non-file display.  Messages may be truncated.
  290.       call windowstyle1(x,y,scrheight,scrwidth)
  291.       .windowheight=.windowheight+2
  292.       .commandy=.commandy+2
  293.       .statusy=.statusy+1
  294.       .filenamey=.filenamey+1
  295.       .commandwidth=scrwidth-.statuswidth
  296.       .messagewidth=.commandwidth
  297.       .messagex=.commandx;.messagey=.commandy
  298.       .filenamecolor=.commandcolor;.monofilenamecolor=.monocommandcolor
  299.       .statuscolor=.commandcolor;.monostatuscolor=.monocommandcolor
  300.       .functionkeytextcolor=.commandcolor
  301.       .monofunctionkeytextcolor=.monocommandcolor
  302.       .messagecolor=.commandcolor;.monomessagecolor=.monocommandcolor
  303.       /* We want only a single display line */
  304.       .functionkeytextheight=0
  305.    endif
  306.  
  307. ; Ver. 4.11:  Optional fifth argument (box style).  Normally, this routine is
  308. ; called to create an E window.  If the fifth argument is present, this routine
  309. ; will act like sizelist:  pops up a window, omitting status line stuff.
  310. defproc sizepopup(x,y,w,h)     /*box */
  311.    universal ZoomWindowStyle,messy
  312.    sw=screenwidth()
  313.    sh=screenheight()
  314.    oldboxwidth=.boxwidth
  315.    oldboxx = .boxx
  316.    .boxx         = max(min(x,sw-3),0)  -- JHWindow
  317.    .boxwidth     = max(10,min(w,sw+2 - .boxx))  -- JHWindow
  318.    if arg(5)='' then
  319.       if .boxwidth<17 then
  320.         .boxx = oldboxx
  321.         .boxwidth=oldboxwidth
  322.         return ''
  323.       endif
  324.       .box          = 2
  325.    else
  326.       .box          = arg(5)
  327.    endif
  328.    .boxy         = max(min(y,sh-5),0)
  329. compile if JHwindow
  330.    minboxheight= sh-.boxy
  331.    if messy & arg(5)='' then
  332.       if ZoomWindowStyle<>2 and ZoomWindowStyle<>5 then
  333.          minboxheight=minboxheight-1
  334.       elseif ZoomWindowStyle=5 then
  335.          minboxheight=minboxheight+1
  336.       endif
  337.    endif
  338.    .boxheight    = max(3,min(h,minboxheight))  -- JHWindow
  339. compile else
  340.    .boxheight    = max(3,min(h,sh-1 - .boxy - (ZoomWindowStyle=1)))
  341. compile endif
  342.    .windowx      = .boxx+1
  343.    .windowy      = .boxy+1
  344.    .windowwidth  = .boxwidth-2
  345.    .windowheight = .boxheight-2
  346.    if arg(5)<>'' then
  347.       .linex        = 0
  348.       .colx         = 0
  349.       .insertx      = 0
  350.       .statusx      = 0
  351.       .filenamex    = 0
  352.       return
  353.    endif
  354. compile if JHwindow
  355.    .filenamey    = .boxy+.boxheight-1   /* put name   on bottom of box */ -- JHW
  356. compile else
  357.    .filenamey    = .boxy
  358. compile endif
  359.    .filenamex    = .boxx+2
  360.    .filenamewidth= min(.boxwidth-4,40)
  361.    .statuswidth  =.filenamewidth
  362.    .statusx      =.filenamex
  363. compile if JHwindow
  364.    .statusy      = .boxy                /* put status on top    of box */ -- JHW
  365. compile else
  366.    .statusy      =.boxy+.boxheight-1    /* put status on bottom of box */
  367. compile endif
  368.    call make_status_fit()
  369.    if .commandy<screenheight()-1 then
  370.       .commandy=screenheight()-1
  371.    endif
  372.    .commandwidth=sw; .messagewidth=sw
  373.    .filenamecolor = FILENAMECOLOR; .monofilenamecolor = MONOFILENAMECOLOR
  374.    .statuscolor=STATUSCOLOR;.monostatuscolor=MONOSTATUSCOLOR
  375.    if ZoomWindowStyle=1 and not messy then
  376.       .commandy=.commandy-1
  377.    endif
  378.  
  379. defproc windowstyle1(x,y,scrheight,scrwidth)
  380.    call init_window(x,y,scrwidth,scrheight-3)
  381.    .box          = 0
  382.    .boxheight    = .windowheight +4
  383.    .commandy     = scrheight-2
  384.    .commandx     = x
  385.    .commandwidth = scrwidth
  386.    .filenamey    = scrheight-1
  387.    .filenamex    = x
  388.    .filenamewidth= scrwidth%2
  389.    .statusy      = .filenamey         /* scrheight-1  */
  390.    .statusx      = .filenamewidth+1   /* scrwidth%2+1 */
  391.    .statuswidth  = .filenamewidth     /* scrwidth%2   */
  392.    .statuscolor  = STATUSCOLOR; .monostatuscolor = MONOSTATUSCOLOR
  393.    .commandcolor = COMMANDCOLOR;.monocommandcolor=MONOCOMMANDCOLOR
  394.    .functionkeytextheight=1
  395.    call make_status_fit()
  396.  
  397. /**********************   COMMANDS  ******************************************/
  398.  
  399. defc windowstyle,ws=
  400.    universal ZoomWindowStyle,messy
  401.    w=arg(1)
  402.    if w=1 or w=2 or w=3 or w=4 or w=5 then
  403.       ZoomWindowStyle=w
  404.       call start_screen()
  405.    else
  406.       sayerror ZOOM_PROMPT__MSG ZoomWindowStyle'. 'CHOICES_ARE__MSG '1,2,3,4,5'
  407.    endif
  408.  
  409.  
  410. defc drag=
  411.    universal messy
  412.  
  413.    if messy then
  414.       sayerror DRAG__MSG
  415.       loop
  416.         hit_key = getkey()
  417.         if hit_key=enter or hit_key=esc then
  418.           leave
  419.         endif
  420.         if hit_key=right then
  421.           call sizepopup(.boxx+1,.boxy,.boxwidth,.boxheight)
  422.         elseif hit_key=left then
  423.           call sizepopup(.boxx-1,.boxy,.boxwidth,.boxheight)
  424.         elseif hit_key=up then
  425.           call sizepopup(.boxx,max(.boxy-1,1),.boxwidth,.boxheight)
  426.         elseif hit_key=down then
  427.           call sizepopup(.boxx,.boxy+1,.boxwidth,.boxheight)
  428.         endif
  429.         refresh
  430.         while testkey()<>'' do
  431.           k=getkey()
  432.         endwhile
  433.       endloop
  434.       sayerror 0
  435.    else
  436.       sayerror 'DRAG' MESSY_ONLY__MSG
  437.    endif
  438.  
  439. defc size=
  440.    universal messy
  441.  
  442.    if messy then
  443.       sayerror DRAG__MSG
  444. compile if JHwindow
  445.       if not .boxy then .boxy=1; endif
  446. compile endif
  447.       loop
  448.          hit_key = getkey()
  449.          if hit_key=enter or hit_key=esc then
  450.             leave
  451.          endif
  452.          if hit_key=right then
  453.             call sizepopup(.boxx,.boxy,.boxwidth+1,.boxheight)
  454.          elseif hit_key=left then
  455.             call sizepopup(.boxx,.boxy,.boxwidth-1,.boxheight)
  456.          elseif hit_key=up then
  457.             call sizepopup(.boxx,.boxy,.boxwidth,.boxheight-1)
  458.          elseif hit_key=down then
  459.             call sizepopup(.boxx,.boxy,.boxwidth,.boxheight+1)
  460.          endif
  461.          refresh
  462.          while testkey()<>'' do
  463.             k=getkey()
  464.          endwhile
  465.       endloop
  466.       sayerror 0
  467.    else
  468.       sayerror 'SIZE' MESSY_ONLY__MSG
  469.    endif
  470.  
  471.  
  472. ;  SZOOM   This command gets executed automatically by E, whenever E detects
  473. ;          that the screen size (rows or columns) has changed after a DOS
  474. ;          shell.  This does automatic resizing.
  475. ;          It tries to preserve whatever window configuration the user had.
  476. defc szoom
  477.    universal stage                /* window type */
  478.    universal ZoomWindowStyle      /* 4 different window style types */
  479.    universal messy                /* messy or tiled windows */
  480.  
  481.       -- 4.10:  make sure ALL windows get resized, in case editing multiple
  482.       -- files in messy mode.  Go around the windows till return to start.
  483.       -- Note:  This has the effect of zooming ALL windows to full-screen (as
  484.       -- if you pressed Ctrl-Z), even if you'd resized them with SIZE/DRAG.
  485.    call remove_all_but_one()    -- Don't start on a window that gets deleted.
  486.    startwindowid = .windowid
  487. compile if JHWindow
  488.    if messy then stage = 1; endif
  489. compile endif
  490.    loop
  491. compile if JHWindow=0
  492.       if messy then                  /* messy windows */
  493.          call setzoomwindow(ZoomWindowStyle,1,1,screenheight(),screenwidth())
  494.          sizepopup(1,1,screenwidth(),screenheight()-1)   -- This sets .box=2.
  495. ;;       if .windowid <> startwindowid then .box=1; endif
  496.       else                                      /* tiled windows */
  497. compile endif
  498.          if stage=1 then        /* what type of window ? */
  499.             call start_screen() /* regular */
  500.          elseif stage=2 then
  501.             call vertical2()    /* vertical window (2 view boxes) */
  502.          elseif stage=3 then
  503.             call four_guys()    /* four view boxes */
  504.          elseif stage=4 then
  505.             call horizontal2()  /* horizontal window (2 view boxes) */
  506.          else
  507.             call start_screen() /* default regular */
  508.          endif
  509. compile if JHWindow=0
  510.       endif
  511. compile endif
  512.       nextwindow
  513.       if .windowid = startwindowid then leave endif
  514.       .box = 1              -- Only the active window should get .box=2.
  515.    endloop
  516.  
  517.  
  518. ; jbl 2/5/89:  The DEFMODIFY method of setting color to show modified status
  519. ; works fine in EPM, which doesn't have split-screen windowing.  But in EOS2
  520. ; the user can hit a key like Ctrl-Z which does not change the fileid nor the
  521. ; modified state, but does change the screen colors.  So the DEFMODIFY event
  522. ; does not get invoked afterward and the colors are not corrected.
  523. ; This procedure checks for this situation (.modify > 0 but color wrong)
  524. ; and should be called after any split- or zoom-screen operation.
  525. ; LAM 2/10/89: For E3, there's no DEFMODIFY, but we do handle SHOW_MODIFY_METHOD
  526. ; in SELECT.E, so the following is needed for E3 and EOS2FAM, also.
  527. ;
  528. ; Remember that this file is not used at all by EPM, so no need to check that.
  529. ;
  530.  compile if SHOW_MODIFY_METHOD
  531. defproc correct_modify_color()
  532.    if .modify then
  533.   compile if SHOW_MODIFY_METHOD = 'FKTEXTCOLOR'
  534.       .functionkeytextcolor= MODIFIED_FKTEXTCOLOR
  535.   compile elseif SHOW_MODIFY_METHOD = 'COLOR'
  536.       .markcolor= MODIFIED_MARKCOLOR
  537.       .windowcolor= MODIFIED_WINDOWCOLOR
  538.   compile elseif SHOW_MODIFY_METHOD = 'TITLE'
  539.       .filenamecolor= MODIFIED_FILENAMECOLOR
  540.       .monofilenamecolor= MODIFIED_MONOFILENAMECOLOR
  541.   compile endif
  542.    endif
  543.  compile endif
  544.  
  545.  
  546. compile else        -- Don't want windows, so give minimum support:  <<<<<<<<<<<
  547.  
  548. ;  SZOOM   This command gets executed automatically by E, whenever E detects
  549. ;          that the screen size (rows or columns) has changed after a DOS
  550. ;          shell.  This does automatic resizing.
  551. defc szoom
  552.    startwindowid = .windowid
  553.    loop
  554.       call start_screen()
  555.       nextwindow
  556.       if .windowid = startwindowid then leave; endif
  557.    endloop
  558.  
  559. defproc start_screen
  560.    scrheight=screenheight(); scrwidth=screenwidth()
  561.    .messagewidth= scrwidth
  562.    call init_window(1,1,scrwidth,scrheight-3)
  563.    .box          = 0
  564.    .boxheight    = .windowheight +4
  565.    .commandy     = scrheight-2
  566.    .commandx     = 1
  567.    .commandwidth = scrwidth
  568.    .filenamey    = scrheight-1
  569.    .filenamex    = 1
  570.    .filenamewidth= scrwidth%2
  571.    .statusy      = .filenamey         /* scrheight-1  */
  572.    .statusx      = .filenamewidth+1   /* scrwidth%2+1 */
  573.    .statuswidth  = .filenamewidth     /* scrwidth%2   */
  574.    .statuscolor  = STATUSCOLOR; .monostatuscolor =MONOSTATUSCOLOR
  575.    .commandcolor = COMMANDCOLOR;.monocommandcolor=MONOCOMMANDCOLOR
  576.    .functionkeytextheight=1
  577. ;    make_status_fit --Limited version; just support 80 or 40 byte wide screen
  578.    if .statuswidth>38 then
  579.          /* Sample:                                        */
  580.          /*' Line nnnnnn  Col nnn  Replace  E vvvv  '      */
  581.          /* 0····*····1····*····2····*····3····*····4      */
  582.          /* 0         0         0         0         0      */
  583.       .linex        = .statusx+6
  584.       .colx         = .statusx+18
  585.       .insertx      = .statusx+23
  586.       .insertwidth  = 7
  587.       .statustext=' Line         Col                E 'EVERSION' '
  588.     else                             /* 0123456789ABCDEF */
  589.        .linex        = .statusx+2    /* L nnnnnn C nnn R */
  590.        .colx         = .statusx+11
  591.        .insertx      = .statusx+15
  592.        .statustext   = 'L        C  '
  593.        .insertwidth=1
  594.     endif
  595.    .boxheight=screenheight()+10
  596.    .filenamecolor=FILENAMECOLOR; .monofilenamecolor=MONOFILENAMECOLOR
  597.  
  598. defproc pnextfile()
  599.    next_file
  600.    if arg(1) then return; endif
  601.    call select_edit_keys()
  602.  
  603. defproc pprevfile()
  604.    prevfile
  605.    if arg(1) then return; endif
  606.    call select_edit_keys()
  607.  
  608. compile endif                                     -- <<<<<<<<<<<<<<<<<<<<<<<<<<<
  609.  
  610. defproc init_window(x,y,w,h)
  611.    .functionkeytextcolor=FUNCTIONKEYTEXTCOLOR
  612.    .monofunctionkeytextcolor=MONOFUNCTIONKEYTEXTCOLOR
  613.    .windowcolor     =WINDOWCOLOR
  614.    .monowindowcolor =MONOWINDOWCOLOR
  615.    .boxcolor        =BOXCOLOR
  616.    .monoboxcolor    =MONOBOXCOLOR
  617.    .cursorcolor     =CURSORCOLOR
  618.    .monocursorcolor =MONOCURSORCOLOR
  619.    .markcolor       =MARKCOLOR
  620.    .monomarkcolor   =MONOMARKCOLOR
  621.    .messagecolor    =MESSAGECOLOR
  622.    .monomessagecolor=MONOMESSAGECOLOR
  623.    .messagey        =screenheight()
  624.    .windowx         =x
  625.    .windowy         =y
  626.    .windowwidth     =w
  627.    .windowheight    =h
  628.    .boxx            =x-1
  629.    .boxwidth        =w+2
  630.    .boxy            =y-1
  631.  
  632.  
  633.