home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / canon / bj364 / bj364d1.exe / BJL.BIN / SOURCE.ZIP / HOT_KEY.C < prev    next >
C/C++ Source or Header  |  1996-04-16  |  24KB  |  638 lines

  1. // ========================================================================================
  2. //    BJ Printer Setup Utility Program
  3. //    DOS Base
  4. //    BJ Printer (such as the A250 and A240)
  5. //
  6. //    1. Version 1.00 [August 18, '95]       : Tsukasa Jackie AIBA    : Created new
  7. //    2. Version 1.01 [September 21, '95]    : Tsukasa Jackie AIBA    : Added A240
  8. //    3. Version 1.02 [September 26, '95]    : Tsukasa Jackie AIBA    : Added mono display
  9. //    4. Version 1.03 [March 12, '96]        : Tsukasa Jackie AIBA    : Added MultiPASS C2500
  10. //    5. Version 1.10 [April 30, '96]        : Tsukasa Jackie AIBA    : Added BJC-80/240/4200/4550
  11. //
  12. //    Copyright Canon Information Systems, Inc. 1995, 1996
  13. // ========================================================================================
  14.  
  15. /*
  16.     HOT_KEY.c
  17.  
  18.     C-scape for DOS version 4.0.1. Software
  19.     Copyright (c) 1992 by Liant Software Corporation.
  20.     ALL RIGHTS RESERVED.
  21.  
  22.     This program is A250 setup utility how to use a mouse with C-scape for DOS version 4.0.1.
  23.  
  24.     You can select windows by moving the mouse over the desired window.
  25.     When you are finished you can quit by pressing ESC or by 
  26.     clicking the mouse on the field that says "exit".
  27.  
  28. */
  29.  
  30. // ***********************************************************************
  31. //        include standard headers
  32. // ***********************************************************************
  33.  
  34. #include    <stdio.h>
  35. #include    <string.h>
  36. #include    <time.h>                // for popdecl.h
  37.  
  38. // ***********************************************************************
  39. //        include original headers
  40. // ***********************************************************************
  41.  
  42. #include    "..\h\cscape.h"
  43. #include    "..\h\ostdlib.h"        // for exit(), otolower()
  44. #include    "..\h\popdecl.h"        // for popups
  45. #include    "..\h\scancode.h"       // for event codes
  46. #include    "..\h\useful.h"         // for STATE_2NAMES
  47. #include    "..\h\cmwinobj.h"       // for bcwin_Class
  48. #include    "..\h\dpref.h"
  49. #include    "..\h\ogldecl.h"
  50. #include    "..\h\slug.h"
  51. #include    "..\h\pmwinobj.h"       // for pmwin stuff
  52. #include    "..\h\disppvs.h"        // for PCCOLS, disp_GetPixval, disp_FreePixval
  53. #include    "..\h\framer.h"
  54. #include    "..\h\oakalloc.h"       // for omalloc of icon title string
  55. #include    "..\h\oaktag.h"         // tags for omalloc
  56. #include    "..\h\helpdecl.h"       // for the help system
  57.  
  58. #include    "bjsetup.h"
  59.  
  60. // ***********************************************************************
  61. //  function name   : boolean spc_Jump(sed_type sed, int scancode)
  62. //  function        : Tab key's jump next window
  63. //  input           : sed_type        sed
  64. //                  : int             scancode
  65. //  output          : TRUE
  66. //                  : FALSE
  67. // ***********************************************************************
  68. boolean spc_Jump(sed_type sed, int scancode)
  69. {
  70.     mev_struct     mev;
  71.     int            a240_order, autoPowerOn;
  72.  
  73.     if(printerID >= 4)
  74.         autoPowerOn = 1;
  75.     else
  76.         autoPowerOn = 0;
  77.     if((printerID >= 2) && (printerID <= 4))
  78.         a240_order = 1;
  79.     else
  80.     {
  81.         if(printerID >= MPC2500)
  82.             a240_order  = -1;
  83.         else
  84.             a240_order = 0;
  85.     }
  86.  
  87. //// Help 2
  88.     if((sed_GetLabel(sed) == 1) & (sed_GetFieldNo(sed_GetWin(sedlist[3])) == 5))
  89.     {
  90.         if(scancode == FN1)
  91.         {
  92.             kb_Stuff(ENTER);
  93.             return(TRUE);
  94.         }
  95.     }
  96.  
  97.     switch(scancode)
  98.     {
  99.         case TAB:
  100.             switch(sed_GetLabel(sed))                           // Go next window
  101.             {
  102.                 case 2:        // File : sedlist[0]
  103.                     sed_ToggleExit(sed);                        // Quit this window
  104.                     sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  105.                     break;
  106.                 case 3:        // Action : sedlist[1]
  107.                     sed_ToggleExit(sed);                        // Quit this window
  108.                     sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  109.                     break;
  110.                 case 4:        // Param : sedlist[2]
  111.                     sed_ToggleExit(sed);                        // Quit this window
  112.                     sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  113.                     break;
  114.                 case 1:        // Menu : sedlist[3]
  115.                     switch(sed_GetFieldNo(sed_GetWin(sedlist[3])))
  116.                     {
  117.                         case 0:
  118.                             sed_GotoField(sed_GetWin(sedlist[3]), 1);
  119.                             break;
  120.                         case 1:
  121.                             sed_GotoField(sed_GetWin(sedlist[3]), 2);
  122.                             break;
  123.                         case 2:
  124.                             sed_GotoField(sed_GetWin(sedlist[3]), 3);
  125.                             break;
  126.                         case 3:
  127.                             sed_GotoField(sed_GetWin(sedlist[3]), 4);
  128.                             break;
  129.                         case 4:
  130.                             sed_GotoLastField(sed_GetWin(sedlist[3]));
  131.                             break;
  132.                         case 5:
  133.                             sed_ToggleExit(sed);                // Quit this window
  134.                             sed_SetNextWin(sed, sed_GetWin(sedlist[0]));
  135.                             break;
  136.                     }
  137.                 default:
  138.                     break;
  139.             }
  140.             return(TRUE);
  141.  
  142.         case SHFT_TAB:
  143.             switch(sed_GetLabel(sed))                           // Go next window
  144.             {
  145.                 case 2:
  146.                     sed_ToggleExit(sed);                        // Quit this window
  147.                     sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  148.                     sed_GotoLastField(sed_GetWin(sedlist[3]));
  149.                     break;
  150.                 case 3:
  151.                     sed_ToggleExit(sed);                        // Quit this window
  152.                     sed_SetNextWin(sed, sed_GetWin(sedlist[0]));
  153.                     break;
  154.                 case 4:
  155.                     sed_ToggleExit(sed);                        // Quit this window
  156.                     sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  157.                     break;
  158.                 case 1:
  159.                     switch(sed_GetFieldNo(sed_GetWin(sedlist[3])))
  160.                     {
  161.                         case 5:
  162.                             sed_GotoField(sed_GetWin(sedlist[3]), 4);
  163.                             break;
  164.                         case 4:
  165.                             sed_GotoField(sed_GetWin(sedlist[3]), 3);
  166.                             break;
  167.                         case 3:
  168.                             sed_GotoField(sed_GetWin(sedlist[3]), 2);
  169.                             break;
  170.                         case 2:
  171.                             sed_GotoField(sed_GetWin(sedlist[3]), 1);
  172.                             break;
  173.                         case 1:
  174.                             sed_GotoFirstField(sed_GetWin(sedlist[3]));
  175.                             break;
  176.                         case 0:
  177.                             sed_ToggleExit(sed);                // Quit this window
  178.                             sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  179.                             break;
  180.                     }
  181.                 default:
  182.                     break;
  183.             }
  184.             return(TRUE);
  185.  
  186.         case DOWN:                             // for wrap around scrolling
  187.             switch(sed_GetLabel(sed))
  188.             {
  189.                 case 2: case 3: case 4:
  190.                     if (sed_IncField(sed) == SED_STUCK)
  191.                         sed_GotoFirstField(sed);                    
  192.                     break;
  193.                 default:
  194.                     break;
  195.             }
  196.             return(TRUE);
  197.  
  198.  
  199.         case UP:                               // for wrap around scrolling
  200.             switch(sed_GetLabel(sed))                     
  201.             {
  202.                 case 2: case 3: case 4:
  203.                     if (sed_DecField(sed) == SED_STUCK)
  204.                         sed_GotoLastField(sed);                    
  205.                     break;
  206.                 default:
  207.                     break;
  208.             }
  209.             return(TRUE);
  210.  
  211.  
  212. //// Exit
  213.         case FN10:
  214.             sed_ToggleExit(sed);                                // Quit this window
  215.             sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  216.             return(TRUE);
  217.  
  218. //// Status
  219.         case FN5:
  220.             if(sed != sed_GetWin(sedlist[3]))
  221.             {
  222.                 sed_ToggleExit(sed);                            // Quit this window
  223.                 sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  224.             }
  225.             sed_GotoField(sed_GetWin(sedlist[3]), 1);
  226.             return(TRUE);
  227.  
  228. //// Send
  229.         case FN6:
  230.             if(sed != sed_GetWin(sedlist[3]))
  231.             {
  232.                 sed_ToggleExit(sed);                            // Quit this window
  233.                 sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  234.             }
  235.             sed_GotoField(sed_GetWin(sedlist[3]), 2);
  236.             return(TRUE);
  237.  
  238. //// Default
  239.         case FN7:
  240.             if(sed != sed_GetWin(sedlist[3]))
  241.             {
  242.                 sed_ToggleExit(sed);                            // Quit this window
  243.                 sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  244.             }
  245.             sed_GotoField(sed_GetWin(sedlist[3]), 3);
  246.             return(TRUE);
  247.  
  248. //// About
  249.         case FN8:
  250.             if(sed != sed_GetWin(sedlist[3]))
  251.             {
  252.                 sed_ToggleExit(sed);                            // Quit this window
  253.                 sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  254.             }
  255.             sed_GotoField(sed_GetWin(sedlist[3]), 4);
  256.             return(TRUE);
  257. //// Help 1
  258.         case FN9:
  259.             if(sed != sed_GetWin(sedlist[3]))
  260.             {
  261.                 sed_ToggleExit(sed);                            // Quit this window
  262.                 sed_SetNextWin(sed, sed_GetWin(sedlist[3]));
  263.             }
  264.             sed_GotoLastField(sed_GetWin(sedlist[3]));
  265.             return(TRUE);
  266.  
  267. // ------------------------------------------------------------------------------------
  268. //// Printer
  269.         case CTRL_P:
  270.             if(sed != sed_GetWin(sedlist[0]))
  271.             {
  272.                 sed_ToggleExit(sed);                            // Quit this window
  273.                 sed_SetNextWin(sed, sed_GetWin(sedlist[0]));
  274.             }
  275.             sed_GotoFirstField(sed_GetWin(sedlist[0]));
  276.             return(TRUE);
  277.  
  278. //// Setting Mode
  279.         case CTRL_M:
  280.             if(sed != sed_GetWin(sedlist[0]))
  281.             {
  282.                 sed_ToggleExit(sed);                            // Quit this window
  283.                 sed_SetNextWin(sed, sed_GetWin(sedlist[0]));
  284.             }
  285.             sed_GotoField(sed_GetWin(sedlist[0]), 1);
  286.             return(TRUE);
  287.  
  288. //// Open File...
  289.         case CTRL_O:
  290.             if(sed != sed_GetWin(sedlist[0]))
  291.             {
  292.                 sed_ToggleExit(sed);                            // Quit this window
  293.                 sed_SetNextWin(sed, sed_GetWin(sedlist[0]));
  294.             }
  295.             sed_GotoField(sed_GetWin(sedlist[0]), 2);
  296.             return(TRUE);
  297.  
  298. //// Save File...
  299.         case CTRL_S:
  300.             if(sed != sed_GetWin(sedlist[0]))
  301.             {
  302.                 sed_ToggleExit(sed);                            // Quit this window
  303.                 sed_SetNextWin(sed, sed_GetWin(sedlist[0]));
  304.             }
  305.             sed_GotoField(sed_GetWin(sedlist[0]), 3);
  306.             return(TRUE);
  307.  
  308. //// Delete File...
  309.         case CTRL_D:
  310.             if(sed != sed_GetWin(sedlist[0]))
  311.             {
  312.                 sed_ToggleExit(sed);                            // Quit this window
  313.                 sed_SetNextWin(sed, sed_GetWin(sedlist[0]));
  314.             }
  315.             sed_GotoLastField(sed_GetWin(sedlist[0]));
  316.             return(TRUE);
  317. // --------------------------------------------------------------------------------
  318. //// Power Off
  319.         case ALT_1:
  320.             if(sed != sed_GetWin(sedlist[1]))
  321.             {
  322.                 sed_ToggleExit(sed);                            // Quit this window
  323.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  324.             }
  325.             sed_GotoFirstField(sed_GetWin(sedlist[1]));
  326.             return(TRUE);
  327.  
  328. //// Reset Printer
  329.         case ALT_2:
  330.             if(sed != sed_GetWin(sedlist[1]))
  331.             {
  332.                 sed_ToggleExit(sed);                            // Quit this window
  333.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  334.             }
  335.             sed_GotoField(sed_GetWin(sedlist[1]), 1);
  336.             return(TRUE);
  337.  
  338. //// Eject Page
  339.         case ALT_3:
  340.             if(sed != sed_GetWin(sedlist[1]))
  341.             {
  342.                 sed_ToggleExit(sed);                            // Quit this window
  343.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  344.             }
  345.             sed_GotoField(sed_GetWin(sedlist[1]), 2);
  346.             return(TRUE);
  347.  
  348. //// Set Control Mode
  349.         case ALT_4:
  350.             if(sed != sed_GetWin(sedlist[1]))
  351.             {
  352.                 sed_ToggleExit(sed);                            // Quit this window
  353.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  354.             }
  355.             sed_GotoField(sed_GetWin(sedlist[1]), 3);
  356.             return(TRUE);
  357.  
  358. //// Print Test Pattern
  359.         case ALT_5:
  360.             if(sed != sed_GetWin(sedlist[1]))
  361.             {
  362.                 sed_ToggleExit(sed);                            // Quit this window
  363.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  364.             }
  365.             sed_GotoField(sed_GetWin(sedlist[1]), 4);
  366.             return(TRUE);
  367.  
  368. //// Print Settings
  369.         case ALT_6:
  370.             if(sed != sed_GetWin(sedlist[1]))
  371.             {
  372.                 sed_ToggleExit(sed);                            // Quit this window
  373.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  374.             }
  375.             sed_GotoField(sed_GetWin(sedlist[1]), 5);
  376.             return(TRUE);
  377.  
  378. //// Change Ink Cartridge
  379.         case ALT_7:
  380.             if(sed != sed_GetWin(sedlist[1]))
  381.             {
  382.                 sed_ToggleExit(sed);                            // Quit this window
  383.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  384.             }
  385.             sed_GotoField(sed_GetWin(sedlist[1]), 6);
  386.             return(TRUE);
  387.  
  388. //// Clean Ink Head
  389.         case ALT_8:
  390.             if(sed != sed_GetWin(sedlist[1]))
  391.             {
  392.                 sed_ToggleExit(sed);                            // Quit this window
  393.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  394.             }
  395.             sed_GotoField(sed_GetWin(sedlist[1]), 7);
  396.             return(TRUE);
  397.  
  398. //// Printer Preset Status
  399.         case ALT_9:
  400.             if(sed != sed_GetWin(sedlist[1]))
  401.             {
  402.                 sed_ToggleExit(sed);                            // Quit this window
  403.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  404.             }
  405.             sed_GotoField(sed_GetWin(sedlist[1]), 8);
  406.             return(TRUE);
  407.  
  408. //// Dump Mode
  409.         case ALT_0:
  410.             if(sed != sed_GetWin(sedlist[1]))
  411.             {
  412.                 sed_ToggleExit(sed);                            // Quit this window
  413.                 sed_SetNextWin(sed, sed_GetWin(sedlist[1]));
  414.             }
  415.             sed_GotoLastField(sed_GetWin(sedlist[1]));
  416.             return(TRUE);
  417.  
  418. // --------------------------------------------------------------------------------
  419.  
  420. //// Paper Selection
  421.         case ALT_P:
  422.             if(sed != sed_GetWin(sedlist[2]))
  423.             {
  424.                 sed_ToggleExit(sed);                            // Quit this window
  425.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  426.             }
  427.             sed_GotoFirstField(sed_GetWin(sedlist[2]));
  428.             return(TRUE);
  429.  
  430. //// Print Mode
  431.         case ALT_M:
  432.             if(sed != sed_GetWin(sedlist[2]))
  433.             {
  434.                 sed_ToggleExit(sed);                            // Quit this window
  435.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  436.             }
  437.             sed_GotoField(sed_GetWin(sedlist[2]), 1);
  438.             return(TRUE);
  439.  
  440. //// Smoothing
  441.         case ALT_S:
  442.             if(sed != sed_GetWin(sedlist[2]))
  443.             {
  444.                 sed_ToggleExit(sed);                            // Quit this window
  445.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  446.             }
  447.             sed_GotoField(sed_GetWin(sedlist[2]), 2);
  448.             return(TRUE);
  449.  
  450. //// Reduction
  451.         case ALT_U:
  452.             if(sed != sed_GetWin(sedlist[2]))
  453.             {
  454.                 sed_ToggleExit(sed);                            // Quit this window
  455.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  456.             }
  457.             sed_GotoField(sed_GetWin(sedlist[2]), 3);
  458.             return(TRUE);
  459.  
  460. //// Auto Power On
  461.         case ALT_E:
  462.             if(sed != sed_GetWin(sedlist[2]))
  463.             {
  464.                 sed_ToggleExit(sed);                            // Quit this window
  465.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  466.             }
  467.             sed_GotoField(sed_GetWin(sedlist[2]), a240_order+3);
  468.             return(TRUE);
  469.  
  470. //// Auto Power Off
  471.         case ALT_W:
  472.             if(sed != sed_GetWin(sedlist[2]))
  473.             {
  474.                 sed_ToggleExit(sed);                            // Quit this window
  475.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  476.             }
  477.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+3);
  478.             return(TRUE);
  479.  
  480. //// Font
  481.         case ALT_F:
  482.             if(sed != sed_GetWin(sedlist[2]))
  483.             {
  484.                 sed_ToggleExit(sed);                            // Quit this window
  485.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  486.             }
  487.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+4);
  488.             return(TRUE);
  489.  
  490. //// Code Page
  491.         case ALT_D:
  492.             if(sed != sed_GetWin(sedlist[2]))
  493.             {
  494.                 sed_ToggleExit(sed);                            // Quit this window
  495.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  496.             }
  497.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+5);
  498.             return(TRUE);
  499.  
  500. //// Page Length
  501.         case ALT_L:
  502.             if(sed != sed_GetWin(sedlist[2]))
  503.             {
  504.                 sed_ToggleExit(sed);                            // Quit this window
  505.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  506.             }
  507.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+6);
  508.             return(TRUE);
  509.  
  510. //// Character Set
  511.         case ALT_H:
  512.             if(sed != sed_GetWin(sedlist[2]))
  513.             {
  514.                 sed_ToggleExit(sed);                            // Quit this window
  515.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  516.             }
  517.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+7);
  518.             return(TRUE);
  519.  
  520. //// Text Scale
  521.         case ALT_T:
  522.             if(sed != sed_GetWin(sedlist[2]))
  523.             {
  524.                 sed_ToggleExit(sed);                            // Quit this window
  525.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  526.             }
  527.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+8);
  528.             return(TRUE);
  529.  
  530. //// Download Buffer
  531.         case ALT_B:
  532.             if(sed != sed_GetWin(sedlist[2]))
  533.             {
  534.                 sed_ToggleExit(sed);                            // Quit this window
  535.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  536.             }
  537.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+9);
  538.             return(TRUE);
  539.  
  540. //// Auto LF
  541.         case ALT_A:
  542.             if(sed != sed_GetWin(sedlist[2]))
  543.             {
  544.                 sed_ToggleExit(sed);                            // Quit this window
  545.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  546.             }
  547.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+10);
  548.             return(TRUE);
  549.  
  550. //// Auto CR
  551.         case ALT_R:
  552.             if(sed != sed_GetWin(sedlist[2]))
  553.             {
  554.                 sed_ToggleExit(sed);                            // Quit this window
  555.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  556.             }
  557.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+11);
  558.             return(TRUE);
  559.  
  560. //// Auto AGM
  561.         case ALT_G:
  562.             if(sed != sed_GetWin(sedlist[2]))
  563.             {
  564.                 sed_ToggleExit(sed);                            // Quit this window
  565.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  566.             }
  567.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+12);
  568.             return(TRUE);
  569.  
  570. //// International
  571.         case ALT_I:
  572.             if(sed != sed_GetWin(sedlist[2]))
  573.             {
  574.                 sed_ToggleExit(sed);                            // Quit this window
  575.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  576.             }
  577.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+13);
  578.             return(TRUE);
  579.  
  580. //// Top Margin
  581.         case ALT_O:
  582.             if(sed != sed_GetWin(sedlist[2]))
  583.             {
  584.                 sed_ToggleExit(sed);                            // Quit this window
  585.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  586.             }
  587.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+14);
  588.             return(TRUE);
  589.  
  590. //// Font Lock
  591.         case ALT_C:
  592.             if(sed != sed_GetWin(sedlist[2]))
  593.             {
  594.                 sed_ToggleExit(sed);                            // Quit this window
  595.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  596.             }
  597.             sed_GotoField(sed_GetWin(sedlist[2]), autoPowerOn+a240_order+15);
  598.             return(TRUE);
  599.  
  600. //// Port
  601.         case ALT_N:
  602.             if(sed != sed_GetWin(sedlist[2]))
  603.             {
  604.                 sed_ToggleExit(sed);                            // Quit this window
  605.                 sed_SetNextWin(sed, sed_GetWin(sedlist[2]));
  606.             }
  607.             sed_GotoLastField(sed_GetWin(sedlist[2]));
  608.             return(TRUE);
  609.  
  610. // ---------------------------------------------------------------------------------
  611.  
  612.         case MOU_CLICK:
  613.             win_MouseCurrEvent(&mev);
  614.             if((sed_GetLabel(sed) != 1) | (sed_GetFieldNo(sed_GetWin(sedlist[3])) != 5))
  615.             {
  616.                 if(mev_IsButton2Down(&mev) | mev_IsButton3Down(&mev))
  617.                 {
  618.                     kb_Stuff(FN1);
  619.                     return(TRUE);
  620.                 }
  621.             }
  622.  
  623.             if(sed == sed_GetWin(sedlist[3]))
  624.                 kb_Stuff(ENTER);
  625.  
  626.         case ENTER:
  627.             if(sed == sed_GetWin(sedlist[2]))
  628.                 kb_Stuff(RIGHT);
  629.             else
  630.                 return(FALSE);
  631.  
  632.         case MOU_NOFIELD:
  633.             return(TRUE);            // Keep mouse events from exiting program
  634.  
  635.     }
  636.     return(FALSE);
  637. }
  638.