home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / text / edit / FrexxEdA.lha / FrexxEd / fpl / FrexxEdMain.FPL < prev    next >
Text File  |  1995-08-06  |  1KB  |  44 lines

  1. export int MySearch(int flag)    /* 0=forward, 1=backward */
  2. {
  3.   int ret;
  4.   if (flag==0)
  5.     SearchSet("f+");
  6.   else if (flag==1)
  7.     SearchSet("f-");
  8.   ret=Search();
  9.   if (ret<0) {
  10.     ReturnStatus(ret);    /* Some error occured */
  11.     DisplayBeep();
  12.   }
  13. }
  14.  
  15. export int Home()   { GotoLine(ReadInfo("line")); }
  16. export int End()    { GotoLine(ReadInfo("line"), -1); }
  17. export int Top()    { GotoLine(1); }
  18. export int Bottom() { GotoLine(-1); }
  19.  
  20. /*************************************************************
  21.  *
  22.  * While FrexxEd has a minimum of key assigns, we'll have to 
  23.  * assign some keys that we like ourself.
  24.  *
  25.  ****/
  26.     /* Cursor movements key */
  27. AssignKey("Home();", "Shift 'Left'");
  28. AssignKey("End();", "Shift 'Right'");
  29. AssignKey("Top();", "Control 'Up'");
  30. AssignKey("Bottom();", "Control 'Down'");
  31. AssignKey("PlaceCursor();", "MouseLeft");
  32. AssignKey("PlaceCursor();", "MouseLeftDrag");
  33. AssignKey("BlockMark();", "MouseLeftDouble");
  34.  
  35. AssignKey("ResizeView(ReadInfo(\"view_lines\")-2);", "CTRL Shift 'Up'");
  36. AssignKey("ResizeView(ReadInfo(\"view_lines\")+2);", "CTRL Shift 'Down'");
  37.  
  38. AssignKey("{ int ret; SearchSet(\"f-\"); if ((ret=SearchSet())>=0) { if (Search()<0) DisplayBeep(); } else ReturnStatus(ret); }", "Amiga A");
  39.  
  40.     /* Set the height on the current view to the half */
  41. AssignKey("ResizeView(ReadInfo(\"view_lines\")/2);", "Amiga 2");
  42.  
  43. Hook("WindowClose", "QuitAll();");
  44.