author | Claus Gittinger <cg@exept.de> |
Wed, 24 Mar 1999 16:26:34 +0100 | |
changeset 1083 | 46a1cb1c595d |
parent 1076 | 4391fcd36dcf |
child 1121 | 9ceac76e1c8d |
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 |
||
864 |
^ |
|
865 |
||
866 |
#(#Menu |
|
867 |
||
868 |
#( |
|
869 |
#(#MenuItem |
|
672 | 870 |
#label: 'About' |
843 | 871 |
#translateLabel: true |
672 | 872 |
#activeHelpKey: #about |
873 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
|
874 |
#submenuChannel: #menuAbout |
|
400 | 875 |
) |
876 |
#(#MenuItem |
|
672 | 877 |
#label: 'File' |
878 |
#translateLabel: true |
|
879 |
#activeHelpKey: #file |
|
880 |
#submenu: |
|
400 | 881 |
#(#Menu |
882 |
||
883 |
#( |
|
884 |
#(#MenuItem |
|
672 | 885 |
#label: 'New...' |
843 | 886 |
#translateLabel: true |
767 | 887 |
#value: #doNewImage |
672 | 888 |
#activeHelpKey: #fileNewImage |
400 | 889 |
) |
890 |
#(#MenuItem |
|
672 | 891 |
#label: '-' |
400 | 892 |
) |
893 |
#(#MenuItem |
|
672 | 894 |
#label: 'Load...' |
843 | 895 |
#translateLabel: true |
767 | 896 |
#value: #doLoadFromClass |
672 | 897 |
#activeHelpKey: #fileLoadFromClass |
400 | 898 |
) |
899 |
#(#MenuItem |
|
672 | 900 |
#label: 'Load From File...' |
843 | 901 |
#translateLabel: true |
767 | 902 |
#value: #doLoadFromFile |
672 | 903 |
#activeHelpKey: #fileLoadFromFile |
400 | 904 |
) |
905 |
#(#MenuItem |
|
929 | 906 |
#label: 'Grab From Screen' |
907 |
#translateLabel: true |
|
908 |
#value: #grabScreenImage |
|
909 |
#activeHelpKey: #fileGrabImage |
|
910 |
) |
|
911 |
#(#MenuItem |
|
672 | 912 |
#label: '-' |
400 | 913 |
) |
914 |
#(#MenuItem |
|
672 | 915 |
#label: 'Save' |
843 | 916 |
#translateLabel: true |
767 | 917 |
#value: #doSaveMethod |
672 | 918 |
#activeHelpKey: #fileSaveMethod |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
919 |
#enabled: #imageIsLoadedAndClassDefined |
400 | 920 |
) |
921 |
#(#MenuItem |
|
672 | 922 |
#label: 'Save As...' |
843 | 923 |
#translateLabel: true |
767 | 924 |
#value: #doSaveMethodAs |
672 | 925 |
#activeHelpKey: #fileSaveMethodAs |
926 |
#enabled: #imageIsLoaded |
|
927 |
) |
|
928 |
#(#MenuItem |
|
929 |
#label: '-' |
|
400 | 930 |
) |
931 |
#(#MenuItem |
|
672 | 932 |
#label: 'Save To File...' |
843 | 933 |
#translateLabel: true |
767 | 934 |
#value: #doSaveImageFileAs |
672 | 935 |
#activeHelpKey: #fileSaveAs |
936 |
#enabled: #imageIsLoaded |
|
400 | 937 |
) |
938 |
#(#MenuItem |
|
672 | 939 |
#label: 'Save Mask To File...' |
843 | 940 |
#translateLabel: true |
767 | 941 |
#value: #doSaveImageMaskFileAs |
672 | 942 |
#activeHelpKey: #fileSaveMaskAs |
943 |
#enabled: #imageIsLoaded |
|
400 | 944 |
) |
945 |
#(#MenuItem |
|
672 | 946 |
#label: '-' |
400 | 947 |
) |
948 |
#(#MenuItem |
|
672 | 949 |
#label: 'Print' |
843 | 950 |
#translateLabel: true |
767 | 951 |
#value: #doPrint |
672 | 952 |
#activeHelpKey: #filePrint |
953 |
#enabled: #imageIsLoaded |
|
400 | 954 |
) |
955 |
#(#MenuItem |
|
672 | 956 |
#label: '-' |
400 | 957 |
) |
958 |
#(#MenuItem |
|
672 | 959 |
#label: 'Browse Class' |
843 | 960 |
#translateLabel: true |
767 | 961 |
#value: #doBrowseClass |
672 | 962 |
#activeHelpKey: #fileBrowseClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
963 |
#enabled: #hasClassDefined |
400 | 964 |
) |
965 |
#(#MenuItem |
|
672 | 966 |
#label: '-' |
400 | 967 |
) |
968 |
#(#MenuItem |
|
672 | 969 |
#label: 'Exit' |
970 |
#translateLabel: true |
|
971 |
#value: #closeRequest |
|
972 |
#activeHelpKey: #fileExit |
|
400 | 973 |
) |
974 |
) nil |
|
975 |
nil |
|
976 |
) |
|
977 |
) |
|
978 |
#(#MenuItem |
|
672 | 979 |
#label: 'Edit' |
843 | 980 |
#translateLabel: true |
672 | 981 |
#activeHelpKey: #edit |
982 |
#enabled: #imageIsLoaded |
|
983 |
#submenu: |
|
400 | 984 |
#(#Menu |
985 |
||
986 |
#( |
|
987 |
#(#MenuItem |
|
672 | 988 |
#label: 'Undo' |
843 | 989 |
#translateLabel: true |
767 | 990 |
#value: #doUndo |
672 | 991 |
#activeHelpKey: #editUndo |
992 |
#enabled: #valueOfCanUndo |
|
400 | 993 |
) |
994 |
#(#MenuItem |
|
672 | 995 |
#label: '-' |
400 | 996 |
) |
997 |
#(#MenuItem |
|
672 | 998 |
#label: 'Flip - Vertical' |
843 | 999 |
#translateLabel: true |
767 | 1000 |
#value: #doFlipVertical |
672 | 1001 |
#activeHelpKey: #editFlipVertical |
400 | 1002 |
) |
1003 |
#(#MenuItem |
|
672 | 1004 |
#label: 'Flip - Horizontal' |
843 | 1005 |
#translateLabel: true |
767 | 1006 |
#value: #doFlipHorizontal |
672 | 1007 |
#activeHelpKey: #editFlipHorizontal |
400 | 1008 |
) |
1009 |
#(#MenuItem |
|
672 | 1010 |
#label: '-' |
400 | 1011 |
) |
1012 |
#(#MenuItem |
|
672 | 1013 |
#label: 'Resize...' |
843 | 1014 |
#translateLabel: true |
767 | 1015 |
#value: #doResizeImage |
672 | 1016 |
#activeHelpKey: #editResize |
400 | 1017 |
) |
1018 |
#(#MenuItem |
|
672 | 1019 |
#label: 'Magnify...' |
843 | 1020 |
#translateLabel: true |
767 | 1021 |
#value: #doMagnifyImage |
672 | 1022 |
#activeHelpKey: #editMagnifyImage |
400 | 1023 |
) |
1024 |
#(#MenuItem |
|
672 | 1025 |
#label: 'Rotate...' |
843 | 1026 |
#translateLabel: true |
767 | 1027 |
#value: #doRotateImage |
672 | 1028 |
#activeHelpKey: #editRotate |
400 | 1029 |
) |
986 | 1030 |
#(#MenuItem |
1031 |
#label: '-' |
|
1032 |
) |
|
1033 |
#(#MenuItem |
|
1047 | 1034 |
#label: 'Crop' |
986 | 1035 |
#translateLabel: true |
1036 |
#submenu: |
|
1037 |
#(#Menu |
|
1038 |
||
1039 |
#( |
|
1040 |
#(#MenuItem |
|
1041 |
#label: 'All' |
|
1042 |
#translateLabel: true |
|
1047 | 1043 |
#value: #doCropAll |
1045 | 1044 |
#activeHelpKey: #cropAll |
986 | 1045 |
) |
1046 |
#(#MenuItem |
|
1047 |
#label: '-' |
|
1048 |
) |
|
1049 |
#(#MenuItem |
|
1050 |
#label: 'Left' |
|
1051 |
#translateLabel: true |
|
1047 | 1052 |
#value: #doCropLeft |
1045 | 1053 |
#activeHelpKey: #cropLeft |
986 | 1054 |
) |
1055 |
#(#MenuItem |
|
1056 |
#label: 'Right' |
|
1057 |
#translateLabel: true |
|
1047 | 1058 |
#value: #doCropRight |
1045 | 1059 |
#activeHelpKey: #cropRight |
986 | 1060 |
) |
1061 |
#(#MenuItem |
|
1062 |
#label: 'Top' |
|
1063 |
#translateLabel: true |
|
1047 | 1064 |
#value: #doCropTop |
1045 | 1065 |
#activeHelpKey: #cropTop |
986 | 1066 |
) |
1067 |
#(#MenuItem |
|
1068 |
#label: 'Bottom' |
|
1069 |
#translateLabel: true |
|
1047 | 1070 |
#value: #doCropBottom |
1045 | 1071 |
#activeHelpKey: #cropBottom |
986 | 1072 |
) |
1073 |
#(#MenuItem |
|
1074 |
#label: '-' |
|
1075 |
) |
|
1076 |
#(#MenuItem |
|
1077 |
#label: 'Manual...' |
|
1078 |
#translateLabel: true |
|
1047 | 1079 |
#value: #doCropManual |
1045 | 1080 |
#activeHelpKey: #cropManual |
986 | 1081 |
) |
1082 |
) nil |
|
1083 |
nil |
|
1084 |
) |
|
1085 |
) |
|
400 | 1086 |
) nil |
1087 |
nil |
|
1088 |
) |
|
1089 |
) |
|
1090 |
#(#MenuItem |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1091 |
#label: 'ColorMap' |
843 | 1092 |
#translateLabel: true |
672 | 1093 |
#activeHelpKey: #colorMap |
1094 |
#enabled: #imageIsLoaded |
|
1095 |
#submenu: |
|
400 | 1096 |
#(#Menu |
1097 |
||
1098 |
#( |
|
1099 |
#(#MenuItem |
|
672 | 1100 |
#label: '8-Plane' |
843 | 1101 |
#translateLabel: true |
975 | 1102 |
#value: #colorMapMode: |
929 | 1103 |
#activeHelpKey: #colorMap8 |
672 | 1104 |
#argument: '8-plane' |
975 | 1105 |
#choice: #colorMapMode |
1106 |
#choiceValue: '8-plane' |
|
672 | 1107 |
) |
1108 |
#(#MenuItem |
|
1109 |
#label: '4-Plane' |
|
843 | 1110 |
#translateLabel: true |
975 | 1111 |
#value: #colorMapMode: |
929 | 1112 |
#activeHelpKey: #colorMap4 |
672 | 1113 |
#argument: '4-plane' |
975 | 1114 |
#choice: #colorMapMode |
1115 |
#choiceValue: '4-plane' |
|
400 | 1116 |
) |
1117 |
#(#MenuItem |
|
672 | 1118 |
#label: '2-Plane' |
843 | 1119 |
#translateLabel: true |
975 | 1120 |
#value: #colorMapMode: |
929 | 1121 |
#activeHelpKey: #colorMap2 |
672 | 1122 |
#argument: '2-plane' |
975 | 1123 |
#choice: #colorMapMode |
1124 |
#choiceValue: '2-plane' |
|
400 | 1125 |
) |
1126 |
#(#MenuItem |
|
672 | 1127 |
#label: '1-Plane' |
843 | 1128 |
#translateLabel: true |
975 | 1129 |
#value: #colorMapMode: |
929 | 1130 |
#activeHelpKey: #colorMap1 |
672 | 1131 |
#argument: '1-plane' |
975 | 1132 |
#choice: #colorMapMode |
1133 |
#choiceValue: '1-plane' |
|
400 | 1134 |
) |
1135 |
#(#MenuItem |
|
672 | 1136 |
#label: '-' |
1137 |
) |
|
1138 |
#(#MenuItem |
|
1139 |
#label: '8-Plane + Mask' |
|
843 | 1140 |
#translateLabel: true |
975 | 1141 |
#value: #colorMapMode: |
929 | 1142 |
#activeHelpKey: #colorMap8M |
672 | 1143 |
#argument: '8-plane + mask' |
975 | 1144 |
#choice: #colorMapMode |
1145 |
#choiceValue: '8-plane + mask' |
|
400 | 1146 |
) |
1147 |
#(#MenuItem |
|
672 | 1148 |
#label: '4-Plane + Mask' |
843 | 1149 |
#translateLabel: true |
975 | 1150 |
#value: #colorMapMode: |
929 | 1151 |
#activeHelpKey: #colorMap4M |
672 | 1152 |
#argument: '4-plane + mask' |
975 | 1153 |
#choice: #colorMapMode |
1154 |
#choiceValue: '4-plane + mask' |
|
400 | 1155 |
) |
1156 |
#(#MenuItem |
|
672 | 1157 |
#label: '2-Plane + Mask' |
843 | 1158 |
#translateLabel: true |
975 | 1159 |
#value: #colorMapMode: |
929 | 1160 |
#activeHelpKey: #colorMap2M |
672 | 1161 |
#argument: '2-plane + mask' |
975 | 1162 |
#choice: #colorMapMode |
1163 |
#choiceValue: '2-plane + mask' |
|
672 | 1164 |
) |
1165 |
#(#MenuItem |
|
1166 |
#label: '1-Plane + Mask' |
|
843 | 1167 |
#translateLabel: true |
975 | 1168 |
#value: #colorMapMode: |
929 | 1169 |
#activeHelpKey: #colorMap1M |
672 | 1170 |
#argument: '1-plane + mask' |
975 | 1171 |
#choice: #colorMapMode |
1172 |
#choiceValue: '1-plane + mask' |
|
400 | 1173 |
) |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1174 |
#(#MenuItem |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1175 |
#label: '-' |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1176 |
) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1177 |
#(#MenuItem |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1178 |
#label: 'Compress colormap' |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1179 |
#translateLabel: true |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
1180 |
#value: #compressColorMap |
929 | 1181 |
#activeHelpKey: #compressColormap |
1008 | 1182 |
#enabled: #hasColormap |
1183 |
) |
|
1184 |
#(#MenuItem |
|
1185 |
#label: 'Sort colormap' |
|
1186 |
#translateLabel: true |
|
1187 |
#value: #sortColorMap |
|
1188 |
#enabled: #hasColormap |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1189 |
) |
400 | 1190 |
) nil |
1191 |
nil |
|
1192 |
) |
|
1193 |
) |
|
1194 |
#(#MenuItem |
|
737 | 1195 |
#label: 'Settings' |
843 | 1196 |
#translateLabel: true |
737 | 1197 |
#submenu: |
1198 |
#(#Menu |
|
1199 |
||
1200 |
#( |
|
1201 |
#(#MenuItem |
|
905 | 1202 |
#label: 'Grid Magnification...' |
1203 |
#translateLabel: true |
|
1204 |
#value: #doChangeGridMagnification |
|
1205 |
#activeHelpKey: #settingsGridMagnification |
|
1206 |
) |
|
1033
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1207 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1208 |
"/ #label: '-' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1209 |
"/ ) |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1210 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1211 |
"/ #label: 'Fonts' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1212 |
"/ #translateLabel: true |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1213 |
"/ #submenuChannel: #menuFont |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1214 |
"/ ) |
737 | 1215 |
) nil |
1216 |
nil |
|
1217 |
) |
|
1218 |
) |
|
1219 |
#(#MenuItem |
|
756 | 1220 |
#label: 'History' |
843 | 1221 |
#translateLabel: true |
756 | 1222 |
#activeHelpKey: #history |
1223 |
#submenuChannel: #menuHistory |
|
1224 |
) |
|
1225 |
#(#MenuItem |
|
672 | 1226 |
#label: 'Help' |
843 | 1227 |
#translateLabel: true |
672 | 1228 |
#startGroup: #right |
1229 |
#activeHelpKey: #help |
|
1230 |
#submenuChannel: #menuHelp |
|
400 | 1231 |
) |
1232 |
) nil |
|
1233 |
nil |
|
1234 |
) |
|
986 | 1235 |
|
1008 | 1236 |
"Modified: / 30.9.1998 / 23:53:12 / cg" |
400 | 1237 |
! |
1238 |
||
679 | 1239 |
menuMouseButtonColors |
737 | 1240 |
"This resource specification was automatically generated |
1241 |
by the MenuEditor of ST/X." |
|
679 | 1242 |
|
737 | 1243 |
"Do not manually edit this!! If it is corrupted, |
1244 |
the MenuEditor may not be able to read the specification." |
|
679 | 1245 |
|
1246 |
" |
|
1247 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
1248 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
1249 |
" |
|
1250 |
||
1251 |
<resource: #menu> |
|
1252 |
||
1253 |
^ |
|
1254 |
||
1255 |
#(#Menu |
|
1256 |
||
1257 |
#( |
|
1258 |
#(#MenuItem |
|
1259 |
#label: 'Left Mouse Button' |
|
1260 |
#nameKey: #leftMouseKeyButton |
|
1261 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 1262 |
#enabled: #imageIsLoaded |
679 | 1263 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 1264 |
#choice: #mouseKeyColorMode |
1265 |
#choiceValue: 1 |
|
679 | 1266 |
) |
1267 |
#(#MenuItem |
|
1268 |
#label: 'Right Mouse Button' |
|
1269 |
#nameKey: #rightMouseKeyButton |
|
1270 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 1271 |
#enabled: #imageIsLoaded |
679 | 1272 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 1273 |
#choice: #mouseKeyColorMode |
1274 |
#choiceValue: 2 |
|
679 | 1275 |
) |
1276 |
) nil |
|
1277 |
nil |
|
1278 |
) |
|
1279 |
! |
|
1280 |
||
400 | 1281 |
menuToolbar |
737 | 1282 |
"This resource specification was automatically generated |
1283 |
by the MenuEditor of ST/X." |
|
400 | 1284 |
|
737 | 1285 |
"Do not manually edit this!! If it is corrupted, |
1286 |
the MenuEditor may not be able to read the specification." |
|
400 | 1287 |
|
1288 |
" |
|
1289 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
1290 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
1291 |
" |
|
1292 |
||
1293 |
<resource: #menu> |
|
1294 |
||
1295 |
^ |
|
1296 |
||
1297 |
#(#Menu |
|
1298 |
||
1299 |
#( |
|
1300 |
#(#MenuItem |
|
672 | 1301 |
#label: 'newImage' |
1302 |
#isButton: true |
|
767 | 1303 |
#value: #doNewImage |
672 | 1304 |
#activeHelpKey: #fileNewImage |
880 | 1305 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
400 | 1306 |
) |
1307 |
#(#MenuItem |
|
672 | 1308 |
#label: 'loadFromClass' |
1309 |
#isButton: true |
|
767 | 1310 |
#value: #doLoadFromClass |
672 | 1311 |
#activeHelpKey: #fileLoadFromClass |
880 | 1312 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
672 | 1313 |
) |
1314 |
#(#MenuItem |
|
1315 |
#label: 'saveMethod' |
|
1316 |
#isButton: true |
|
767 | 1317 |
#value: #doSaveMethod |
672 | 1318 |
#activeHelpKey: #fileSaveMethod |
1319 |
#enabled: #imageIsLoaded |
|
880 | 1320 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
400 | 1321 |
) |
1322 |
#(#MenuItem |
|
672 | 1323 |
#label: '' |
400 | 1324 |
) |
1325 |
#(#MenuItem |
|
672 | 1326 |
#label: '' |
1327 |
) |
|
1328 |
#(#MenuItem |
|
1329 |
#label: '' |
|
1330 |
) |
|
1331 |
#(#MenuItem |
|
1332 |
#label: '' |
|
400 | 1333 |
) |
1334 |
#(#MenuItem |
|
672 | 1335 |
#label: 'Point' |
1336 |
#activeHelpKey: #drawModePoint |
|
1337 |
#enabled: #imageIsLoaded |
|
975 | 1338 |
#choice: #editMode |
1339 |
#choiceValue: #point |
|
400 | 1340 |
) |
1341 |
#(#MenuItem |
|
672 | 1342 |
#label: 'Box' |
1343 |
#activeHelpKey: #drawModeBox |
|
1344 |
#enabled: #imageIsLoaded |
|
975 | 1345 |
#choice: #editMode |
1346 |
#choiceValue: #box |
|
400 | 1347 |
) |
1348 |
#(#MenuItem |
|
672 | 1349 |
#label: 'Filled Box' |
1350 |
#activeHelpKey: #drawModeFilledBox |
|
1351 |
#enabled: #imageIsLoaded |
|
975 | 1352 |
#choice: #editMode |
1353 |
#choiceValue: #filledBox |
|
400 | 1354 |
) |
1355 |
#(#MenuItem |
|
672 | 1356 |
#label: 'Fill' |
1357 |
#activeHelpKey: #drawModeFill |
|
1358 |
#enabled: #imageIsLoaded |
|
975 | 1359 |
#choice: #editMode |
1360 |
#choiceValue: #fill |
|
400 | 1361 |
) |
1362 |
#(#MenuItem |
|
672 | 1363 |
#label: 'Copy' |
1364 |
#activeHelpKey: #drawModeCopy |
|
1365 |
#enabled: #imageIsLoaded |
|
975 | 1366 |
#choice: #editMode |
1367 |
#choiceValue: #copy |
|
400 |