Update for OpenOffice and StarOffice viewer.
[midnight-commander.git] / edit / editcmddef.h
blob2135376196a3fbfe9383b4decc3cb21fa71a402a
1 #ifndef MC_EDIT_CMD_DEF_H
2 #define MC_EDIT_CMD_DEF_H
4 /* in the distant future, keyboards will be invented with a
5 separate key for each one of these commands *sigh* */
7 /* special commands */
8 #define CK_Insert_Char -1
9 #define CK_Ignore_Key 0
11 /* cursor movements */
12 #define CK_BackSpace 1
13 #define CK_Delete 2
14 #define CK_Enter 3
15 #define CK_Page_Up 4
16 #define CK_Page_Down 5
17 #define CK_Left 6
18 #define CK_Right 7
19 #define CK_Word_Left 8
20 #define CK_Word_Right 9
21 #define CK_Up 10
22 #define CK_Down 11
23 #define CK_Home 12
24 #define CK_End 13
25 #define CK_Tab 14
26 #define CK_Undo 15
27 #define CK_Beginning_Of_Text 16
28 #define CK_End_Of_Text 17
29 #define CK_Scroll_Up 18
30 #define CK_Scroll_Down 19
31 #define CK_Return 20
32 #define CK_Begin_Page 21
33 #define CK_End_Page 22
34 #define CK_Delete_Word_Left 23
35 #define CK_Delete_Word_Right 24
36 #define CK_Paragraph_Up 25
37 #define CK_Paragraph_Down 26
40 /* file commands */
41 #define CK_Save 101
42 #define CK_Load 102
43 #define CK_New 103
44 #define CK_Save_As 104
46 /* block commands */
47 #define CK_Mark 201
48 #define CK_Copy 202
49 #define CK_Move 203
50 #define CK_Remove 204
51 #define CK_Unmark 206
52 #define CK_Save_Block 207
53 #define CK_Column_Mark 208
55 /* search and replace */
56 #define CK_Find 301
57 #define CK_Find_Again 302
58 #define CK_Replace 303
59 #define CK_Replace_Again 304
60 #define CK_Complete_Word 305
62 /* debugger commands */
63 #define CK_Debug_Start 350
64 #define CK_Debug_Stop 351
65 #define CK_Debug_Toggle_Break 352
66 #define CK_Debug_Clear 353
67 #define CK_Debug_Next 354
68 #define CK_Debug_Step 355
69 #define CK_Debug_Back_Trace 356
70 #define CK_Debug_Continue 357
71 #define CK_Debug_Enter_Command 358
72 #define CK_Debug_Until_Curser 359
74 /* misc */
75 #define CK_Insert_File 401
76 #define CK_Exit 402
77 #define CK_Toggle_Insert 403
78 #define CK_Help 404
79 #define CK_Date 405
80 #define CK_Refresh 406
81 #define CK_Goto 407
82 #define CK_Delete_Line 408
83 #define CK_Delete_To_Line_End 409
84 #define CK_Delete_To_Line_Begin 410
85 #define CK_Man_Page 411
86 #define CK_Sort 412
87 #define CK_Mail 413
88 #define CK_Cancel 414
89 #define CK_Complete 415
90 #define CK_Paragraph_Format 416
91 #define CK_Util 417
92 #define CK_Type_Load_Python 418
93 #define CK_Find_File 419
94 #define CK_Ctags 420
95 #define CK_Match_Bracket 421
96 #define CK_Terminal 422
97 #define CK_Terminal_App 423
98 #define CK_ExtCmd 424
100 #define CK_User_Menu 425
101 /* application control */
102 #define CK_Save_Desktop 451
103 #define CK_New_Window 452
104 #define CK_Cycle 453
105 #define CK_Menu 454
106 #define CK_Save_And_Quit 455
107 #define CK_Run_Another 456
108 #define CK_Check_Save_And_Quit 457
109 #define CK_Maximize 458
111 #define CK_Toggle_Syntax 480
113 /* macro */
114 #define CK_Begin_Record_Macro 501
115 #define CK_End_Record_Macro 502
116 #define CK_Delete_Macro 503
118 /* book mark */
119 #define CK_Toggle_Bookmark 550
120 #define CK_Flush_Bookmarks 551
121 #define CK_Next_Bookmark 552
122 #define CK_Prev_Bookmark 553
124 /* highlight commands */
125 #define CK_Page_Up_Highlight 604
126 #define CK_Page_Down_Highlight 605
127 #define CK_Left_Highlight 606
128 #define CK_Right_Highlight 607
129 #define CK_Word_Left_Highlight 608
130 #define CK_Word_Right_Highlight 609
131 #define CK_Up_Highlight 610
132 #define CK_Down_Highlight 611
133 #define CK_Home_Highlight 612
134 #define CK_End_Highlight 613
135 #define CK_Beginning_Of_Text_Highlight 614
136 #define CK_End_Of_Text_Highlight 615
137 #define CK_Begin_Page_Highlight 616
138 #define CK_End_Page_Highlight 617
139 #define CK_Scroll_Up_Highlight 618
140 #define CK_Scroll_Down_Highlight 619
141 #define CK_Paragraph_Up_Highlight 620
142 #define CK_Paragraph_Down_Highlight 621
145 /* X clipboard operations */
146 #define CK_XStore 701
147 #define CK_XCut 702
148 #define CK_XPaste 703
149 #define CK_Selection_History 704
151 #define CK_Shell 801
154 /* C-x or similar */
155 #define CK_Ext_Mode 820
158 #define CK_Select_Codepage 850
159 #define CK_Insert_Literal 851
160 #define CK_Execute_Macro 852
161 #define CK_Begin_End_Macro 853
164 Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
165 shell_cmd[i] must process the file ~/cooledit.block and output ~/cooledit.block
166 which is then inserted into the text in place of the original block. shell_cmd[i] must
167 also produce a file homedir/cooledit.error . If this file is not empty an error will
168 have been assumed to have occured, and the block will not be replaced.
169 TODO: bring up a viewer to display the error message instead of inserting
170 it into the text, which is annoying.
172 #define CK_Pipe_Block(i) (1000+(i))
173 #define SHELL_COMMANDS_i {"/edit.indent.rc", "/edit.spell.rc", /* and so on */ 0 }
174 #define CK_Macro(i) (2000+(i))
175 #define CK_Last_Macro CK_Macro(0x7FFF)
176 #else
178 #define CK_User_Command(i) ((i) | (1 << 16))
179 #define IS_USER_COMMAND(i) ((i) & (1 << 16))
180 #define CK_Macro(i) ((i) | (1 << 17))
181 #define IS_MACRO_COMMAND(i) ((i) & (1 << 17))
183 #endif