-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.h
570 lines (560 loc) · 12.1 KB
/
Menu.h
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
562
563
564
565
566
567
568
569
570
#define ITEM_MULTIPLEIMG ITEM(-1,"(Enable multiple images)")
//:-------------------------------
// Condition menu
//:-------------------------------
#ifdef CONDITION_MENU
SEPARATOR
SUB_START("Patterns")
ITEM(14,"Pattern exists?")
//SEPARATOR
//SUB_START("User callback")
// ITEM(8,"On callback")
//SUB_END
SUB_END
SUB_START("Image")
if(!edPtr||edPtr->multiImg)
{
//if(!edPtr||!edPtr->dispTarget)
ITEM(9,"Compare to displayed image")
ITEM(10,"Compare to selected image")
ITEM(7,"Select image (inline)")
SEPARATOR
}
ITEM(0,"Has alpha channel?")
ITEM(6,"Pixel is equal to color?")
ITEM(16,"Point is inside image?")
//ITEM(11,"Compare to red value")
//ITEM(12,"Compare to green value")
//ITEM(13,"Compare to blue value")
SUB_END
SUB_START("Input / Output")
ITEM(1,"Image in clipboard?")
SEPARATOR
ITEM(2,"Loading failed?")
ITEM(3,"Saving failed?")
ITEM(4,"Loading succeeded?")
ITEM(5,"Saving succeeded?")
SEPARATOR
ITEM(17,"File I/O in progress?")
ITEM(19,"File is being loaded?")
ITEM(18,"File is being saved?")
SEPARATOR
ITEM(15,"Buffer is locked?")
SUB_END
SEPARATOR
ITEM(8,"On callback")
#endif
//:-------------------------------
// Action menu
//:-------------------------------
#ifdef ACTION_MENU
SEPARATOR
SUB_START("Display settings")
if(!edPtr||!edPtr->dispTarget)
ITEM(1,"Set image to display")
SEPARATOR
ITEM(27,"Force redraw")
ITEM(104,"Skip redraw")
SEPARATOR
ITEM(111,"Set transparent")
SEPARATOR
ITEM(139,"Set scale")
ITEM(140,"Set X scale")
ITEM(141,"Set Y scale")
ITEM(152,"Set angle")
SUB_END
SUB_START("General settings")
if(!edPtr||edPtr->multiImg)
{
ITEM(110,"Set select new images")
ITEM(109,"Set display selected image")
SEPARATOR
}
ITEM(42,"Set use absolute coords")
ITEM(134,"Set keep points after drawing")
ITEM(135,"Set background file input/output")
ITEM(81,"Set linear resampling")
SUB_END
SEPARATOR
SUB_START("Images")
if(!edPtr||edPtr->multiImg)
{
ITEM(29,"Select image")
SEPARATOR
ITEM(17,"Add image")
ITEM(12,"Insert image")
SEPARATOR
SUB_START("Copy image")
ITEM(28,"From another image")
ITEM(121,"From Surface object")
ITEM(131,"From image reference")
SUB_END
SEPARATOR
ITEM(91,"Swap two images")
SEPARATOR
ITEM(11,"Delete image")
ITEM(18,"Delete all images")
SEPARATOR
SUB_START("References")
ITEM(129,"Add reference")
ITEM(130,"Insert reference")
SEPARATOR
ITEM(132,"Set reference value")
ITEM(133,"Set reference state")
SUB_END
}
else
{
ITEM_MULTIPLEIMG
}
SUB_END
SUB_START("Patterns")
SUB_START("Color")
ITEM(43,"Create")
ITEM(72,"Set color")
SUB_END
SUB_START("Linear gradient")
ITEM(46,"Create")
ITEM(73,"Set colors")
ITEM(74,"Set vertical")
SUB_END
SUB_START("Radial gradient")
ITEM(107,"Create")
ITEM(73,"Set colors")
SUB_END
SUB_START("Callback")
ITEM(145,"Create")
SUB_END
if(!edPtr||edPtr->multiImg)
{
SUB_START("Tiled image")
ITEM(45,"Create")
ITEM(76,"Set tiled image")
ITEM(75,"Set origin")
SUB_END
}
else
{
SUB_START("Tiled image")
ITEM_MULTIPLEIMG
SUB_END
}
SEPARATOR
ITEM(77,"Delete")
SUB_END
SUB_START("Points")
ITEM(142,"Add point")
ITEM(33,"Add points from string")
SEPARATOR
ITEM(31,"Insert point")
SEPARATOR
ITEM(99,"Create star")
ITEM(103,"Create regular polygon")
SEPARATOR
ITEM(34,"Move points")
ITEM(35,"Rotate points")
ITEM(100,"Scale points")
SEPARATOR
ITEM(36,"Remove point")
ITEM(32,"Remove all points")
SUB_END
SUB_START("Text")
ITEM(56,"Set font face")
ITEM(57,"Set font size")
ITEM(59,"Set font weight")
ITEM(60,"Set font decoration")
ITEM(58,"Set font quality")
SEPARATOR
ITEM(53,"Set horizontal align")
ITEM(54,"Set vertical align")
ITEM(118,"Set angle")
SEPARATOR
ITEM(85,"Set add ellipsis")
ITEM(84,"Set clipping")
ITEM(55,"Set multi-line")
ITEM(86,"Set word break")
SUB_END
SEPARATOR
ITEM(0,"~- Selected image -")
SUB_START("Settings")
ITEM(24,"Set transparent color")
SEPARATOR
ITEM(143,"Set hot spot")
ITEM(144,"Set hot spot (percent)")
SEPARATOR
ITEM(96,"Set clipping rectangle")
ITEM(97,"Clear clipping rectangle")
//#ifdef HWABETA
SEPARATOR
ITEM(156, "Convert to bitmap")
ITEM(154, "Convert to HWA texture")
ITEM(155, "Convert to HWA target")
//#endif
SUB_END
SUB_START("Input / Output")
ITEM(153,"Load from file")
ITEM(14,"Save to file")
SEPARATOR
ITEM(47,"Load from clipboard")
ITEM(48,"Save to clipboard")
SEPARATOR
ITEM(163, "Quick restore")
ITEM(162, "Quick store")
SEPARATOR
SUB_START("Advanced")
ITEM(68,"Export as Overlay")
SEPARATOR
ITEM(112,"Lock buffer")
ITEM(113,"Unlock buffer")
ITEM(128,"Write bytes")
SUB_END
SUB_END
ITEM(0,"~- Pixel processing -")
SUB_START("Adjustments")
ITEM(164, "Apply brightness")
ITEM(165, "Apply contrast")
ITEM(98,"Invert colors")
//ITEM(166, "Normalize")
SUB_START("Perform operation")
ITEM(26,"With color for RGB")
ITEM(123,"With value for...")
//SEPARATOR
//ITEM(154,"With condition and value for...")
SUB_END
SEPARATOR
ITEM(106,"Convert to grayscale")
ITEM(92,"Move color channels")
ITEM(161,"Apply color matrix")
SEPARATOR
ITEM(61,"Apply convolution matrix")
//SEPARATOR
//ITEM(155,"Evaluate")
SUB_END
SUB_START("Alpha channel")
ITEM(4,"Create")
ITEM(127,"Remove")
SEPARATOR
ITEM(6,"Clear")
ITEM(5,"Set pixel")
ITEM(25,"Draw line")
ITEM(7,"Draw rectangle")
SUB_END
SUB_START("Blitting")
SUB_START("From...")
if(!edPtr||edPtr->multiImg)
{
SUB_START("From alpha channel")
ITEM(125,"Alpha channel")
SUB_END
SEPARATOR
ITEM(63,"Image")
ITEM(67,"Alpha channel")
SEPARATOR
}
SUB_START("External")
SUB_START("Active object")
ITEM(49,"At destination")
ITEM(122,"At its position")
SUB_END
ITEM(62,"Background")
ITEM(70,"Overlay")
ITEM(90,"Surface")
SUB_END
SUB_START("Advanced")
ITEM(82,"Image reference")
ITEM(87,"Window handle")
SUB_END
SUB_END
SUB_START("Onto...")
if(!edPtr||edPtr->multiImg)
{
SUB_START("Onto alpha channel")
ITEM(124,"Alpha channel")
SUB_END
SEPARATOR
ITEM(0,"Image")
ITEM(19,"Alpha channel")
SEPARATOR
}
SUB_START("External")
ITEM(65,"Background")
ITEM(71,"Overlay")
ITEM(89,"Surface")
SEPARATOR
ITEM(64,"Add backdrop")
SUB_END
SUB_START("Advanced")
ITEM(83,"Image reference")
ITEM(88,"Window handle")
SUB_END
SUB_END
SEPARATOR
ITEM(169, "Push settings")
ITEM(170, "Pop settings")
SEPARATOR
SUB_START("Source")
ITEM(0,"~- Position && Size -")
ITEM(114,"Set position")
ITEM(115,"Set dimensions")
ITEM(117,"Set region flag")
ITEM(146,"Set all")
SUB_END
SUB_START("Destination")
ITEM(0,"~- Position && Size -")
ITEM(41,"Set position")
ITEM(66,"Set dimensions")
ITEM(116,"Set stretch mode")
ITEM(105,"Set all")
SEPARATOR
ITEM(0,"~- Rotation -")
ITEM(147,"Set angle")
ITEM(151,"Set quality")
SEPARATOR
ITEM(0,"~- Hot spot -")
ITEM(148,"Set pixels")
ITEM(150,"Set percent")
SUB_END
SEPARATOR
SUB_START("Transparency")
ITEM(173, "Enable")
ITEM(174, "Disable")
SUB_END
SUB_START("Alpha composition")
ITEM(171, "Enable")
ITEM(172, "Disable")
SUB_END
SEPARATOR
SUB_START("Effect")
ITEM(40,"Set by index")
ITEM(126,"Set by name")
//SUB_START("Set parameter")
// //ITEM(39,"Use semi-transparency")
SEPARATOR
ITEM(168, "Set alpha")
ITEM(157, "Set tint")
//SUB_END
SEPARATOR
ITEM(136,"Set callback (overrides effect)")
SUB_END
//SUB_START("Transparency")
// ITEM(38,"Set alpha mode")
// ITEM(37,"Set transparency")
//SUB_END
SUB_END
SUB_START("Callbacks")
ITEM(95,"Loop through image")
ITEM(137,"Loop through area")
//SEPARATOR
//ITEM(153,"Loop through image with condition")
SEPARATOR
ITEM(0,"~On callback:")
ITEM(138,"Return alpha")
ITEM(94,"Return color")
SUB_END
SUB_START("Transformations")
ITEM(13,"Resize")
ITEM(78,"Resize canvas")
ITEM(23,"Minimize canvas")
SEPARATOR
ITEM(80,"Rotate")
ITEM(21,"Flip horizontally")
ITEM(22,"Flip vertically")
ITEM(93,"Scroll")
SEPARATOR
SUB_END
ITEM(0,"~- Drawing -")
SUB_START("With color")
ITEM(3,"Clear")
ITEM(2,"Set pixel")
ITEM(16,"Flood fill")
ITEM(20,"Replace color")
SEPARATOR
ITEM(10,"Draw line")
SUB_START("Draw rectangle")
ITEM(0,"~Simple:")
ITEM(9,"Via bounding box")
ITEM(119,"Via position and size")
SEPARATOR
ITEM(0,"~With outline:")
ITEM(159,"Via bounding box")
ITEM(166,"Via position and size")
SUB_END
SUB_START("Draw ellipse")
ITEM(0,"~Simple:")
ITEM(158,"Via bounding box")
ITEM(167,"Via center and size")
SEPARATOR
ITEM(0,"~With outline:")
ITEM(8,"Via bounding box")
ITEM(101,"Via center and size")
SUB_END
SUB_START("Draw polygon")
ITEM(160,"Simple")
ITEM(30,"With outline")
SUB_END
ITEM(52,"Draw text")
SUB_END
SUB_START("With pattern")
ITEM(79,"Clear")
SEPARATOR
ITEM(69,"Draw line")
SUB_START("Draw rectangle")
ITEM(44,"Via bounding box")
ITEM(120,"Via position and size")
SUB_END
SUB_START("Draw ellipse")
ITEM(50,"Via bounding box")
ITEM(102,"Via center and size")
SUB_END
ITEM(51,"Draw polygon")
SUB_END
SEPARATOR
#endif
//:-------------------------------
// Expression menu
//:-------------------------------
#ifdef EXPRESSION_MENU
SEPARATOR
SUB_START("Scale / Angle")
ITEM(69,"X scale")
ITEM(70,"Y scale")
ITEM(71,"Angle")
SUB_END
SEPARATOR
SUB_START("Pattern")
ITEM(41,"Pattern count")
ITEM(40,"Pattern from index")
SEPARATOR
ITEM(42,"Color")
SUB_START("Linear gradient")
ITEM(43,"Color A")
ITEM(44,"Color B")
SUB_END
SUB_START("Radial gradient")
ITEM(43,"Color A")
ITEM(44,"Color B")
SUB_END
ITEM(45,"Tiled image")
SUB_END
if(!edPtr||edPtr->multiImg)
{
SEPARATOR
ITEM(0,"Image count")
ITEM(6,"Last added image")
SEPARATOR
}
if(!edPtr||(edPtr->multiImg/*&&!edPtr->dispTarget*/))
{
SUB_START("Displayed image")
ITEM(2,"Index")
SEPARATOR
ITEM(8,"Width")
ITEM(9,"Height")
SUB_END
SUB_START("Selected image")
ITEM(1,"Index")
SEPARATOR
}
else
{
SUB_START("Image")
}
ITEM(4,"Width")
ITEM(5,"Height")
SEPARATOR
ITEM(3,"RGB at")
ITEM(10,"Red at")
ITEM(11,"Green at")
ITEM(12,"Blue at")
ITEM(13,"Alpha at")
SEPARATOR
ITEM(27,"Transparent color")
ITEM(62,"Hot spot X")
ITEM(63,"Hot spot Y")
SEPARATOR
ITEM(52,"Reference value")
SUB_END
if(!edPtr||edPtr->multiImg)
{
SUB_START("Any image")
ITEM(15,"Width")
ITEM(16,"Height")
SEPARATOR
ITEM(14,"RGB at")
ITEM(46,"Red at")
ITEM(47,"Green at")
ITEM(48,"Blue at")
ITEM(49,"Alpha at")
SEPARATOR
ITEM(64,"Transparent color")
ITEM(60,"Hot spot X")
ITEM(61,"Hot spot Y")
SEPARATOR
ITEM(53,"Reference value")
SUB_END
}
SEPARATOR
SUB_START("Callback")
ITEM(58,"Source alpha")
ITEM(65,"Destination alpha")
SEPARATOR
ITEM(54,"Source color")
ITEM(55,"Destination color")
SEPARATOR
ITEM(17,"X position")
ITEM(18,"Y position")
SUB_END
SUB_START("Flood fill")
ITEM(36,"Area X1")
ITEM(37,"Area Y1")
ITEM(38,"Area X2")
ITEM(39,"Area Y2")
SUB_END
SUB_START("Input / Output")
SUB_START("Files")
ITEM(28,"Filter count")
SEPARATOR
ITEM(29,"Filter name")
ITEM(32,"Filter can save")
SEPARATOR
ITEM(31,"Filter extension count")
ITEM(35,"Filter extension list")
SEPARATOR
ITEM(30,"Filter extension name")
SUB_END
SEPARATOR
ITEM(7,"Overlay address")
SEPARATOR
ITEM(33,"Buffer address")
ITEM(34,"Buffer pitch")
SUB_END
SEPARATOR
SUB_START("Tools")
ITEM(50,"Color from HEX")
ITEM(23,"Color from RGB")
SEPARATOR
ITEM(51,"Random color")
SEPARATOR
ITEM(25,"Invert color")
SEPARATOR
ITEM(66,"Add two colors")
ITEM(67,"Subtract two colors")
ITEM(26,"Multiply two colors")
ITEM(24,"Blend two colors")
SUB_START("Compose two colors")
ITEM(75, "Composed color")
ITEM(76, "Composed alpha")
SUB_END
SUB_END
SUB_START("Image references")
ITEM(68,"Transformed Surface")
SEPARATOR
ITEM(57,"Background")
SEPARATOR
ITEM(56,"Object")
SUB_END
SUB_START("Window handles")
ITEM(59,"Frame window")
SUB_END
SEPARATOR
#endif