-
Notifications
You must be signed in to change notification settings - Fork 206
/
ActionEnums.cpp
561 lines (543 loc) · 13.1 KB
/
ActionEnums.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
#include "stdafx.h"
#include "ActionEnums.h"
#include "Accels.h"
#include "Misc.h"
#include "CP_Main.h"
ActionEnums::ActionEnums()
{
}
ActionEnums::~ActionEnums()
{
}
CString ActionEnums::EnumDescription(ActionEnumValues value)
{
CString val = _T("");
switch (value)
{
case SHOWDESCRIPTION:
val = "View Full Description";
break;
case NEXTDESCRIPTION:
val = "Next Full Description";
break;
case PREVDESCRIPTION:
val = "Previous Full Description";
break;
case SHOWMENU:
val = "Show Context Menu";
break;
case SYSTEM_MENU:
val = "Show System Context Menu";
break;
case NEWGROUP:
val = "New Group";
break;
case NEWGROUPSELECTION:
val = "New Group Selection";
break;
case TOGGLEFILELOGGING:
val = "Toggle On File Logging";
break;
case TOGGLEOUTPUTDEBUGSTRING:
val = "Toggle OutputDebugString Logging";
break;
case CLOSEWINDOW:
val = "Close Window";
break;
case NEXTTABCONTROL:
val = "NEXTTABCONTROL";
break;
case PREVTABCONTROL:
val = "PREVTABCONTROL";
break;
case SHOWGROUPS:
val = "View Groups";
break;
case NEWCLIP:
val = "New Clip";
break;
case EDITCLIP:
val = "Edit Clip";
break;
case MODIFIER_ACTVE_SELECTIONUP:
val = "MODIFIER_ACTVE_SELECTIONUP";
break;
case MODIFIER_ACTVE_SELECTIONDOWN:
val = "MODIFIER_ACTVE_SELECTIONDOWN";
break;
case MODIFIER_ACTVE_MOVEFIRST:
val = "MODIFIER_ACTVE_MOVEFIRST";
break;
case MODIFIER_ACTVE_MOVELAST:
val = "MODIFIER_ACTVE_MOVELAST";
break;
case CANCELFILTER:
val = "Cancel Filter";
break;
case HOMELIST:
val = "HOMELIST";
break;
case BACKGRROUP:
val = "Back Group";
break;
case TOGGLESHOWPERSISTANT:
val = "Toggle Show Persistent";
break;
case PASTE_SELECTED:
val = "Paste Selected";
break;
case DELETE_SELECTED:
val = "Delete Selected";
break;
case CLIP_PROPERTIES:
val = "Clip Properties";
break;
case PASTE_SELECTED_PLAIN_TEXT:
val = "Paste Selected Plain Text";
break;
case MOVE_CLIP_TO_GROUP:
val = "Move Clip To Group";
break;
case ELEVATE_PRIVlEGES:
val = "Option - Elevate Privileges";
break;
case SHOW_IN_TASKBAR:
val = "Option - Show In TaskBar";
break;
case COMPARE_SELECTED_CLIPS:
val = "Compare Selected Clips";
break;
case SELECT_LEFT_SIDE_COMPARE:
val = "Select Left File For Compare";
break;
case SELECT_RIGHT_SITE_AND_DO_COMPARE:
val = "Select Right File And Do Compare";
break;
case EXPORT_TO_TEXT_FILE:
val = "Export To Text File";
break;
case EXPORT_TO_QR_CODE:
val = "Export To QR Code";
break;
case EXPORT_TO_GOOGLE_TRANSLATE:
val = "Export To Google Translate";
break;
case EXPORT_TO_BITMAP_FILE:
val = "Export To Image File";
break;
case SAVE_CURRENT_CLIPBOARD:
val = "Save Current Clipboard";
break;
case MOVE_CLIP_UP:
val = "Move Clip Up";
break;
case MOVE_CLIP_DOWN:
val = "Move Clip Down";
break;
case MOVE_CLIP_TOP:
val = "Move Clip Top";
break;
case FILTER_ON_SELECTED_CLIP:
val = "Filter On Selected Clip";
break;
case PASTE_UPPER_CASE:
val = "Paste Upper Case";
break;
case PASTE_LOWER_CASE:
val = "Paste Lower Case";
break;
case PASTE_CAPITALiZE:
val = "Paste Capitalize";
break;
case PASTE_SENTENCE_CASE:
val = "Paste Sentence Case";
break;
case PASTE_REMOVE_LINE_FEEDS:
val = "Paste Remove Line Feeds";
break;
case PASTE_ADD_ONE_LINE_FEED:
val = "Paste Add One Line Feed";
break;
case PASTE_ADD_TWO_LINE_FEEDS:
val = "Paste Add Two Line Feeds";
break;
case PASTE_TYPOGLYCEMIA:
val = "Paste Typoglycemia";
break;
case SEND_TO_FRIEND_1:
val = "Send to friend 1";
break;
case SEND_TO_FRIEND_2:
val = "Send to friend 2";
break;
case SEND_TO_FRIEND_3:
val = "Send to friend 3";
break;
case SEND_TO_FRIEND_4:
val = "Send to friend 4";
break;
case SEND_TO_FRIEND_5:
val = "Send to friend 5";
break;
case SEND_TO_FRIEND_6:
val = "Send to friend 6";
break;
case SEND_TO_FRIEND_7:
val = "Send to friend 7";
break;
case SEND_TO_FRIEND_8:
val = "Send to friend 8";
break;
case SEND_TO_FRIEND_9:
val = "Send to friend 9";
break;
case SEND_TO_FRIEND_10:
val = "Send to friend 10";
break;
case SEND_TO_FRIEND_11:
val = "Send to friend 11";
break;
case SEND_TO_FRIEND_12:
val = "Send to friend 12";
break;
case SEND_TO_FRIEND_13:
val = "Send to friend 13";
break;
case SEND_TO_FRIEND_14:
val = "Send to friend 14";
break;
case SEND_TO_FRIEND_15:
val = "Send to friend 15";
break;
case PASTE_POSITION_1:
val = "Paste Position 1";
break;
case PASTE_POSITION_2:
val = "Paste Position 2";
break;
case PASTE_POSITION_3:
val = "Paste Position 3";
break;
case PASTE_POSITION_4:
val = "Paste Position 4";
break;
case PASTE_POSITION_5:
val = "Paste Position 5";
break;
case PASTE_POSITION_6:
val = "Paste Position 6";
break;
case PASTE_POSITION_7:
val = "Paste Position 7";
break;
case PASTE_POSITION_8:
val = "Paste Position 8";
break;
case PASTE_POSITION_9:
val = "Paste Position 9";
break;
case PASTE_POSITION_10:
val = "Paste Position 10";
break;
case CONFIG_SHOW_FIRST_TEN_TEXT:
val = "Option - Show text for first ten copy hot keys";
break;
case CONFIG_SHOW_CLIP_WAS_PASTED:
val = "Option - Show indicator a clip has been pasted";
break;
case TOGGLE_LAST_GROUP_TOGGLE:
val = "Toggle Last Group Toggle";
break;
case MAKE_TOP_STICKY:
val = "Make Top Sticky Clip";
break;
case MAKE_LAST_STICKY:
val = "Make Last Sticky Clip";
break;
case REMOVE_STICKY:
val = "Remove Sticky Setting";
break;
case PASTE_ADD_CURRENT_TIME:
val = "Paste Add Current Time";
break;
case IMPORT_CLIP:
val = "Import Clip";
break;
case GLOBAl_HOTKEYS:
val = "Global HotKeys";
break;
case DELETE_CLIP_DATA:
val = "Delete Clip Data";
break;
case REPLACE_TOP_STICKY_CLIP:
val = "Replace Top Sticky Clip";
break;
case PROMPT_SEND_TO_FRIEND:
val = "Prompt send to friend";
break;
case SAVE_CF_HDROP_FIlE_DATA:
val = "Save copied file (cf_hdrop) contents into Ditto";
break;
case TOGGLE_CLIPBOARD_CONNECTION:
val = "Toggle clipboard connection";
break;
case MOVE_SELECTION_UP:
val = "Move Selection Up";
break;
case MOVE_SELECTION_DOWN:
val = "Move Selection Down";
break;
case TOGGLE_DESCRIPTION_WORD_WRAP:
val = "Toggle Description Word Wrap";
break;
case APPLY_LAST_SEARCH:
val = "Apply Last Search";
break;
case TOGGLE_SEARCH_METHOD:
val = "Toggle Search Method";
break;
case MOVE_CLIP_LAST:
val = "Move Clip Last";
break;
case PASTE_SCRIPT:
val = "Paste Script";
break;
case PASTE_DONT_MOVE_CLIP:
val = "Paste, Don't Change Clip Order";
break;
case PASTE_TRIM_WHITE_SPACE:
val = "Paste, Trim White Space";
break;
case TRANSPARENCY_NONE:
val = "Set Transparency None";
break;
case TRANSPARENCY_5:
val = "Set Transparency 5%";
break;
case TRANSPARENCY_10:
val = "Set Transparency 10%";
break;
case TRANSPARENCY_15:
val = "Set Transparency 15%";
break;
case TRANSPARENCY_20:
val = "Set Transparency 20%";
break;
case TRANSPARENCY_25:
val = "Set Transparency 25%";
break;
case TRANSPARENCY_30:
val = "Set Transparency 30%";
break;
case TRANSPARENCY_35:
val = "Set Transparency 35%";
break;
case TRANSPARENCY_40:
val = "Set Transparency 40%";
break;
case TRANSPARENCY_TOGGLE:
val = "Toggle Transparency Enabled";
break;
case TRANSPARENCY_INCREASE:
val = "Increase Transparency %";
break;
case TRANSPARENCY_DECREASE:
val = "Decrease Transparency %";
break;
case EMAILTO_BODY:
val = "EMail, Content In Body";
break;
case EMAILTO_ATTACH_EXPORT:
val = "EMail, Clip Export As Attachment";
break;
case EMAILTO_ATTACH_CONTENT:
val = "EMail, Content As Attachment";
break;
case GMAIL:
val = "Gmail";
break;
case SLUGIFY:
val = "Slugify";
break;
case INVERT_CASE:
val = "Invert Case";
break;
case COPY_SELECTION:
val = "Copy Selection";
break;
case FORCE_CLOSE_WINDOW:
val = "Force Close Window";
break;
case REFRESH_LIST:
val = "Refresh List";
break;
case DELETE_ALL_NON_USED_CLIPS:
val = "Delete all non used clips";
break;
case SET_DRAG_FILE_NAME:
val = "Set Drag File Name";
break;
case PASTE_CAMEL_CASE:
val = "Paste CamelCase";
break;
case PASTE_MULTI_IMAGE_HORIZONTAL:
val = "Paste Muliple Images Horizontally";
break;
case PASTE_MULTI_IMAGE_VERTICAL:
val = "Paste Muliple Images Vertically";
break;
}
CString translatedValue = theApp.m_Language.GetQuickPasteKeyboardString(value, val);
if (translatedValue != _T(""))
{
return translatedValue;
}
return val;
}
int ActionEnums::GetDefaultShortCutKeyA(ActionEnumValues value, int pos)
{
switch(pos)
{
case 0:
switch (value)
{
case ActionEnums::SHOWDESCRIPTION:
return VK_F3;
case ActionEnums::NEXTDESCRIPTION:
return 'N';
case ActionEnums::PREVDESCRIPTION:
return 'P';
case ActionEnums::NEWGROUP:
return ACCEL_MAKEKEY(VK_F7, HOTKEYF_CONTROL);
case ActionEnums::NEWGROUPSELECTION:
return VK_F7;
case ActionEnums::SHOWGROUPS:
return ACCEL_MAKEKEY('G', HOTKEYF_CONTROL);
case ActionEnums::NEWCLIP:
return ACCEL_MAKEKEY('N', HOTKEYF_CONTROL);
case ActionEnums::EDITCLIP:
return ACCEL_MAKEKEY('E', HOTKEYF_CONTROL);
case ActionEnums::CANCELFILTER:
return ACCEL_MAKEKEY('C', HOTKEYF_ALT);
case ActionEnums::TOGGLESHOWPERSISTANT:
return ACCEL_MAKEKEY(VK_SPACE, HOTKEYF_CONTROL);
case ActionEnums::CLIP_PROPERTIES:
return ACCEL_MAKEKEY(VK_RETURN, HOTKEYF_ALT);
case ActionEnums::PASTE_SELECTED_PLAIN_TEXT:
return ACCEL_MAKEKEY(VK_RETURN, HOTKEYF_SHIFT);
case ActionEnums::COMPARE_SELECTED_CLIPS:
return ACCEL_MAKEKEY(VK_F2, HOTKEYF_CONTROL);
case ActionEnums::PASTE_SELECTED:
return VK_RETURN;
case ActionEnums::SHOWMENU:
return VK_MOUSE_RIGHT_CLICK;
case PASTE_POSITION_1:
return ACCEL_MAKEKEY('1', HOTKEYF_CONTROL);
case PASTE_POSITION_2:
return ACCEL_MAKEKEY('2', HOTKEYF_CONTROL);
case PASTE_POSITION_3:
return ACCEL_MAKEKEY('3', HOTKEYF_CONTROL);
case PASTE_POSITION_4:
return ACCEL_MAKEKEY('4', HOTKEYF_CONTROL);
case PASTE_POSITION_5:
return ACCEL_MAKEKEY('5', HOTKEYF_CONTROL);
case PASTE_POSITION_6:
return ACCEL_MAKEKEY('6', HOTKEYF_CONTROL);
case PASTE_POSITION_7:
return ACCEL_MAKEKEY('7', HOTKEYF_CONTROL);
case PASTE_POSITION_8:
return ACCEL_MAKEKEY('8', HOTKEYF_CONTROL);
case PASTE_POSITION_9:
return ACCEL_MAKEKEY('9', HOTKEYF_CONTROL);
case PASTE_POSITION_10:
return ACCEL_MAKEKEY('0', HOTKEYF_CONTROL);
case CLOSEWINDOW:
return VK_ESCAPE;
case FORCE_CLOSE_WINDOW:
return ACCEL_MAKEKEY(VK_ESCAPE, HOTKEYF_SHIFT);
case TOGGLE_DESCRIPTION_WORD_WRAP:
return 'W';
case COPY_SELECTION:
return ACCEL_MAKEKEY('C', HOTKEYF_CONTROL);
case REFRESH_LIST:
return VK_F5;
case SET_DRAG_FILE_NAME:
return VK_F4;
}
break;
case 1:
switch (value)
{
case ActionEnums::PASTE_SELECTED:
return VK_MOUSE_DOUBLE_CLICK;
case PASTE_POSITION_1:
return ACCEL_MAKEKEY(VK_NUMPAD1, HOTKEYF_CONTROL);
case PASTE_POSITION_2:
return ACCEL_MAKEKEY(VK_NUMPAD2, HOTKEYF_CONTROL);
case PASTE_POSITION_3:
return ACCEL_MAKEKEY(VK_NUMPAD3, HOTKEYF_CONTROL);
case PASTE_POSITION_4:
return ACCEL_MAKEKEY(VK_NUMPAD4, HOTKEYF_CONTROL);
case PASTE_POSITION_5:
return ACCEL_MAKEKEY(VK_NUMPAD5, HOTKEYF_CONTROL);
case PASTE_POSITION_6:
return ACCEL_MAKEKEY(VK_NUMPAD6, HOTKEYF_CONTROL);
case PASTE_POSITION_7:
return ACCEL_MAKEKEY(VK_NUMPAD7, HOTKEYF_CONTROL);
case PASTE_POSITION_8:
return ACCEL_MAKEKEY(VK_NUMPAD8, HOTKEYF_CONTROL);
case PASTE_POSITION_9:
return ACCEL_MAKEKEY(VK_NUMPAD9, HOTKEYF_CONTROL);
case PASTE_POSITION_10:
return ACCEL_MAKEKEY(VK_NUMPAD0, HOTKEYF_CONTROL);
}
break;
}
return -1;
}
int ActionEnums::GetDefaultShortCutKeyB(ActionEnumValues value, int pos)
{
switch (pos)
{
case 0:
switch (value)
{
}
break;
}
return -1;
}
bool ActionEnums::UserConfigurable(ActionEnumValues value)
{
switch (value)
{
case ActionEnums::NEXTTABCONTROL:
case ActionEnums::PREVTABCONTROL:
case ActionEnums::MODIFIER_ACTVE_SELECTIONUP:
case ActionEnums::MODIFIER_ACTVE_SELECTIONDOWN:
case ActionEnums::MODIFIER_ACTVE_MOVEFIRST:
case ActionEnums::MODIFIER_ACTVE_MOVELAST:
case ActionEnums::BACKGRROUP:
case ActionEnums::DELETE_SELECTED:
case ActionEnums::TOGGLEFILELOGGING:
case ActionEnums::TOGGLEOUTPUTDEBUGSTRING:
case ActionEnums::HOMELIST:
case ActionEnums::PASTE_SCRIPT:
return false;
}
return true;
}
bool ActionEnums::ToolTipAction(ActionEnumValues value)
{
switch (value)
{
case ActionEnums::NEXTDESCRIPTION:
case ActionEnums::PREVDESCRIPTION:
case ActionEnums::TOGGLESHOWPERSISTANT:
case ActionEnums::TOGGLE_DESCRIPTION_WORD_WRAP:
case ActionEnums::CLOSEWINDOW:
case ActionEnums::SHOWDESCRIPTION:
return true;
}
return false;
}