author | ca |
Wed, 27 Oct 1999 14:23:07 +0200 | |
changeset 1262 | 2849b1a15ec8 |
parent 1250 | 644ed357b524 |
child 1309 | 0a45ef81b47e |
permissions | -rw-r--r-- |
400 | 1 |
" |
767 | 2 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 3 |
All Rights Reserved |
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
405 | 7 |
inclusion of the above copyright notice. This software may not |
400 | 8 |
be provided or otherwise made available to, or used by, any |
405 | 9 |
other person. No title to or ownership of the software is |
400 | 10 |
hereby transferred. |
11 |
" |
|
12 |
||
13 |
ToolApplicationModel subclass:#ImageEditor |
|
975 | 14 |
instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
15 |
selectedColorIndex postOpenAction' |
|
929 | 16 |
classVariableNames:'' |
17 |
poolDictionaries:'' |
|
18 |
category:'Interface-UIPainter' |
|
400 | 19 |
! |
20 |
||
21 |
!ImageEditor class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
767 | 25 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 26 |
All Rights Reserved |
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
405 | 30 |
inclusion of the above copyright notice. This software may not |
400 | 31 |
be provided or otherwise made available to, or used by, any |
405 | 32 |
other person. No title to or ownership of the software is |
400 | 33 |
hereby transferred. |
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
737 | 39 |
Image Editor allows you to create, design, modify or just inspect images. |
400 | 40 |
|
41 |
[start with:] |
|
42 |
ImageEditor open |
|
941 | 43 |
ImageEditor openOnClass:Icon andSelector:#startIcon |
400 | 44 |
|
45 |
[see also:] |
|
46 |
ImageEditView Image |
|
47 |
||
48 |
[author:] |
|
544 | 49 |
Thomas Zwick, eXept Software AG |
400 | 50 |
" |
51 |
! ! |
|
52 |
||
53 |
!ImageEditor class methodsFor:'instance creation'! |
|
54 |
||
55 |
openModalOnClass: aClass andSelector: aSelector |
|
900 | 56 |
"opens modal a Image Editor on aClass and aSelector" |
767 | 57 |
" |
58 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
59 |
" |
|
400 | 60 |
|
767 | 61 |
|imageEditor imageEditView className resourceClassName resourceSelector| |
62 |
||
400 | 63 |
imageEditor := self new. |
767 | 64 |
|
900 | 65 |
aClass isClass ifTrue: [className := aClass name]. |
66 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 67 |
aClass isNil ifTrue: [className := '']. |
400 | 68 |
|
688 | 69 |
imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector]. |
400 | 70 |
imageEditor openModal. |
71 |
||
688 | 72 |
resourceClassName := imageEditView resourceClass. |
767 | 73 |
resourceSelector := imageEditView resourceSelector. |
415 | 74 |
|
815 | 75 |
((className asString ~= resourceClassName) |
76 |
or:[aSelector asString ~= resourceSelector]) |
|
415 | 77 |
ifTrue: [^resourceClassName, ' ', resourceSelector] |
78 |
ifFalse:[^nil] |
|
400 | 79 |
! |
80 |
||
81 |
openOnClass: aClass andSelector: aSelector |
|
900 | 82 |
"opens a Image Editor on aClass and aSelector" |
767 | 83 |
" |
84 |
self openOnClass: self andSelector: #leftMouseKeyIcon |
|
85 |
" |
|
400 | 86 |
|
1057 | 87 |
|editor| |
88 |
||
89 |
editor := self new. |
|
90 |
editor allButOpen. |
|
91 |
editor loadFromMessage: aClass name, ' ', aSelector. |
|
92 |
editor openWindow |
|
93 |
||
94 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
|
400 | 95 |
! |
96 |
||
767 | 97 |
openOnFile: aFileName |
900 | 98 |
"opens a Image Editor on aFileName" |
767 | 99 |
" |
100 |
self openOnFile: 'bitmaps/SmalltalkX.xbm' |
|
101 |
" |
|
400 | 102 |
|
1057 | 103 |
|editor| |
104 |
||
105 |
editor := self new. |
|
106 |
editor allButOpen. |
|
107 |
editor loadFromFile: aFileName. |
|
108 |
editor openWindow |
|
109 |
||
110 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
|
400 | 111 |
! |
112 |
||
767 | 113 |
openOnImage: anImage |
900 | 114 |
"opens a Image Editor on anImage" |
767 | 115 |
" |
895 | 116 |
self openOnImage: Icon startIcon |
767 | 117 |
" |
400 | 118 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
119 |
|editor| |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
120 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
121 |
editor := self new. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
122 |
editor allButOpen. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
123 |
editor loadFromImage: anImage. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
124 |
editor openWindow |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
125 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
126 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 127 |
! ! |
128 |
||
129 |
!ImageEditor class methodsFor:'accessing'! |
|
130 |
||
131 |
listOfColorMaps |
|
767 | 132 |
"returns the list of default color maps for a new image" |
400 | 133 |
|
134 |
|colorMap| |
|
898 | 135 |
|
400 | 136 |
(colorMap := OrderedCollection new) |
137 |
add: Color black; |
|
138 |
add: Color white; |
|
139 |
add: Color red; |
|
140 |
add: Color green; |
|
141 |
add: Color blue; |
|
142 |
add: Color cyan; |
|
143 |
add: Color yellow; |
|
144 |
add: Color magenta; |
|
898 | 145 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
146 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
147 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
148 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
149 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
150 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
151 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
152 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
153 |
||
400 | 154 |
0 to: 5 do: |
155 |
[:r| |
|
156 |
0 to: 5 do: |
|
157 |
[:g| |
|
158 |
0 to: 5 do: |
|
159 |
[:b| |
|
898 | 160 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 161 |
] |
162 |
] |
|
163 |
]. |
|
164 |
||
165 |
1 to: 25 do: |
|
166 |
[:g| |
|
898 | 167 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 168 |
]. |
169 |
||
170 |
^Dictionary new |
|
171 |
at: '8-plane' put: colorMap; |
|
172 |
at: '8-plane + mask' put: colorMap; |
|
173 |
at: '4-plane' put: (colorMap copyFrom: 1 to: 16); |
|
174 |
at: '4-plane + mask' put: (colorMap copyFrom: 1 to: 16); |
|
175 |
at: '2-plane' put: (colorMap copyFrom: 1 to: 4); |
|
176 |
at: '2-plane + mask' put: (colorMap copyFrom: 1 to: 4); |
|
177 |
at: '1-plane' put: (colorMap copyFrom: 1 to: 2); |
|
178 |
at: '1-plane + mask' put: (colorMap copyFrom: 1 to: 2); |
|
179 |
yourself |
|
180 |
! |
|
181 |
||
182 |
listOfDefaultSizes |
|
767 | 183 |
"returns the list of default sizes for a new image" |
400 | 184 |
|
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
185 |
^#('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
186 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
187 |
"Modified: / 31.7.1998 / 01:57:34 / cg" |
400 | 188 |
! ! |
189 |
||
460 | 190 |
!ImageEditor class methodsFor:'help specs'! |
191 |
||
192 |
helpSpec |
|
737 | 193 |
"This resource specification was automatically generated |
194 |
by the UIHelpTool of ST/X." |
|
195 |
||
196 |
"Do not manually edit this!! If it is corrupted, |
|
197 |
the UIHelpTool may not be able to read the specification." |
|
460 | 198 |
|
199 |
" |
|
737 | 200 |
UIHelpTool openOnClass:ImageEditor |
460 | 201 |
" |
202 |
||
737 | 203 |
<resource: #help> |
204 |
||
205 |
^super helpSpec addPairsFrom:#( |
|
460 | 206 |
|
207 |
#colorMap |
|
929 | 208 |
'ColorMap functions.' |
209 |
||
210 |
#colorMap1 |
|
211 |
'Convert to depth-1 image.' |
|
212 |
||
986 | 213 |
#colorMap1M |
214 |
'Convert to depth-1 image plus mask.' |
|
215 |
||
929 | 216 |
#colorMap2 |
217 |
'Convert to depth-2 image.' |
|
218 |
||
986 | 219 |
#colorMap2M |
220 |
'Convert to depth-2 image plus mask.' |
|
221 |
||
929 | 222 |
#colorMap4 |
223 |
'Convert to depth-4 image.' |
|
224 |
||
986 | 225 |
#colorMap4M |
226 |
'Convert to depth-4 image plus mask.' |
|
227 |
||
929 | 228 |
#colorMap8 |
229 |
'Convert to depth-8 image.' |
|
230 |
||
231 |
#colorMap8M |
|
232 |
'Convert to depth-8 image plus mask.' |
|
233 |
||
986 | 234 |
#colorMapTable |
235 |
'Shows a list of used colors of the image.' |
|
236 |
||
929 | 237 |
#compressColormap |
238 |
'Remove unneeded entries from the colorMap.' |
|
460 | 239 |
|
1045 | 240 |
#cropAll |
986 | 241 |
'Find and remove all borders.' |
242 |
||
1045 | 243 |
#cropBottom |
986 | 244 |
'Find and remove bottom border.' |
245 |
||
1045 | 246 |
#cropLeft |
986 | 247 |
'Find and remove left border.' |
248 |
||
1045 | 249 |
#cropManual |
986 | 250 |
'Specify border(s) to remove.' |
251 |
||
1045 | 252 |
#cropRight |
986 | 253 |
'Find and remove right border.' |
254 |
||
1045 | 255 |
#cropTop |
986 | 256 |
'Find and remove top border.' |
487 | 257 |
|
460 | 258 |
#drawModeBox |
914 | 259 |
'Switches to box-drawing mode.' |
460 | 260 |
|
261 |
#drawModeCopy |
|
914 | 262 |
'Switches to area-copy mode.' |
460 | 263 |
|
264 |
#drawModeFill |
|
914 | 265 |
'Switches to flood-fill mode.' |
460 | 266 |
|
267 |
#drawModeFilledBox |
|
914 | 268 |
'Switches to filled-box drawing mode.' |
460 | 269 |
|
270 |
#drawModePaste |
|
914 | 271 |
'Switches to paste mode.' |
272 |
||
273 |
#drawModePasteUnder |
|
274 |
'Switches to paste under mode.' |
|
460 | 275 |
|
276 |
#drawModePoint |
|
914 | 277 |
'Switches to point-drawing mode.' |
460 | 278 |
|
279 |
#editFlipHorizontal |
|
914 | 280 |
'Flips the image horizontally.' |
460 | 281 |
|
282 |
#editFlipVertical |
|
914 | 283 |
'Flips the image vertically.' |
460 | 284 |
|
285 |
#editMagnifyImage |
|
914 | 286 |
'Magnify the image.' |
460 | 287 |
|
288 |
#editNegate |
|
914 | 289 |
'Invert the images colors.' |
460 | 290 |
|
291 |
#editResize |
|
914 | 292 |
'Resize the image (preserving the old image).' |
460 | 293 |
|
294 |
#editRotate |
|
914 | 295 |
'Rotate the image.' |
460 | 296 |
|
929 | 297 |
#fileGrabImage |
298 |
'Pick an image from the screen.' |
|
299 |
||
460 | 300 |
#fileLoadFromClass |
929 | 301 |
'Select and load an image from a resource method.' |
460 | 302 |
|
303 |
#fileLoadFromFile |
|
929 | 304 |
'Select and load an image from a file.' |
460 | 305 |
|
306 |
#fileNewImage |
|
914 | 307 |
'Create a new image' |
460 | 308 |
|
309 |
#filePrint |
|
310 |
'Print the image on a postscript printer.' |
|
311 |
||
312 |
#fileSaveAs |
|
914 | 313 |
'Save the image to a file.' |
460 | 314 |
|
315 |
#fileSaveMaskAs |
|
914 | 316 |
'Save the mask of the image to a file.' |
460 | 317 |
|
318 |
#fileSaveMethod |
|
914 | 319 |
'Save the image as resource method in the current class and selector.' |
460 | 320 |
|
321 |
#fileSaveMethodAs |
|
914 | 322 |
'Save the image as resource method in a class.' |
460 | 323 |
|
487 | 324 |
#magnificationNumber |
914 | 325 |
'Shows the current magnification.' |
487 | 326 |
|
327 |
#magnifyImageDown |
|
914 | 328 |
'Decrease magnification.' |
487 | 329 |
|
330 |
#magnifyImageUp |
|
914 | 331 |
'Increase magnification.' |
487 | 332 |
|
333 |
#mouseKeyColorMode |
|
914 | 334 |
'Toggles between left and right mouse button color.' |
487 | 335 |
|
336 |
#previewView |
|
914 | 337 |
'Shows a preview of the image.' |
487 | 338 |
|
905 | 339 |
#settingsGridMagnification |
914 | 340 |
'Change the grid magnification of the edit view.' |
905 | 341 |
|
460 | 342 |
) |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
343 |
|
986 | 344 |
"Modified: / 7.9.1998 / 18:20:26 / cg" |
460 | 345 |
! ! |
346 |
||
737 | 347 |
!ImageEditor class methodsFor:'image specs'! |
348 |
||
349 |
leftMouseKeyIcon |
|
350 |
"This resource specification was automatically generated |
|
351 |
by the ImageEditor of ST/X." |
|
352 |
||
353 |
"Do not manually edit this!! If it is corrupted, |
|
354 |
the ImageEditor may not be able to read the specification." |
|
355 |
||
356 |
" |
|
357 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
|
358 |
" |
|
359 |
||
360 |
<resource: #image> |
|
361 |
||
362 |
^Icon |
|
363 |
constantNamed:#'ImageEditor leftMouseKeyIcon' |
|
364 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JEE@@B!!QP@@(TT@@@@@@@AUUP@@UUT@@EUU@@AUUP@@UUT@@EUU@@@UU@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]! |
|
365 |
||
366 |
rightMouseKeyIcon |
|
367 |
"This resource specification was automatically generated |
|
368 |
by the ImageEditor of ST/X." |
|
369 |
||
370 |
"Do not manually edit this!! If it is corrupted, |
|
371 |
the ImageEditor may not be able to read the specification." |
|
372 |
||
373 |
" |
|
374 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
|
375 |
" |
|
376 |
||
377 |
<resource: #image> |
|
378 |
||
379 |
^Icon |
|
380 |
constantNamed:#'ImageEditor rightMouseKeyIcon' |
|
381 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EEJ@@AQR @@TT(@@@@@@@AUUP@@UUT@@EUU@@AUUP@@UUT@@EUU@@@UU@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]! ! |
|
382 |
||
400 | 383 |
!ImageEditor class methodsFor:'interface specs'! |
384 |
||
767 | 385 |
dialogSpecForNewImage |
737 | 386 |
"This resource specification was automatically generated |
387 |
by the UIPainter of ST/X." |
|
519 | 388 |
|
737 | 389 |
"Do not manually edit this!! If it is corrupted, |
390 |
the UIPainter may not be able to read the specification." |
|
519 | 391 |
|
392 |
" |
|
767 | 393 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
394 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 395 |
" |
396 |
||
397 |
<resource: #canvas> |
|
398 |
||
399 |
^ |
|
400 |
||
401 |
#(#FullSpec |
|
672 | 402 |
#window: |
519 | 403 |
#(#WindowSpec |
672 | 404 |
#name: 'New Image' |
975 | 405 |
#layout: #(#LayoutFrame 81 0 288 0 381 0 406 0) |
672 | 406 |
#label: 'New Image' |
407 |
#min: #(#Point 10 10) |
|
408 |
#max: #(#Point 1152 900) |
|
975 | 409 |
#bounds: #(#Rectangle 81 288 382 407) |
672 | 410 |
#usePreferredExtent: false |
519 | 411 |
) |
672 | 412 |
#component: |
519 | 413 |
#(#SpecCollection |
672 | 414 |
#collection: |
519 | 415 |
#( |
416 |
#(#ViewSpec |
|
672 | 417 |
#name: 'View' |
737 | 418 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -35 1.0) |
672 | 419 |
#component: |
519 | 420 |
#(#SpecCollection |
672 | 421 |
#collection: |
519 | 422 |
#( |
423 |
#(#FramedBoxSpec |
|
672 | 424 |
#name: 'framedBox1' |
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
425 |
#layout: #(#LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
672 | 426 |
#component: |
519 | 427 |
#(#SpecCollection |
672 | 428 |
#collection: |
519 | 429 |
#( |
430 |
#(#ComboBoxSpec |
|
672 | 431 |
#name: 'defaultSizesComboBox' |
975 | 432 |
#layout: #(#LayoutFrame 0 0.0 10 0.0 0 1 35 0.0) |
672 | 433 |
#model: #selectionOfSize |
434 |
#type: #string |
|
435 |
#comboList: #listOfDefaultSizes |
|
519 | 436 |
) |
437 |
) |
|
438 |
) |
|
672 | 439 |
#label: 'Size' |
440 |
#labelPosition: #topLeft |
|
441 |
#style: #(#FontDescription #helvetica #medium #roman 12) |
|
519 | 442 |
) |
443 |
#(#FramedBoxSpec |
|
672 | 444 |
#name: 'framedBox2' |
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
445 |
#layout: #(#LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
672 | 446 |
#component: |
519 | 447 |
#(#SpecCollection |
672 | 448 |
#collection: |
519 | 449 |
#( |
450 |
#(#ComboListSpec |
|
672 | 451 |
#name: 'colorMapComboBox' |
975 | 452 |
#layout: #(#LayoutFrame 0 0.0 10 0.0 0 1 35 0.0) |
672 | 453 |
#model: #selectionOfColorMap |
454 |
#comboList: #listOfColorMaps |
|
455 |
#useIndex: false |
|
519 | 456 |
) |
457 |
) |
|
458 |
) |
|
672 | 459 |
#label: 'Color Map' |
460 |
#labelPosition: #topLeft |
|
461 |
#style: #(#FontDescription #helvetica #medium #roman 12) |
|
519 | 462 |
) |
463 |
) |
|
464 |
) |
|
672 | 465 |
#level: 1 |
519 | 466 |
) |
672 | 467 |
#(#UISubSpecification |
975 | 468 |
#name: 'windowSpecForCommitWithoutChannels' |
737 | 469 |
#layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
672 | 470 |
#minorKey: #windowSpecForCommitWithoutChannels |
519 | 471 |
) |
472 |
) |
|
473 |
) |
|
474 |
) |
|
767 | 475 |
! |
476 |
||
1045 | 477 |
gropDialogSpec |
986 | 478 |
"This resource specification was automatically generated |
479 |
by the UIPainter of ST/X." |
|
480 |
||
481 |
"Do not manually edit this!! If it is corrupted, |
|
482 |
the UIPainter may not be able to read the specification." |
|
483 |
||
484 |
" |
|
485 |
UIPainter new openOnClass:ImageEditor andSelector:#grobDialogSpec |
|
486 |
ImageEditor new openInterface:#grobDialogSpec |
|
487 |
" |
|
488 |
||
489 |
<resource: #canvas> |
|
490 |
||
491 |
^ |
|
492 |
||
493 |
#(#FullSpec |
|
494 |
#window: |
|
495 |
#(#WindowSpec |
|
1045 | 496 |
#name: 'Crop Borders' |
986 | 497 |
#layout: #(#LayoutFrame 22 0 233 0 266 0 415 0) |
1045 | 498 |
#label: 'Crop Borders' |
986 | 499 |
#min: #(#Point 10 10) |
500 |
#max: #(#Point 800 478) |
|
501 |
#bounds: #(#Rectangle 22 233 267 416) |
|
502 |
#usePreferredExtent: false |
|
503 |
) |
|
504 |
#component: |
|
505 |
#(#SpecCollection |
|
506 |
#collection: |
|
507 |
#( |
|
508 |
#(#LabelSpec |
|
509 |
#name: 'Label1' |
|
510 |
#layout: #(#LayoutFrame 14 0 21 0 90 0 43 0) |
|
511 |
#label: 'Left:' |
|
512 |
#translateLabel: true |
|
513 |
#adjust: #right |
|
514 |
) |
|
515 |
#(#InputFieldSpec |
|
516 |
#name: 'EntryField1' |
|
517 |
#layout: #(#LayoutFrame 95 0 21 0 132 0 43 0) |
|
518 |
#model: #left |
|
519 |
#type: #number |
|
520 |
) |
|
521 |
#(#LabelSpec |
|
522 |
#name: 'Label2' |
|
523 |
#layout: #(#LayoutFrame 14 0 51 0 90 0 73 0) |
|
524 |
#label: 'Right:' |
|
525 |
#translateLabel: true |
|
526 |
#adjust: #right |
|
527 |
) |
|
528 |
#(#InputFieldSpec |
|
529 |
#name: 'EntryField2' |
|
530 |
#layout: #(#LayoutFrame 95 0 51 0 132 0 73 0) |
|
531 |
#model: #right |
|
532 |
#type: #number |
|
533 |
) |
|
534 |
#(#LabelSpec |
|
535 |
#name: 'Label3' |
|
536 |
#layout: #(#LayoutFrame 14 0 81 0 90 0 103 0) |
|
537 |
#label: 'Top:' |
|
538 |
#translateLabel: true |
|
539 |
#adjust: #right |
|
540 |
) |
|
541 |
#(#InputFieldSpec |
|
542 |
#name: 'EntryField3' |
|
543 |
#layout: #(#LayoutFrame 95 0 81 0 132 0 103 0) |
|
544 |
#model: #top |
|
545 |
#type: #number |
|
546 |
) |
|
547 |
#(#LabelSpec |
|
548 |
#name: 'Label4' |
|
549 |
#layout: #(#LayoutFrame 14 0 111 0 90 0 133 0) |
|
550 |
#label: 'Bottom:' |
|
551 |
#translateLabel: true |
|
552 |
#adjust: #right |
|
553 |
) |
|
554 |
#(#InputFieldSpec |
|
555 |
#name: 'EntryField4' |
|
556 |
#layout: #(#LayoutFrame 95 0 111 0 132 0 133 0) |
|
557 |
#model: #bottom |
|
558 |
#type: #number |
|
559 |
) |
|
560 |
#(#HorizontalPanelViewSpec |
|
561 |
#name: 'HorizontalPanel1' |
|
562 |
#layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
563 |
#component: |
|
564 |
#(#SpecCollection |
|
565 |
#collection: |
|
566 |
#( |
|
567 |
#(#ActionButtonSpec |
|
568 |
#name: 'Button1' |
|
569 |
#label: 'Cancel' |
|
570 |
#translateLabel: true |
|
571 |
#model: #cancel |
|
572 |
#extent: #(#Point 118 22) |
|
573 |
) |
|
574 |
#(#ActionButtonSpec |
|
575 |
#name: 'Button2' |
|
576 |
#label: 'OK' |
|
577 |
#translateLabel: true |
|
578 |
#model: #accept |
|
579 |
#extent: #(#Point 118 22) |
|
580 |
) |
|
581 |
) |
|
582 |
) |
|
583 |
#horizontalLayout: #fitSpace |
|
584 |
#verticalLayout: #center |
|
585 |
#horizontalSpace: 3 |
|
586 |
#verticalSpace: 3 |
|
587 |
) |
|
588 |
) |
|
589 |
) |
|
590 |
) |
|
591 |
||
592 |
"Modified: / 7.9.1998 / 18:29:34 / cg" |
|
593 |
! |
|
594 |
||
767 | 595 |
windowSpec |
596 |
"This resource specification was automatically generated |
|
597 |
by the UIPainter of ST/X." |
|
598 |
||
599 |
"Do not manually edit this!! If it is corrupted, |
|
600 |
the UIPainter may not be able to read the specification." |
|
601 |
||
602 |
" |
|
603 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
604 |
ImageEditor new openInterface:#windowSpec |
|
605 |
ImageEditor open |
|
606 |
" |
|
607 |
||
608 |
<resource: #canvas> |
|
609 |
||
610 |
^ |
|
611 |
||
612 |
#(#FullSpec |
|
613 |
#window: |
|
614 |
#(#WindowSpec |
|
615 |
#name: 'Image Editor' |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
616 |
#layout: #(#LayoutFrame 507 0 28 0 1004 0 371 0) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
617 |
#level: 0 |
767 | 618 |
#label: 'Image Editor' |
619 |
#min: #(#Point 400 320) |
|
620 |
#max: #(#Point 1152 900) |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
621 |
#bounds: #(#Rectangle 507 28 1005 372) |
767 | 622 |
#menu: #menu |
623 |
#usePreferredExtent: false |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
624 |
#returnIsOKInDialog: true |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
625 |
#escapeIsCancelInDialog: true |
767 | 626 |
) |
627 |
#component: |
|
628 |
#(#SpecCollection |
|
629 |
#collection: |
|
630 |
#( |
|
631 |
#(#MenuPanelSpec |
|
632 |
#name: 'menuToolbarView' |
|
633 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
634 |
#menu: #menuToolbar |
|
635 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
636 |
#showSeparatingLines: true |
|
637 |
) |
|
638 |
#(#VariableHorizontalPanelSpec |
|
639 |
#name: 'variableHorizontalPanel1' |
|
640 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
641 |
#component: |
|
642 |
#(#SpecCollection |
|
643 |
#collection: |
|
644 |
#( |
|
645 |
#(#ViewSpec |
|
646 |
#name: 'view1' |
|
647 |
#component: |
|
648 |
#(#SpecCollection |
|
649 |
#collection: |
|
650 |
#( |
|
651 |
#(#VariableVerticalPanelSpec |
|
652 |
#name: 'VariableVerticalPanel1' |
|
653 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
654 |
#component: |
|
655 |
#(#SpecCollection |
|
656 |
#collection: |
|
657 |
#( |
|
658 |
#(#ViewSpec |
|
659 |
#name: 'View1' |
|
660 |
#component: |
|
661 |
#(#SpecCollection |
|
662 |
#collection: |
|
663 |
#( |
|
664 |
#(#MenuPanelSpec |
|
665 |
#name: 'MouseButtonColorToolBar' |
|
666 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
667 |
#menu: #menuMouseButtonColors |
|
668 |
) |
|
669 |
#(#DataSetSpec |
|
670 |
#name: 'colorDataSetView' |
|
671 |
#layout: #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
672 |
#activeHelpKey: #colorMapTable |
|
673 |
#model: #selectionOfColor |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
674 |
#menu: #colorMapMenu |
767 | 675 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
676 |
#hasHorizontalScrollBar: true |
|
677 |
#hasVerticalScrollBar: true |
|
678 |
#miniScrollerHorizontal: true |
|
679 |
#miniScrollerVertical: true |
|
680 |
#dataList: #listOfColors |
|
681 |
#has3Dsepartors: true |
|
905 | 682 |
#has3Dseparators: true |
767 | 683 |
#verticalSpacing: 1 |
684 |
#columns: |
|
685 |
#( |
|
686 |
#(#DataSetColumnSpec |
|
687 |
#rendererType: #rowSelector |
|
688 |
#backgroundSelector: #yourself |
|
689 |
) |
|
690 |
#(#DataSetColumnSpec |
|
691 |
#label: 'R' |
|
692 |
#labelAlignment: #left |
|
942 | 693 |
#columnAlignment: #right |
694 |
#editorType: #InputField |
|
695 |
#type: #number |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
696 |
#model: #redFromColor: |
942 | 697 |
#writeSelector: #redAtColor:put: |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
698 |
#selectSelector: #canSelectRedInColor: |
767 | 699 |
) |
700 |
#(#DataSetColumnSpec |
|
701 |
#label: 'G' |
|
702 |
#labelAlignment: #left |
|
942 | 703 |
#columnAlignment: #right |
704 |
#editorType: #InputField |
|
705 |
#type: #number |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
706 |
#model: #greenFromColor: |
942 | 707 |
#writeSelector: #greenAtColor:put: |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
708 |
#selectSelector: #canSelectGreenInColor: |
767 | 709 |
) |
710 |
#(#DataSetColumnSpec |
|
711 |
#label: 'B' |
|
712 |
#labelAlignment: #left |
|
942 | 713 |
#columnAlignment: #right |
714 |
#editorType: #InputField |
|
715 |
#type: #number |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
716 |
#model: #blueFromColor: |
942 | 717 |
#writeSelector: #blueAtColor:put: |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
718 |
#selectSelector: #canSelectBlueInColor: |
767 | 719 |
) |
720 |
) |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
721 |
#columnAdaptor: #colorColumnAdaptor |
767 | 722 |
) |
723 |
) |
|
724 |
) |
|
725 |
) |
|
726 |
#(#ArbitraryComponentSpec |
|
727 |
#name: 'imagePreView' |
|
728 |
#activeHelpKey: #previewView |
|
729 |
#hasHorizontalScrollBar: true |
|
730 |
#hasVerticalScrollBar: true |
|
731 |
#miniScrollerHorizontal: true |
|
732 |
#miniScrollerVertical: true |
|
733 |
#component: #ImageView |
|
734 |
#hasBorder: false |
|
735 |
) |
|
736 |
) |
|
737 |
) |
|
738 |
#handles: #(#Any 0.723776 1.0) |
|
739 |
) |
|
740 |
) |
|
741 |
) |
|
742 |
) |
|
743 |
#(#ViewSpec |
|
744 |
#name: 'view2' |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
745 |
#level: -1 |
767 | 746 |
#component: |
747 |
#(#SpecCollection |
|
748 |
#collection: |
|
749 |
#( |
|
750 |
#(#ArbitraryComponentSpec |
|
751 |
#name: 'imageEditView' |
|
752 |
#layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
753 |
#hasHorizontalScrollBar: true |
|
754 |
#hasVerticalScrollBar: true |
|
755 |
#component: #ImageEditView |
|
756 |
#hasBorder: false |
|
757 |
) |
|
758 |
#(#LabelSpec |
|
759 |
#name: 'coordLabel' |
|
760 |
#layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
761 |
#level: -1 |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
762 |
#labelChannel: #imageInfoHolder |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
763 |
#resizeForLabel: false |
767 | 764 |
#adjust: #left |
765 |
) |
|
766 |
#(#ArrowButtonSpec |
|
767 |
#name: 'magnifyDownButton' |
|
768 |
#layout: #(#LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
769 |
#activeHelpKey: #magnifyImageDown |
|
770 |
#model: #doMagnifyDown |
|
771 |
#enableChannel: #imageIsLoaded |
|
772 |
#isTriggerOnDown: true |
|
773 |
#direction: #left |
|
774 |
) |
|
775 |
#(#ArrowButtonSpec |
|
776 |
#name: 'magnifyUpButton' |
|
777 |
#layout: #(#LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
778 |
#activeHelpKey: #magnifyImageUp |
|
779 |
#model: #doMagnifyUp |
|
780 |
#enableChannel: #imageIsLoaded |
|
781 |
#isTriggerOnDown: true |
|
782 |
#direction: #right |
|
783 |
) |
|
784 |
#(#InputFieldSpec |
|
785 |
#name: 'magnificationInputField' |
|
786 |
#layout: #(#LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
787 |
#activeHelpKey: #magnificationNumber |
|
788 |
#enableChannel: #imageIsLoaded |
|
789 |
#model: #valueOfMagnification |
|
905 | 790 |
#type: #numberInRange |
767 | 791 |
#acceptOnReturn: false |
792 |
#acceptOnTab: false |
|
793 |
#numChars: 2 |
|
905 | 794 |
#minValue: 1 |
795 |
#maxValue: 99 |
|
767 | 796 |
) |
797 |
) |
|
798 |
) |
|
799 |
) |
|
800 |
) |
|
801 |
) |
|
802 |
#handles: #(#Any 0.276 1.0) |
|
803 |
) |
|
804 |
#(#UISubSpecification |
|
805 |
#name: 'infoBarSubSpec' |
|
806 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
807 |
#majorKey: #ToolApplicationModel |
|
808 |
#minorKey: #windowSpecForInfoBar |
|
809 |
) |
|
810 |
) |
|
811 |
) |
|
812 |
) |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
813 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
814 |
"Modified: / 12.3.1999 / 00:15:05 / cg" |
519 | 815 |
! ! |
816 |
||
817 |
!ImageEditor class methodsFor:'menu specs'! |
|
818 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
819 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
820 |
"This resource specification was automatically generated |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
821 |
by the MenuEditor of ST/X." |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
822 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
823 |
"Do not manually edit this!! If it is corrupted, |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
824 |
the MenuEditor may not be able to read the specification." |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
825 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
826 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
827 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuSpec |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
828 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSpec)) startUp |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
829 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
830 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
831 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
832 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
833 |
^ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
834 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
835 |
#(#Menu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
836 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
837 |
#( |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
838 |
#(#MenuItem |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
839 |
#label: 'Add Color' |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
840 |
#translateLabel: true |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
841 |
#value: #addColorToColormap |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
842 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
843 |
) nil |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
844 |
nil |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
845 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
846 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
847 |
"Created: / 12.3.1999 / 00:19:00 / cg" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
848 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
849 |
|
400 | 850 |
menu |
737 | 851 |
"This resource specification was automatically generated |
852 |
by the MenuEditor of ST/X." |
|
400 | 853 |
|
737 | 854 |
"Do not manually edit this!! If it is corrupted, |
855 |
the MenuEditor may not be able to read the specification." |
|
400 | 856 |
|
857 |
" |
|
858 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
859 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
860 |
" |
|
861 |
||
862 |
<resource: #menu> |
|
863 |
||
1124 | 864 |
^ |
865 |
#(#Menu |
|
866 |
#( |
|
867 |
#(#MenuItem |
|
868 |
#label: 'About' |
|
869 |
#translateLabel: true |
|
870 |
#activeHelpKey: #about |
|
871 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
|
872 |
#submenuChannel: #menuAbout |
|
873 |
) |
|
874 |
#(#MenuItem |
|
875 |
#label: 'File' |
|
876 |
#translateLabel: true |
|
877 |
#activeHelpKey: #file |
|
878 |
#submenu: |
|
879 |
#(#Menu |
|
880 |
#( |
|
881 |
#(#MenuItem |
|
882 |
#label: 'New...' |
|
883 |
#translateLabel: true |
|
884 |
#value: #doNewImage |
|
885 |
#activeHelpKey: #fileNewImage |
|
886 |
) |
|
887 |
#(#MenuItem |
|
888 |
#label: '-' |
|
889 |
) |
|
890 |
#(#MenuItem |
|
891 |
#label: 'Load...' |
|
892 |
#translateLabel: true |
|
893 |
#value: #doLoadFromClass |
|
894 |
#activeHelpKey: #fileLoadFromClass |
|
895 |
) |
|
896 |
#(#MenuItem |
|
897 |
#label: 'Load From File...' |
|
898 |
#translateLabel: true |
|
899 |
#value: #doLoadFromFile |
|
900 |
#activeHelpKey: #fileLoadFromFile |
|
901 |
) |
|
902 |
#(#MenuItem |
|
903 |
#label: 'Grab From Screen' |
|
904 |
#translateLabel: true |
|
905 |
#value: #grabScreenImage |
|
906 |
#activeHelpKey: #fileGrabImage |
|
907 |
) |
|
908 |
#(#MenuItem |
|
909 |
#label: '-' |
|
910 |
) |
|
911 |
#(#MenuItem |
|
912 |
#label: 'Save' |
|
913 |
#translateLabel: true |
|
914 |
#value: #doSaveMethod |
|
915 |
#activeHelpKey: #fileSaveMethod |
|
916 |
#enabled: #imageIsLoadedAndClassDefined |
|
917 |
) |
|
918 |
#(#MenuItem |
|
919 |
#label: 'Save As...' |
|
920 |
#translateLabel: true |
|
921 |
#value: #doSaveMethodAs |
|
922 |
#activeHelpKey: #fileSaveMethodAs |
|
923 |
#enabled: #imageIsLoaded |
|
924 |
) |
|
925 |
#(#MenuItem |
|
926 |
#label: '-' |
|
927 |
) |
|
928 |
#(#MenuItem |
|
929 |
#label: 'Save To File...' |
|
930 |
#translateLabel: true |
|
931 |
#value: #doSaveImageFileAs |
|
932 |
#activeHelpKey: #fileSaveAs |
|
933 |
#enabled: #imageIsLoaded |
|
934 |
) |
|
935 |
#(#MenuItem |
|
936 |
#label: 'Save Mask To File...' |
|
937 |
#translateLabel: true |
|
938 |
#value: #doSaveImageMaskFileAs |
|
939 |
#activeHelpKey: #fileSaveMaskAs |
|
940 |
#enabled: #imageIsLoaded |
|
941 |
) |
|
942 |
#(#MenuItem |
|
943 |
#label: '-' |
|
944 |
) |
|
945 |
#(#MenuItem |
|
946 |
#label: 'Print' |
|
947 |
#translateLabel: true |
|
948 |
#value: #doPrint |
|
949 |
#activeHelpKey: #filePrint |
|
950 |
#enabled: #imageIsLoaded |
|
951 |
) |
|
952 |
#(#MenuItem |
|
953 |
#label: '-' |
|
954 |
) |
|
955 |
#(#MenuItem |
|
956 |
#label: 'Browse Class' |
|
957 |
#translateLabel: true |
|
958 |
#value: #doBrowseClass |
|
959 |
#activeHelpKey: #fileBrowseClass |
|
960 |
#enabled: #hasClassDefined |
|
961 |
) |
|
962 |
#(#MenuItem |
|
963 |
#label: '-' |
|
964 |
) |
|
965 |
#(#MenuItem |
|
966 |
#label: 'Exit' |
|
967 |
#translateLabel: true |
|
968 |
#value: #closeRequest |
|
969 |
#activeHelpKey: #fileExit |
|
970 |
) |
|
971 |
) |
|
972 |
nil |
|
973 |
nil |
|
400 | 974 |
) |
1124 | 975 |
) |
976 |
#(#MenuItem |
|
977 |
#label: 'Edit' |
|
978 |
#translateLabel: true |
|
979 |
#activeHelpKey: #edit |
|
980 |
#enabled: #imageIsLoaded |
|
981 |
#submenu: |
|
982 |
#(#Menu |
|
983 |
#( |
|
984 |
#(#MenuItem |
|
985 |
#label: 'Undo' |
|
986 |
#translateLabel: true |
|
987 |
#value: #doUndo |
|
988 |
#activeHelpKey: #editUndo |
|
989 |
#enabled: #valueOfCanUndo |
|
990 |
) |
|
991 |
#(#MenuItem |
|
992 |
#label: '-' |
|
993 |
) |
|
994 |
#(#MenuItem |
|
995 |
#label: 'Flip - Vertical' |
|
996 |
#translateLabel: true |
|
997 |
#value: #doFlipVertical |
|
998 |
#activeHelpKey: #editFlipVertical |
|
999 |
) |
|
1000 |
#(#MenuItem |
|
1001 |
#label: 'Flip - Horizontal' |
|
1002 |
#translateLabel: true |
|
1003 |
#value: #doFlipHorizontal |
|
1004 |
#activeHelpKey: #editFlipHorizontal |
|
1005 |
) |
|
1006 |
#(#MenuItem |
|
1007 |
#label: '-' |
|
1008 |
) |
|
1009 |
#(#MenuItem |
|
1010 |
#label: 'Resize...' |
|
1011 |
#translateLabel: true |
|
1012 |
#value: #doResizeImage |
|
1013 |
#activeHelpKey: #editResize |
|
1014 |
) |
|
1015 |
#(#MenuItem |
|
1016 |
#label: 'Magnify...' |
|
1017 |
#translateLabel: true |
|
1018 |
#value: #doMagnifyImage |
|
1019 |
#activeHelpKey: #editMagnifyImage |
|
1020 |
) |
|
1021 |
#(#MenuItem |
|
1022 |
#label: 'Rotate...' |
|
1023 |
#translateLabel: true |
|
1024 |
#value: #doRotateImage |
|
1025 |
#activeHelpKey: #editRotate |
|
1026 |
) |
|
1027 |
#(#MenuItem |
|
1028 |
#label: '-' |
|
1029 |
) |
|
1030 |
#(#MenuItem |
|
1146 | 1031 |
#label: 'Invert' |
1032 |
#translateLabel: true |
|
1033 |
#value: #doNegativeImage |
|
1034 |
) |
|
1035 |
#(#MenuItem |
|
1036 |
#label: '-' |
|
1037 |
) |
|
1038 |
#(#MenuItem |
|
1124 | 1039 |
#label: 'Crop' |
1040 |
#translateLabel: true |
|
1041 |
#submenu: |
|
400 | 1042 |
#(#Menu |
1124 | 1043 |
#( |
1044 |
#(#MenuItem |
|
1045 |
#label: 'All' |
|
1046 |
#translateLabel: true |
|
1047 |
#value: #doCropAll |
|
1048 |
#activeHelpKey: #cropAll |
|
400 | 1049 |
) |
1124 | 1050 |
#(#MenuItem |
1051 |
#label: '-' |
|
986 | 1052 |
) |
1124 | 1053 |
#(#MenuItem |
1054 |
#label: 'Left' |
|
1055 |
#translateLabel: true |
|
1056 |
#value: #doCropLeft |
|
1057 |
#activeHelpKey: #cropLeft |
|
1058 |
) |
|
1059 |
#(#MenuItem |
|
1060 |
#label: 'Right' |
|
1061 |
#translateLabel: true |
|
1062 |
#value: #doCropRight |
|
1063 |
#activeHelpKey: #cropRight |
|
986 | 1064 |
) |
1124 | 1065 |
#(#MenuItem |
1066 |
#label: 'Top' |
|
1067 |
#translateLabel: true |
|
1068 |
#value: #doCropTop |
|
1069 |
#activeHelpKey: #cropTop |
|
672 | 1070 |
) |
1124 | 1071 |
#(#MenuItem |
1072 |
#label: 'Bottom' |
|
1073 |
#translateLabel: true |
|
1074 |
#value: #doCropBottom |
|
1075 |
#activeHelpKey: #cropBottom |
|
400 | 1076 |
) |
1124 | 1077 |
#(#MenuItem |
1078 |
#label: '-' |
|
400 | 1079 |
) |
1124 | 1080 |
#(#MenuItem |
1081 |
#label: 'Manual...' |
|
1082 |
#translateLabel: true |
|
1083 |
#value: #doCropManual |
|
1084 |
#activeHelpKey: #cropManual |
|
400 | 1085 |
) |
1124 | 1086 |
) |
1087 |
nil |
|
400 | 1088 |
nil |
1124 | 1089 |
) |
400 | 1090 |
) |
1124 | 1091 |
) |
1092 |
nil |
|
1093 |
nil |
|
400 | 1094 |
) |
1124 | 1095 |
) |
1096 |
#(#MenuItem |
|
1097 |
#label: 'ColorMap' |
|
1098 |
#translateLabel: true |
|
1099 |
#activeHelpKey: #colorMap |
|
1100 |
#enabled: #imageIsLoaded |
|
1101 |
#submenu: |
|
1102 |
#(#Menu |
|
1103 |
#( |
|
1104 |
#(#MenuItem |
|
1105 |
#label: '8-Plane' |
|
1106 |
#translateLabel: true |
|
1107 |
#value: #colorMapMode: |
|
1108 |
#activeHelpKey: #colorMap8 |
|
1109 |
#argument: '8-plane' |
|
1110 |
#choice: #colorMapMode |
|
1111 |
#choiceValue: '8-plane' |
|
1112 |
) |
|
1113 |
#(#MenuItem |
|
1114 |
#label: '4-Plane' |
|
1115 |
#translateLabel: true |
|
1116 |
#value: #colorMapMode: |
|
1117 |
#activeHelpKey: #colorMap4 |
|
1118 |
#argument: '4-plane' |
|
1119 |
#choice: #colorMapMode |
|
1120 |
#choiceValue: '4-plane' |
|
1121 |
) |
|
1122 |
#(#MenuItem |
|
1123 |
#label: '2-Plane' |
|
1124 |
#translateLabel: true |
|
1125 |
#value: #colorMapMode: |
|
1126 |
#activeHelpKey: #colorMap2 |
|
1127 |
#argument: '2-plane' |
|
1128 |
#choice: #colorMapMode |
|
1129 |
#choiceValue: '2-plane' |
|
1130 |
) |
|
1131 |
#(#MenuItem |
|
1132 |
#label: '1-Plane' |
|
1133 |
#translateLabel: true |
|
1134 |
#value: #colorMapMode: |
|
1135 |
#activeHelpKey: #colorMap1 |
|
1136 |
#argument: '1-plane' |
|
1137 |
#choice: #colorMapMode |
|
1138 |
#choiceValue: '1-plane' |
|
1139 |
) |
|
1140 |
#(#MenuItem |
|
1141 |
#label: '-' |
|
1142 |
) |
|
1143 |
#(#MenuItem |
|
1144 |
#label: '8-Plane + Mask' |
|
1145 |
#translateLabel: true |
|
1146 |
#value: #colorMapMode: |
|
1147 |
#activeHelpKey: #colorMap8M |
|
1148 |
#argument: '8-plane + mask' |
|
1149 |
#choice: #colorMapMode |
|
1150 |
#choiceValue: '8-plane + mask' |
|
1151 |
) |
|
1152 |
#(#MenuItem |
|
1153 |
#label: '4-Plane + Mask' |
|
1154 |
#translateLabel: true |
|
1155 |
#value: #colorMapMode: |
|
1156 |
#activeHelpKey: #colorMap4M |
|
1157 |
#argument: '4-plane + mask' |
|
1158 |
#choice: #colorMapMode |
|
1159 |
#choiceValue: '4-plane + mask' |
|
737 | 1160 |
) |
1124 | 1161 |
#(#MenuItem |
1162 |
#label: '2-Plane + Mask' |
|
1163 |
#translateLabel: true |
|
1164 |
#value: #colorMapMode: |
|
1165 |
#activeHelpKey: #colorMap2M |
|
1166 |
#argument: '2-plane + mask' |
|
1167 |
#choice: #colorMapMode |
|
1168 |
#choiceValue: '2-plane + mask' |
|
1169 |
) |
|
1170 |
#(#MenuItem |
|
1171 |
#label: '1-Plane + Mask' |
|
1172 |
#translateLabel: true |
|
1173 |
#value: #colorMapMode: |
|
1174 |
#activeHelpKey: #colorMap1M |
|
1175 |
#argument: '1-plane + mask' |
|
1176 |
#choice: #colorMapMode |
|
1177 |
#choiceValue: '1-plane + mask' |
|
1178 |
) |
|
1179 |
#(#MenuItem |
|
1180 |
#label: '-' |
|
1181 |
) |
|
1182 |
#(#MenuItem |
|
1183 |
#label: 'Compress colormap' |
|
1184 |
#translateLabel: true |
|
1185 |
#value: #compressColorMap |
|
1186 |
#activeHelpKey: #compressColormap |
|
1187 |
#enabled: #hasColormap |
|
1188 |
) |
|
1189 |
#(#MenuItem |
|
1190 |
#label: 'Sort colormap' |
|
1191 |
#translateLabel: true |
|
1192 |
#value: #sortColorMap |
|
1193 |
#enabled: #hasColormap |
|
1194 |
) |
|
1195 |
#(#MenuItem |
|
1196 |
#label: '-' |
|
1197 |
) |
|
1198 |
#(#MenuItem |
|
1199 |
#label: 'Reduce number of colors...' |
|
1200 |
#translateLabel: true |
|
1201 |
#value: #reduceNumberOfColors |
|
1202 |
) |
|
1203 |
) |
|
1204 |
nil |
|
1205 |
nil |
|
756 | 1206 |
) |
1124 | 1207 |
) |
1208 |
#(#MenuItem |
|
1209 |
#label: 'Settings' |
|
1210 |
#translateLabel: true |
|
1211 |
#submenu: |
|
1212 |
#(#Menu |
|
1213 |
#( |
|
1214 |
#(#MenuItem |
|
1215 |
#label: 'Grid Magnification...' |
|
1216 |
#translateLabel: true |
|
1217 |
#value: #doChangeGridMagnification |
|
1218 |
#activeHelpKey: #settingsGridMagnification |
|
1219 |
) |
|
1220 |
) |
|
1221 |
nil |
|
1222 |
nil |
|
400 | 1223 |
) |
1124 | 1224 |
) |
1225 |
#(#MenuItem |
|
1226 |
#label: 'History' |
|
1227 |
#translateLabel: true |
|
1228 |
#activeHelpKey: #history |
|
1229 |
#submenuChannel: #menuHistory |
|
1230 |
) |
|
1231 |
#(#MenuItem |
|
1232 |
#label: 'Help' |
|
1233 |
#translateLabel: true |
|
1234 |
#startGroup: #right |
|
1235 |
#activeHelpKey: #help |
|
1236 |
#submenuChannel: #menuHelp |
|
1237 |
) |
|
1238 |
) |
|
1239 |
nil |
|
1240 |
nil |
|
400 | 1241 |
) |
1242 |
! |
|
1243 |
||
679 | 1244 |
menuMouseButtonColors |
737 | 1245 |
"This resource specification was automatically generated |
1246 |
by the MenuEditor of ST/X." |
|
679 | 1247 |
|
737 | 1248 |
"Do not manually edit this!! If it is corrupted, |
1249 |
the MenuEditor may not be able to read the specification." |
|
679 | 1250 |
|
1251 |
" |
|
1252 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
1253 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
1254 |
" |
|
1255 |
||
1256 |
<resource: #menu> |
|
1257 |
||
1258 |
^ |
|
1259 |
||
1260 |
#(#Menu |
|
1261 |
||
1262 |
#( |
|
1263 |
#(#MenuItem |
|
1264 |
#label: 'Left Mouse Button' |
|
1265 |
#nameKey: #leftMouseKeyButton |
|
1266 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 1267 |
#enabled: #imageIsLoaded |
679 | 1268 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 1269 |
#choice: #mouseKeyColorMode |
1270 |
#choiceValue: 1 |
|
679 | 1271 |
) |
1272 |
#(#MenuItem |
|
1273 |
#label: 'Right Mouse Button' |
|
1274 |
#nameKey: #rightMouseKeyButton |
|
1275 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 1276 |
#enabled: #imageIsLoaded |
679 | 1277 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 1278 |
#choice: #mouseKeyColorMode |
1279 |
#choiceValue: 2 |
|
679 | 1280 |
) |
1281 |
) nil |
|
1282 |
nil |
|
1283 |
) |
|
1284 |
! |
|
1285 |
||
400 | 1286 |
menuToolbar |
737 | 1287 |
"This resource specification was automatically generated |
1288 |
by the MenuEditor of ST/X." |
|
400 | 1289 |
|
737 | 1290 |
"Do not manually edit this!! If it is corrupted, |
1291 |
the MenuEditor may not be able to read the specification." |
|
400 | 1292 |
|
1293 |
" |
|
1294 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
1295 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
1296 |
" |
|
1297 |
||
1298 |
<resource: #menu> |
|
1299 |
||
1196 | 1300 |
^ |
1301 |
#(#Menu |
|
1302 |
#( |
|
1303 |
#(#MenuItem |
|
1304 |
#label: 'newImage' |
|
1305 |
#isButton: true |
|
1306 |
#value: #doNewImage |
|
1307 |
#activeHelpKey: #fileNewImage |
|
1308 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
|
1309 |
) |
|
1310 |
#(#MenuItem |
|
1311 |
#label: 'loadFromClass' |
|
1312 |
#isButton: true |
|
1313 |
#value: #doLoadFromClass |
|
1314 |
#activeHelpKey: #fileLoadFromClass |
|
1315 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
|
1316 |
) |
|
1317 |
#(#MenuItem |
|
1318 |
#label: 'saveMethod' |
|
1319 |
#isButton: true |
|
1320 |
#value: #doSaveMethod |
|
1321 |
#activeHelpKey: #fileSaveMethod |
|
1322 |
#enabled: #imageIsLoaded |
|
1323 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
|
1324 |
) |
|
1325 |
#(#MenuItem |
|
1326 |
#label: '' |
|
e2ced3798ed5
checkin from browser
Claus Gittinger <cg@exe |