editcmddef.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. #ifndef __EDIT_CMD_DEF_H
  2. #define __EDIT_CMD_DEF_H
  3. /* in the distant future, keyboards will be invented with a
  4. seperate key for each one of these commands *sigh* */
  5. /* cursor movements */
  6. #define CK_No_Command -1
  7. #define CK_BackSpace 1
  8. #define CK_Delete 2
  9. #define CK_Enter 3
  10. #define CK_Page_Up 4
  11. #define CK_Page_Down 5
  12. #define CK_Left 6
  13. #define CK_Right 7
  14. #define CK_Word_Left 8
  15. #define CK_Word_Right 9
  16. #define CK_Up 10
  17. #define CK_Down 11
  18. #define CK_Home 12
  19. #define CK_End 13
  20. #define CK_Tab 14
  21. #define CK_Undo 15
  22. #define CK_Beginning_Of_Text 16
  23. #define CK_End_Of_Text 17
  24. #define CK_Scroll_Up 18
  25. #define CK_Scroll_Down 19
  26. #define CK_Return 20
  27. #define CK_Begin_Page 21
  28. #define CK_End_Page 22
  29. #define CK_Delete_Word_Left 23
  30. #define CK_Delete_Word_Right 24
  31. #define CK_Paragraph_Up 25
  32. #define CK_Paragraph_Down 26
  33. /* file commands */
  34. #define CK_Save 101
  35. #define CK_Load 102
  36. #define CK_New 103
  37. #define CK_Save_As 104
  38. /* block commands */
  39. #define CK_Mark 201
  40. #define CK_Copy 202
  41. #define CK_Move 203
  42. #define CK_Remove 204
  43. #define CK_Unmark 206
  44. #define CK_Save_Block 207
  45. #define CK_Column_Mark 208
  46. /* search and replace */
  47. #define CK_Find 301
  48. #define CK_Find_Again 302
  49. #define CK_Replace 303
  50. #define CK_Replace_Again 304
  51. /* misc */
  52. #define CK_Insert_File 401
  53. #define CK_Exit 402
  54. #define CK_Toggle_Insert 403
  55. #define CK_Help 404
  56. #define CK_Date 405
  57. #define CK_Refresh 406
  58. #define CK_Goto 407
  59. #define CK_Delete_Line 408
  60. #define CK_Delete_To_Line_End 409
  61. #define CK_Delete_To_Line_Begin 410
  62. #define CK_Man_Page 411
  63. #define CK_Sort 412
  64. #define CK_Mail 413
  65. #define CK_Cancel 414
  66. #define CK_Complete 415
  67. #define CK_Paragraph_Format 416
  68. /* application control */
  69. #define CK_Save_Desktop 451
  70. #define CK_New_Window 452
  71. #define CK_Cycle 453
  72. #define CK_Menu 454
  73. #define CK_Save_And_Quit 455
  74. #define CK_Run_Another 456
  75. #define CK_Check_Save_And_Quit 457
  76. #define CK_Maximise 458
  77. /* macro */
  78. #define CK_Begin_Record_Macro 501
  79. #define CK_End_Record_Macro 502
  80. #define CK_Delete_Macro 503
  81. /* highlight commands */
  82. #define CK_Page_Up_Highlight 604
  83. #define CK_Page_Down_Highlight 605
  84. #define CK_Left_Highlight 606
  85. #define CK_Right_Highlight 607
  86. #define CK_Word_Left_Highlight 608
  87. #define CK_Word_Right_Highlight 609
  88. #define CK_Up_Highlight 610
  89. #define CK_Down_Highlight 611
  90. #define CK_Home_Highlight 612
  91. #define CK_End_Highlight 613
  92. #define CK_Beginning_Of_Text_Highlight 614
  93. #define CK_End_Of_Text_Highlight 615
  94. #define CK_Begin_Page_Highlight 616
  95. #define CK_End_Page_Highlight 617
  96. #define CK_Scroll_Up_Highlight 618
  97. #define CK_Scroll_Down_Highlight 619
  98. #define CK_Paragraph_Up_Highlight 620
  99. #define CK_Paragraph_Down_Highlight 621
  100. /* X clipboard operations */
  101. #define CK_XStore 701
  102. #define CK_XCut 702
  103. #define CK_XPaste 703
  104. #define CK_Selection_History 704
  105. #ifdef MIDNIGHT /* cooledit now has its own full-featured script editor and executor */
  106. /*
  107. Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
  108. shell_cmd[i] must process the file ~/cooledit.block and output ~/cooledit.block
  109. which is then inserted into the text in place of the original block. shell_cmd[i] must
  110. also produce a file homedir/cooledit.error . If this file is not empty an error will
  111. have been assumed to have occured, and the block will not be replaced.
  112. TODO: bring up a viewer to display the error message instead of inserting
  113. it into the text, which is annoying.
  114. */
  115. #define CK_Pipe_Block(i) (1000+(i))
  116. #define SHELL_COMMANDS_i {"/.cedit/edit.indent.rc", "/.cedit/edit.spell.rc", /* and so on */ 0};
  117. #else
  118. #define CK_User_Command(i) (1000+(i))
  119. #endif
  120. /* execute a macro */
  121. #define CK_Macro(i) (2000+(i))
  122. #define CK_Last_Macro CK_Macro(0x7FFF)
  123. #endif