author | Claus Gittinger <cg@exept.de> |
Tue, 01 Jun 2004 13:16:37 +0200 | |
changeset 1843 | 771731481a20 |
parent 1842 | f04fe34d10ac |
child 1847 | d7e8ec4f3696 |
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 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
13 |
"{ Package: 'stx:libtool2' }" |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
14 |
|
400 | 15 |
ToolApplicationModel subclass:#ImageEditor |
975 | 16 |
instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
17 |
selectedColorIndex postOpenAction imageSeqNr drawingColormap' |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
18 |
classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
19 |
DefaultRelativeSizes' |
929 | 20 |
poolDictionaries:'' |
21 |
category:'Interface-UIPainter' |
|
400 | 22 |
! |
23 |
||
24 |
!ImageEditor class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
767 | 28 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 29 |
All Rights Reserved |
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
405 | 33 |
inclusion of the above copyright notice. This software may not |
400 | 34 |
be provided or otherwise made available to, or used by, any |
405 | 35 |
other person. No title to or ownership of the software is |
400 | 36 |
hereby transferred. |
37 |
" |
|
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
737 | 42 |
Image Editor allows you to create, design, modify or just inspect images. |
400 | 43 |
|
44 |
[start with:] |
|
45 |
ImageEditor open |
|
941 | 46 |
ImageEditor openOnClass:Icon andSelector:#startIcon |
400 | 47 |
|
48 |
[see also:] |
|
49 |
ImageEditView Image |
|
50 |
||
51 |
[author:] |
|
544 | 52 |
Thomas Zwick, eXept Software AG |
1806 | 53 |
Claus Gittinger, eXept Software AG |
400 | 54 |
" |
55 |
! ! |
|
56 |
||
57 |
!ImageEditor class methodsFor:'instance creation'! |
|
58 |
||
59 |
openModalOnClass: aClass andSelector: aSelector |
|
900 | 60 |
"opens modal a Image Editor on aClass and aSelector" |
767 | 61 |
" |
62 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
63 |
" |
|
400 | 64 |
|
767 | 65 |
|imageEditor imageEditView className resourceClassName resourceSelector| |
66 |
||
400 | 67 |
imageEditor := self new. |
767 | 68 |
|
900 | 69 |
aClass isClass ifTrue: [className := aClass name]. |
70 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 71 |
aClass isNil ifTrue: [className := '']. |
400 | 72 |
|
688 | 73 |
imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector]. |
400 | 74 |
imageEditor openModal. |
75 |
||
688 | 76 |
resourceClassName := imageEditView resourceClass. |
767 | 77 |
resourceSelector := imageEditView resourceSelector. |
415 | 78 |
|
815 | 79 |
((className asString ~= resourceClassName) |
80 |
or:[aSelector asString ~= resourceSelector]) |
|
415 | 81 |
ifTrue: [^resourceClassName, ' ', resourceSelector] |
82 |
ifFalse:[^nil] |
|
400 | 83 |
! |
84 |
||
85 |
openOnClass: aClass andSelector: aSelector |
|
900 | 86 |
"opens a Image Editor on aClass and aSelector" |
767 | 87 |
" |
88 |
self openOnClass: self andSelector: #leftMouseKeyIcon |
|
89 |
" |
|
400 | 90 |
|
1057 | 91 |
|editor| |
92 |
||
93 |
editor := self new. |
|
94 |
editor allButOpen. |
|
1381 | 95 |
aSelector notNil ifTrue:[ |
96 |
editor loadFromMessage: aClass name, ' ', aSelector. |
|
97 |
] ifFalse:[ |
|
98 |
editor resourceClass:aClass |
|
99 |
]. |
|
1057 | 100 |
editor openWindow |
101 |
||
102 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
|
400 | 103 |
! |
104 |
||
767 | 105 |
openOnFile: aFileName |
900 | 106 |
"opens a Image Editor on aFileName" |
767 | 107 |
" |
108 |
self openOnFile: 'bitmaps/SmalltalkX.xbm' |
|
109 |
" |
|
400 | 110 |
|
1057 | 111 |
|editor| |
112 |
||
113 |
editor := self new. |
|
114 |
editor allButOpen. |
|
115 |
editor loadFromFile: aFileName. |
|
116 |
editor openWindow |
|
117 |
||
118 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
|
400 | 119 |
! |
120 |
||
767 | 121 |
openOnImage: anImage |
900 | 122 |
"opens a Image Editor on anImage" |
767 | 123 |
" |
895 | 124 |
self openOnImage: Icon startIcon |
767 | 125 |
" |
400 | 126 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
127 |
|editor| |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
128 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
129 |
editor := self new. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
130 |
editor allButOpen. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
131 |
editor loadFromImage: anImage. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
132 |
editor openWindow |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
133 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
134 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 135 |
! ! |
136 |
||
137 |
!ImageEditor class methodsFor:'accessing'! |
|
138 |
||
139 |
listOfColorMaps |
|
767 | 140 |
"returns the list of default color maps for a new image" |
400 | 141 |
|
142 |
|colorMap| |
|
898 | 143 |
|
400 | 144 |
(colorMap := OrderedCollection new) |
145 |
add: Color black; |
|
146 |
add: Color white; |
|
147 |
add: Color red; |
|
148 |
add: Color green; |
|
149 |
add: Color blue; |
|
150 |
add: Color cyan; |
|
151 |
add: Color yellow; |
|
152 |
add: Color magenta; |
|
898 | 153 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
154 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
155 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
156 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
157 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
158 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
159 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
160 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
161 |
||
400 | 162 |
0 to: 5 do: |
163 |
[:r| |
|
164 |
0 to: 5 do: |
|
165 |
[:g| |
|
166 |
0 to: 5 do: |
|
167 |
[:b| |
|
898 | 168 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 169 |
] |
170 |
] |
|
171 |
]. |
|
172 |
||
173 |
1 to: 25 do: |
|
174 |
[:g| |
|
898 | 175 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 176 |
]. |
177 |
||
178 |
^Dictionary new |
|
179 |
at: '8-plane' put: colorMap; |
|
180 |
at: '8-plane + mask' put: colorMap; |
|
181 |
at: '4-plane' put: (colorMap copyFrom: 1 to: 16); |
|
182 |
at: '4-plane + mask' put: (colorMap copyFrom: 1 to: 16); |
|
183 |
at: '2-plane' put: (colorMap copyFrom: 1 to: 4); |
|
184 |
at: '2-plane + mask' put: (colorMap copyFrom: 1 to: 4); |
|
185 |
at: '1-plane' put: (colorMap copyFrom: 1 to: 2); |
|
186 |
at: '1-plane + mask' put: (colorMap copyFrom: 1 to: 2); |
|
187 |
yourself |
|
188 |
! |
|
189 |
||
190 |
listOfDefaultSizes |
|
767 | 191 |
"returns the list of default sizes for a new image" |
400 | 192 |
|
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
193 |
^#('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
194 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
195 |
"Modified: / 31.7.1998 / 01:57:34 / cg" |
400 | 196 |
! ! |
197 |
||
460 | 198 |
!ImageEditor class methodsFor:'help specs'! |
199 |
||
1545 | 200 |
flyByHelpSpec |
201 |
<resource: #help> |
|
202 |
||
203 |
^super flyByHelpSpec addPairsFrom:#( |
|
204 |
||
205 |
#drawModeBox |
|
206 |
'Rectangle' |
|
207 |
||
208 |
#drawModeCopy |
|
209 |
'Copy' |
|
210 |
||
211 |
#drawModeFill |
|
1637 | 212 |
'Flood-Fill' |
1545 | 213 |
|
214 |
#drawModeFilledBox |
|
1637 | 215 |
'Filled Rectangle' |
1545 | 216 |
|
217 |
#drawModePaste |
|
218 |
'Paste' |
|
219 |
||
220 |
#drawModePasteUnder |
|
1637 | 221 |
'Paste Under' |
222 |
||
223 |
#drawModePasteWithMask |
|
1656 | 224 |
'Paste with Mask' |
1545 | 225 |
|
226 |
#drawModePoint |
|
227 |
'Point' |
|
228 |
||
1639 | 229 |
#drawModeSpecial |
230 |
'Special Operations' |
|
231 |
||
1545 | 232 |
#fileGrabImage |
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
233 |
'Pick from Screen' |
1545 | 234 |
|
235 |
#fileLoadFromClass |
|
236 |
'Load from Method' |
|
237 |
||
238 |
#fileLoadFromFile |
|
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
239 |
'Load from File' |
1545 | 240 |
|
241 |
#fileNewImage |
|
1637 | 242 |
'New Image' |
1545 | 243 |
|
244 |
#filePrint |
|
245 |
'Print' |
|
246 |
||
247 |
#fileSaveAs |
|
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
248 |
'Save to File' |
1545 | 249 |
|
250 |
#fileSaveMaskAs |
|
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
251 |
'Save to File' |
1545 | 252 |
|
253 |
#fileSaveMethod |
|
1637 | 254 |
'Save as Method' |
1545 | 255 |
|
256 |
#fileSaveMethodAs |
|
1637 | 257 |
'Save as Method' |
1545 | 258 |
|
259 |
) |
|
260 |
! |
|
261 |
||
460 | 262 |
helpSpec |
737 | 263 |
"This resource specification was automatically generated |
264 |
by the UIHelpTool of ST/X." |
|
265 |
||
266 |
"Do not manually edit this!! If it is corrupted, |
|
267 |
the UIHelpTool may not be able to read the specification." |
|
460 | 268 |
|
269 |
" |
|
737 | 270 |
UIHelpTool openOnClass:ImageEditor |
460 | 271 |
" |
272 |
||
737 | 273 |
<resource: #help> |
274 |
||
275 |
^super helpSpec addPairsFrom:#( |
|
460 | 276 |
|
277 |
#colorMap |
|
929 | 278 |
'ColorMap functions.' |
279 |
||
280 |
#colorMap1 |
|
281 |
'Convert to depth-1 image.' |
|
282 |
||
986 | 283 |
#colorMap1M |
284 |
'Convert to depth-1 image plus mask.' |
|
285 |
||
929 | 286 |
#colorMap2 |
287 |
'Convert to depth-2 image.' |
|
288 |
||
986 | 289 |
#colorMap2M |
290 |
'Convert to depth-2 image plus mask.' |
|
291 |
||
929 | 292 |
#colorMap4 |
293 |
'Convert to depth-4 image.' |
|
294 |
||
986 | 295 |
#colorMap4M |
296 |
'Convert to depth-4 image plus mask.' |
|
297 |
||
929 | 298 |
#colorMap8 |
299 |
'Convert to depth-8 image.' |
|
300 |
||
301 |
#colorMap8M |
|
302 |
'Convert to depth-8 image plus mask.' |
|
303 |
||
986 | 304 |
#colorMapTable |
305 |
'Shows a list of used colors of the image.' |
|
306 |
||
929 | 307 |
#compressColormap |
308 |
'Remove unneeded entries from the colorMap.' |
|
460 | 309 |
|
1045 | 310 |
#cropAll |
986 | 311 |
'Find and remove all borders.' |
312 |
||
1045 | 313 |
#cropBottom |
986 | 314 |
'Find and remove bottom border.' |
315 |
||
1045 | 316 |
#cropLeft |
986 | 317 |
'Find and remove left border.' |
318 |
||
1045 | 319 |
#cropManual |
986 | 320 |
'Specify border(s) to remove.' |
321 |
||
1045 | 322 |
#cropRight |
986 | 323 |
'Find and remove right border.' |
324 |
||
1045 | 325 |
#cropTop |
986 | 326 |
'Find and remove top border.' |
487 | 327 |
|
460 | 328 |
#drawModeBox |
1637 | 329 |
'Rectangle Drawing Mode.' |
460 | 330 |
|
331 |
#drawModeCopy |
|
1637 | 332 |
'Area Copy Mode.' |
460 | 333 |
|
334 |
#drawModeFill |
|
1637 | 335 |
'Flood Fill Mode.' |
460 | 336 |
|
337 |
#drawModeFilledBox |
|
1637 | 338 |
'Filled Rectangle Drawing Mode.' |
460 | 339 |
|
340 |
#drawModePaste |
|
1637 | 341 |
'Paste Mode.' |
914 | 342 |
|
343 |
#drawModePasteUnder |
|
1637 | 344 |
'Paste-Under Mode.' |
345 |
||
346 |
#drawModePasteWithMask |
|
347 |
'Paste-with-Mask Mode.' |
|
460 | 348 |
|
349 |
#drawModePoint |
|
1637 | 350 |
'Point Drawing Mode.' |
460 | 351 |
|
1639 | 352 |
#drawModeSpecial |
353 |
'Special Operations' |
|
354 |
||
460 | 355 |
#editFlipHorizontal |
1637 | 356 |
'Flip the image horizontally.' |
460 | 357 |
|
358 |
#editFlipVertical |
|
1637 | 359 |
'Flip the image vertically.' |
460 | 360 |
|
361 |
#editMagnifyImage |
|
914 | 362 |
'Magnify the image.' |
460 | 363 |
|
364 |
#editNegate |
|
914 | 365 |
'Invert the images colors.' |
460 | 366 |
|
367 |
#editResize |
|
914 | 368 |
'Resize the image (preserving the old image).' |
460 | 369 |
|
370 |
#editRotate |
|
914 | 371 |
'Rotate the image.' |
460 | 372 |
|
929 | 373 |
#fileGrabImage |
374 |
'Pick an image from the screen.' |
|
375 |
||
460 | 376 |
#fileLoadFromClass |
929 | 377 |
'Select and load an image from a resource method.' |
460 | 378 |
|
379 |
#fileLoadFromFile |
|
929 | 380 |
'Select and load an image from a file.' |
460 | 381 |
|
382 |
#fileNewImage |
|
914 | 383 |
'Create a new image' |
460 | 384 |
|
385 |
#filePrint |
|
386 |
'Print the image on a postscript printer.' |
|
387 |
||
388 |
#fileSaveAs |
|
914 | 389 |
'Save the image to a file.' |
460 | 390 |
|
391 |
#fileSaveMaskAs |
|
914 | 392 |
'Save the mask of the image to a file.' |
460 | 393 |
|
1613 | 394 |
#fileSaveButtonImageAs |
395 |
'Save an image of a button with the image to a file (for html use).' |
|
396 |
||
460 | 397 |
#fileSaveMethod |
914 | 398 |
'Save the image as resource method in the current class and selector.' |
460 | 399 |
|
400 |
#fileSaveMethodAs |
|
914 | 401 |
'Save the image as resource method in a class.' |
460 | 402 |
|
487 | 403 |
#magnificationNumber |
914 | 404 |
'Shows the current magnification.' |
487 | 405 |
|
406 |
#magnifyImageDown |
|
914 | 407 |
'Decrease magnification.' |
487 | 408 |
|
409 |
#magnifyImageUp |
|
914 | 410 |
'Increase magnification.' |
487 | 411 |
|
412 |
#mouseKeyColorMode |
|
1637 | 413 |
'Toggle between left and right mouse button color.' |
487 | 414 |
|
415 |
#previewView |
|
914 | 416 |
'Shows a preview of the image.' |
487 | 417 |
|
905 | 418 |
#settingsGridMagnification |
914 | 419 |
'Change the grid magnification of the edit view.' |
905 | 420 |
|
460 | 421 |
) |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
422 |
|
986 | 423 |
"Modified: / 7.9.1998 / 18:20:26 / cg" |
460 | 424 |
! ! |
425 |
||
737 | 426 |
!ImageEditor class methodsFor:'image specs'! |
427 |
||
1637 | 428 |
copyIcon |
429 |
"This resource specification was automatically generated |
|
430 |
by the ImageEditor of ST/X." |
|
431 |
||
432 |
"Do not manually edit this!! If it is corrupted, |
|
433 |
the ImageEditor may not be able to read the specification." |
|
434 |
||
435 |
" |
|
436 |
self copyIcon inspect |
|
437 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
438 |
Icon flushCachedIcons |
|
439 |
" |
|
440 |
||
441 |
<resource: #image> |
|
442 |
||
443 |
^Icon |
|
444 |
constantNamed:#'ImageEditor class copyIcon' |
|
445 |
ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@** @@J)UUTB*Z*)@*&**PJ)**$B*Z*)@*&**PJ)**$@@Z*)@@F**P@AUUT@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O>@??3??O?<??3??O?<??3??@_<A?0@@@@a') ; yourself); yourself] |
|
446 |
! |
|
447 |
||
448 |
fillIcon |
|
449 |
"This resource specification was automatically generated |
|
450 |
by the ImageEditor of ST/X." |
|
451 |
||
452 |
"Do not manually edit this!! If it is corrupted, |
|
453 |
the ImageEditor may not be able to read the specification." |
|
454 |
||
455 |
" |
|
456 |
self fillIcon inspect |
|
457 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
458 |
Icon flushCachedIcons |
|
459 |
" |
|
460 |
||
461 |
<resource: #image> |
|
462 |
||
463 |
^Icon |
|
464 |
constantNamed:#'ImageEditor class fillIcon' |
|
465 |
ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@ @@@@*H@@D*(@@DUUP@EAUU@AAEU@@@@U@@DDA@@@@@@@@PP@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C @Q@BN@I<@?8C?0[?!!G<@O P\@@ D@@@@@@@@@a') ; yourself); yourself] |
|
466 |
! |
|
467 |
||
468 |
fillRectIcon |
|
469 |
"This resource specification was automatically generated |
|
470 |
by the ImageEditor of ST/X." |
|
471 |
||
472 |
"Do not manually edit this!! If it is corrupted, |
|
473 |
the ImageEditor may not be able to read the specification." |
|
474 |
||
475 |
" |
|
476 |
self fillRectIcon inspect |
|
477 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
478 |
Icon flushCachedIcons |
|
479 |
" |
|
480 |
||
481 |
<resource: #image> |
|
482 |
||
483 |
^Icon |
|
484 |
constantNamed:#'ImageEditor class fillRectIcon' |
|
485 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a') ; yourself); yourself] |
|
486 |
! |
|
487 |
||
737 | 488 |
leftMouseKeyIcon |
489 |
"This resource specification was automatically generated |
|
490 |
by the ImageEditor of ST/X." |
|
491 |
||
492 |
"Do not manually edit this!! If it is corrupted, |
|
493 |
the ImageEditor may not be able to read the specification." |
|
494 |
||
495 |
" |
|
1405 | 496 |
self leftMouseKeyIcon inspect |
737 | 497 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
498 |
" |
|
499 |
||
500 |
<resource: #image> |
|
501 |
||
502 |
^Icon |
|
503 |
constantNamed:#'ImageEditor leftMouseKeyIcon' |
|
1433 | 504 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; 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] |
505 |
! |
|
737 | 506 |
|
1637 | 507 |
pasteIcon |
508 |
"This resource specification was automatically generated |
|
509 |
by the ImageEditor of ST/X." |
|
510 |
||
511 |
"Do not manually edit this!! If it is corrupted, |
|
512 |
the ImageEditor may not be able to read the specification." |
|
513 |
||
514 |
" |
|
515 |
self pasteIcon inspect |
|
516 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
517 |
Icon flushCachedIcons |
|
518 |
" |
|
519 |
||
520 |
<resource: #image> |
|
521 |
||
522 |
^Icon |
|
523 |
constantNamed:#'ImageEditor class pasteIcon' |
|
524 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y& |
|
525 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
526 |
! |
|
527 |
||
528 |
pasteUnderIcon |
|
529 |
"This resource specification was automatically generated |
|
530 |
by the ImageEditor of ST/X." |
|
531 |
||
532 |
"Do not manually edit this!! If it is corrupted, |
|
533 |
the ImageEditor may not be able to read the specification." |
|
534 |
||
535 |
" |
|
536 |
self pasteUnderIcon inspect |
|
537 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
538 |
Icon flushCachedIcons |
|
539 |
" |
|
540 |
||
541 |
<resource: #image> |
|
542 |
||
543 |
^Icon |
|
544 |
constantNamed:#'ImageEditor class pasteUnderIcon' |
|
545 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y& |
|
546 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
547 |
! |
|
548 |
||
549 |
pasteWithMaskIcon |
|
550 |
"This resource specification was automatically generated |
|
551 |
by the ImageEditor of ST/X." |
|
552 |
||
553 |
"Do not manually edit this!! If it is corrupted, |
|
554 |
the ImageEditor may not be able to read the specification." |
|
555 |
||
556 |
" |
|
557 |
self pasteWithMaskIcon inspect |
|
558 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
559 |
Icon flushCachedIcons |
|
560 |
" |
|
561 |
||
562 |
<resource: #image> |
|
563 |
||
564 |
^Icon |
|
565 |
constantNamed:#'ImageEditor class pasteWithMaskIcon' |
|
566 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L3A&@@D3LCL0A @AL3@3LFX@@QDPY&Y& |
|
567 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
568 |
! |
|
569 |
||
570 |
pointIcon |
|
571 |
"This resource specification was automatically generated |
|
572 |
by the ImageEditor of ST/X." |
|
573 |
||
574 |
"Do not manually edit this!! If it is corrupted, |
|
575 |
the ImageEditor may not be able to read the specification." |
|
576 |
||
577 |
" |
|
578 |
self pointIcon inspect |
|
579 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
580 |
Icon flushCachedIcons |
|
581 |
" |
|
582 |
||
583 |
<resource: #image> |
|
584 |
||
585 |
^Icon |
|
586 |
constantNamed:#'ImageEditor class pointIcon' |
|
587 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@B@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8@G@@X@B@@@@@@@@@a') ; yourself); yourself] |
|
588 |
! |
|
589 |
||
590 |
rectIcon |
|
591 |
"This resource specification was automatically generated |
|
592 |
by the ImageEditor of ST/X." |
|
593 |
||
594 |
"Do not manually edit this!! If it is corrupted, |
|
595 |
the ImageEditor may not be able to read the specification." |
|
596 |
||
597 |
" |
|
598 |
self rectIcon inspect |
|
599 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
600 |
Icon flushCachedIcons |
|
601 |
" |
|
602 |
||
603 |
<resource: #image> |
|
604 |
||
605 |
^Icon |
|
606 |
constantNamed:#'ImageEditor class rectIcon' |
|
607 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0HA@ DB@PHA@ DB@PHA@ DC?0@@@@@@@a') ; yourself); yourself] |
|
608 |
! |
|
609 |
||
737 | 610 |
rightMouseKeyIcon |
611 |
"This resource specification was automatically generated |
|
612 |
by the ImageEditor of ST/X." |
|
613 |
||
614 |
"Do not manually edit this!! If it is corrupted, |
|
615 |
the ImageEditor may not be able to read the specification." |
|
616 |
||
617 |
" |
|
1405 | 618 |
self rightMouseKeyIcon inspect |
737 | 619 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
620 |
" |
|
621 |
||
622 |
<resource: #image> |
|
623 |
||
624 |
^Icon |
|
625 |
constantNamed:#'ImageEditor rightMouseKeyIcon' |
|
1433 | 626 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; 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] |
1637 | 627 |
! |
628 |
||
629 |
specialIcon |
|
630 |
"This resource specification was automatically generated |
|
631 |
by the ImageEditor of ST/X." |
|
632 |
||
633 |
"Do not manually edit this!! If it is corrupted, |
|
634 |
the ImageEditor may not be able to read the specification." |
|
635 |
||
636 |
" |
|
637 |
self specialIcon inspect |
|
638 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
639 |
Icon flushCachedIcons |
|
640 |
" |
|
641 |
||
642 |
<resource: #image> |
|
643 |
||
644 |
^Icon |
|
645 |
constantNamed:#'ImageEditor class specialIcon' |
|
646 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@@B@@@@@0@@@@@@@@@@@@@@@P@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@L@@0@G @^@A8@G @L@@0@@@@L@@0@@@@@a') ; yourself); yourself] |
|
1433 | 647 |
! ! |
737 | 648 |
|
400 | 649 |
!ImageEditor class methodsFor:'interface specs'! |
650 |
||
1650 | 651 |
changeHLSDialogSpec |
652 |
"This resource specification was automatically generated |
|
653 |
by the UIPainter of ST/X." |
|
654 |
||
655 |
"Do not manually edit this!! If it is corrupted, |
|
656 |
the UIPainter may not be able to read the specification." |
|
657 |
||
658 |
" |
|
659 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
660 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
661 |
" |
|
662 |
||
663 |
<resource: #canvas> |
|
664 |
||
665 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
666 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
667 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
668 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
669 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
670 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
671 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
672 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
673 |
bounds: (Rectangle 14 46 326 229) |
1650 | 674 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
675 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
676 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
677 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
678 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
679 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
680 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
681 |
layout: (LayoutFrame 20 0 21 0 120 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
682 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
683 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
684 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
685 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
686 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
687 |
layout: (LayoutFrame 123 0 21 0 166 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
688 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
689 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
690 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
691 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
692 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
693 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
694 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
695 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
696 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
697 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
698 |
layout: (LayoutFrame 180 0 22 0 297 0 42 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
699 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
700 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
701 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
702 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
703 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
704 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
705 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
706 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
707 |
layout: (LayoutFrame 18 0 50 0 120 0 72 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
708 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
709 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
710 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
711 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
712 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
713 |
layout: (LayoutFrame 123 0 50 0 166 0 72 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
714 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
715 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
716 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
717 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
718 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
719 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
720 |
acceptOnPointerLeave: false |
1650 | 721 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
722 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
723 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
724 |
layout: (LayoutFrame 180 0 51 0 297 0 71 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
725 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
726 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
727 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
728 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
729 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
730 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
731 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
732 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
733 |
layout: (LayoutFrame 9 0 79 0 120 0 101 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
734 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
735 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
736 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
737 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
738 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
739 |
layout: (LayoutFrame 123 0 79 0 166 0 101 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
740 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
741 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
742 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
743 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
744 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
745 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
746 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
747 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
748 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
749 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
750 |
layout: (LayoutFrame 180 0 80 0 297 0 100 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
751 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
752 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
753 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
754 |
step: 1 |
1650 | 755 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
756 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
757 |
name: 'HueColorLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
758 |
layout: (LayoutFrame 10 0.0 109 0 -10 1.0 148 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
759 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
760 |
backgroundChannel: hlsColor |
1650 | 761 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
762 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
763 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
764 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
765 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
766 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
767 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
768 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
769 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
770 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
771 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
772 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
773 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
774 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
775 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
776 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
777 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
778 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
779 |
extent: (Point 151 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
780 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
781 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
782 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
783 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
784 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
785 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
786 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
787 |
extent: (Point 152 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
788 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
789 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
790 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
791 |
) |
1650 | 792 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
793 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
794 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
795 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
796 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
797 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
798 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
799 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
800 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
801 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
802 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
803 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
804 |
the UIPainter may not be able to read the specification." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
805 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
806 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
807 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
808 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
809 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
810 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
811 |
<resource: #canvas> |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
812 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
813 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
814 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
815 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
816 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
817 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
818 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
819 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
820 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
821 |
bounds: (Rectangle 14 46 259 229) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
822 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
823 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
824 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
825 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
826 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
827 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
828 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
829 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
830 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
831 |
adjust: right |
1650 | 832 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
833 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
834 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
835 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
836 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
837 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
838 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
839 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
840 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
841 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
842 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
843 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
844 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
845 |
layout: (LayoutFrame 148 0 21 0 221 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
846 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
847 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
848 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
849 |
autoRepeat: true |
1650 | 850 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
851 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
852 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
853 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
854 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
855 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
856 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
857 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
858 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
859 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
860 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
861 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
862 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
863 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
864 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
865 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
866 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
867 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
868 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
869 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
870 |
layout: (LayoutFrame 148 0 51 0 221 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
871 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
872 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
873 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
874 |
autoRepeat: true |
1650 | 875 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
876 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
877 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
878 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
879 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
880 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
881 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
882 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
883 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
884 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
885 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
886 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
887 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
888 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
889 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
890 |
acceptOnPointerLeave: false |
1650 | 891 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
892 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
893 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
894 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
895 |
layout: (LayoutFrame 148 0 81 0 221 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
896 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
897 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
898 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
899 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
900 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
901 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
902 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
903 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
904 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
905 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
906 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
907 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
908 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
909 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
910 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
911 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
912 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
913 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
914 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
915 |
acceptOnPointerLeave: false |
1650 | 916 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
917 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
918 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
919 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
920 |
layout: (LayoutFrame 148 0 111 0 221 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
921 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
922 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
923 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
924 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
925 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
926 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
927 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
928 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
929 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
930 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
931 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
932 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
933 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
934 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
935 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
936 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
937 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
938 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
939 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
940 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
941 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
942 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
943 |
extent: (Point 77 22) |
1650 | 944 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
945 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
946 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
947 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
948 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
949 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
950 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
951 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
952 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
953 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
954 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
955 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
956 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
957 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
958 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
959 |
extent: (Point 78 22) |
1650 | 960 |
) |
961 |
) |
|
962 |
||
963 |
) |
|
964 |
) |
|
965 |
) |
|
966 |
||
967 |
) |
|
968 |
) |
|
969 |
! |
|
970 |
||
767 | 971 |
dialogSpecForNewImage |
737 | 972 |
"This resource specification was automatically generated |
973 |
by the UIPainter of ST/X." |
|
519 | 974 |
|
737 | 975 |
"Do not manually edit this!! If it is corrupted, |
976 |
the UIPainter may not be able to read the specification." |
|
519 | 977 |
|
978 |
" |
|
767 | 979 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
980 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 981 |
" |
982 |
||
983 |
<resource: #canvas> |
|
984 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
985 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
986 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
987 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
988 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
989 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
990 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
991 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
992 |
min: (Point 10 10) |
1806 | 993 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
994 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
995 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
996 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
997 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
998 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
999 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1000 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -35 1.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1001 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1002 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1003 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1004 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1005 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1006 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1007 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1008 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1009 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1010 |
labelPosition: topLeft |
1806 | 1011 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1012 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1013 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1014 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1015 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1016 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1017 |
layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1018 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1019 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1020 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1021 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1022 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1023 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1024 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1025 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1026 |
) |
1490 | 1027 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1028 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1029 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1030 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1031 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1032 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1033 |
labelPosition: topLeft |
1806 | 1034 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1035 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1036 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1037 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1038 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1039 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1040 |
layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1041 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1042 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1043 |
useIndex: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1044 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1045 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1046 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1047 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1048 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1049 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1050 |
|
986 | 1051 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1052 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1053 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1054 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1055 |
layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1056 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1057 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1058 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1059 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1060 |
) |
986 | 1061 |
) |
1062 |
! |
|
1063 |
||
1557 | 1064 |
shiftDialogSpec |
1065 |
"This resource specification was automatically generated |
|
1066 |
by the UIPainter of ST/X." |
|
1067 |
||
1068 |
"Do not manually edit this!! If it is corrupted, |
|
1069 |
the UIPainter may not be able to read the specification." |
|
1070 |
||
1071 |
" |
|
1072 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1073 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1074 |
" |
|
1075 |
||
1076 |
<resource: #canvas> |
|
1077 |
||
1078 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1079 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1080 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1081 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1082 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1083 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1084 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1085 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1086 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1087 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1088 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1089 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1090 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1091 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1092 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1093 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1094 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1095 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1096 |
adjust: right |
1557 | 1097 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1098 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1099 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1100 |
layout: (LayoutFrame 95 0 21 0 139 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1101 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1102 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1103 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1104 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1105 |
acceptOnPointerLeave: false |
1557 | 1106 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1107 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1108 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1109 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1110 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1111 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1112 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1113 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1114 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1115 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1116 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1117 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1118 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1119 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1120 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1121 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1122 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1123 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1124 |
extent: (Point 118 22) |
1557 | 1125 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1126 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1127 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1128 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1129 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1130 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1131 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1132 |
extent: (Point 118 22) |
1557 | 1133 |
) |
1134 |
) |
|
1135 |
||
1136 |
) |
|
1137 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1138 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1139 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1140 |
layout: (LayoutFrame 105 0 63 0 127 0 85 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1141 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1142 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1143 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1144 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1145 |
direction: up |
1557 | 1146 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1147 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1148 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1149 |
layout: (LayoutFrame 84 0 86 0 106 0 108 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1150 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1151 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1152 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1153 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1154 |
direction: left |
1557 | 1155 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1156 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1157 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1158 |
layout: (LayoutFrame 126 0 86 0 148 0 108 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1159 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1160 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1161 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1162 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1163 |
direction: right |
1557 | 1164 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1165 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1166 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1167 |
layout: (LayoutFrame 105 0 107 0 127 0 129 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1168 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1169 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1170 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1171 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1172 |
direction: down |
1557 | 1173 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1174 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1175 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1176 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1177 |
layout: (LayoutFrame 153 0 22 0 289 0 44 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1178 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1179 |
translateLabel: true |
1713 | 1180 |
) |
1557 | 1181 |
) |
1182 |
||
1183 |
) |
|
1184 |
) |
|
1185 |
! |
|
1186 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1187 |
uncropDialogSpec |
1480 | 1188 |
"This resource specification was automatically generated |
1189 |
by the UIPainter of ST/X." |
|
1796 | 1190 |
|
1480 | 1191 |
"Do not manually edit this!! If it is corrupted, |
1192 |
the UIPainter may not be able to read the specification." |
|
1796 | 1193 |
|
1480 | 1194 |
" |
1796 | 1195 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1196 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1197 |
" |
1796 | 1198 |
|
1199 |
<resource: #canvas> |
|
1200 |
||
1201 |
^ |
|
1202 |
#(FullSpec |
|
1203 |
name: uncropDialogSpec |
|
1204 |
window: |
|
1205 |
(WindowSpec |
|
1206 |
label: 'Add Border(s)' |
|
1207 |
name: 'Add Border(s)' |
|
1208 |
min: (Point 10 10) |
|
1209 |
max: (Point 800 478) |
|
1210 |
bounds: (Rectangle 0 0 261 228) |
|
1211 |
) |
|
1212 |
component: |
|
1213 |
(SpecCollection |
|
1214 |
collection: ( |
|
1215 |
(LabelSpec |
|
1216 |
label: 'Left:' |
|
1217 |
name: 'Label1' |
|
1218 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1219 |
translateLabel: true |
|
1220 |
adjust: right |
|
1221 |
) |
|
1222 |
(InputFieldSpec |
|
1223 |
name: 'EntryField1' |
|
1224 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
1225 |
model: left |
|
1226 |
type: number |
|
1227 |
acceptOnPointerLeave: false |
|
1228 |
) |
|
1229 |
(LabelSpec |
|
1230 |
label: 'Right:' |
|
1231 |
name: 'Label2' |
|
1232 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
1233 |
translateLabel: true |
|
1234 |
adjust: right |
|
1235 |
) |
|
1236 |
(InputFieldSpec |
|
1237 |
name: 'EntryField2' |
|
1238 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
1239 |
model: right |
|
1240 |
type: number |
|
1241 |
acceptOnPointerLeave: false |
|
1242 |
) |
|
1243 |
(LabelSpec |
|
1244 |
label: 'Top:' |
|
1245 |
name: 'Label3' |
|
1246 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
1247 |
translateLabel: true |
|
1248 |
adjust: right |
|
1249 |
) |
|
1250 |
(InputFieldSpec |
|
1251 |
name: 'EntryField3' |
|
1252 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
1253 |
model: top |
|
1254 |
type: number |
|
1255 |
acceptOnPointerLeave: false |
|
1256 |
) |
|
1257 |
(LabelSpec |
|
1258 |
label: 'Bottom:' |
|
1259 |
name: 'Label4' |
|
1260 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
1261 |
translateLabel: true |
|
1262 |
adjust: right |
|
1263 |
) |
|
1264 |
(InputFieldSpec |
|
1265 |
name: 'EntryField4' |
|
1266 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
1267 |
model: bottom |
|
1268 |
type: number |
|
1269 |
acceptOnPointerLeave: false |
|
1270 |
) |
|
1271 |
(HorizontalPanelViewSpec |
|
1272 |
name: 'HorizontalPanel1' |
|
1273 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1274 |
horizontalLayout: fitSpace |
|
1275 |
verticalLayout: center |
|
1276 |
horizontalSpace: 3 |
|
1277 |
verticalSpace: 3 |
|
1278 |
reverseOrderIfOKAtLeft: true |
|
1279 |
component: |
|
1280 |
(SpecCollection |
|
1281 |
collection: ( |
|
1282 |
(ActionButtonSpec |
|
1283 |
label: 'Cancel' |
|
1284 |
name: 'Button1' |
|
1285 |
translateLabel: true |
|
1286 |
model: cancel |
|
1287 |
extent: (Point 118 22) |
|
1288 |
) |
|
1289 |
(ActionButtonSpec |
|
1290 |
label: 'OK' |
|
1291 |
name: 'Button2' |
|
1292 |
translateLabel: true |
|
1293 |
model: accept |
|
1294 |
extent: (Point 118 22) |
|
1295 |
) |
|
1296 |
) |
|
1297 |
||
1298 |
) |
|
1299 |
) |
|
1300 |
) |
|
1301 |
||
1302 |
) |
|
1303 |
) |
|
1480 | 1304 |
! |
1305 |
||
767 | 1306 |
windowSpec |
1307 |
"This resource specification was automatically generated |
|
1308 |
by the UIPainter of ST/X." |
|
1309 |
||
1310 |
"Do not manually edit this!! If it is corrupted, |
|
1311 |
the UIPainter may not be able to read the specification." |
|
1312 |
||
1313 |
" |
|
1314 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
1315 |
ImageEditor new openInterface:#windowSpec |
|
1316 |
ImageEditor open |
|
1317 |
" |
|
1318 |
||
1319 |
<resource: #canvas> |
|
1320 |
||
1558 | 1321 |
^ |
1820 | 1322 |
#(FullSpec |
1323 |
name: windowSpec |
|
1324 |
window: |
|
1325 |
(WindowSpec |
|
1326 |
label: 'Image Editor' |
|
1327 |
name: 'Image Editor' |
|
1328 |
min: (Point 400 320) |
|
1329 |
bounds: (Rectangle 0 0 450 350) |
|
1330 |
menu: menu |
|
1558 | 1331 |
) |
1820 | 1332 |
component: |
1333 |
(SpecCollection |
|
1334 |
collection: ( |
|
1335 |
(MenuPanelSpec |
|
1336 |
name: 'menuToolbarView' |
|
1337 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1338 |
style: (FontDescription helvetica medium roman 10) |
|
1339 |
menu: menuToolbar |
|
1340 |
showSeparatingLines: true |
|
1558 | 1341 |
) |
1820 | 1342 |
(VariableHorizontalPanelSpec |
1343 |
name: 'horizontalPanel' |
|
1344 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1345 |
snapMode: both |
|
1843 | 1346 |
barLevel: 0 |
1820 | 1347 |
component: |
1348 |
(SpecCollection |
|
1349 |
collection: ( |
|
1350 |
(ViewSpec |
|
1351 |
name: 'leftView' |
|
1352 |
level: 1 |
|
1353 |
component: |
|
1354 |
(SpecCollection |
|
1355 |
collection: ( |
|
1356 |
(VariableVerticalPanelSpec |
|
1357 |
name: 'verticalPanel' |
|
1358 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1359 |
level: 0 |
|
1360 |
snapMode: both |
|
1361 |
component: |
|
1362 |
(SpecCollection |
|
1363 |
collection: ( |
|
1364 |
(ViewSpec |
|
1365 |
name: 'View1' |
|
1366 |
component: |
|
1367 |
(SpecCollection |
|
1368 |
collection: ( |
|
1369 |
(MenuPanelSpec |
|
1370 |
name: 'MouseButtonColorToolBar' |
|
1371 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
1372 |
level: 0 |
|
1373 |
menu: menuMouseButtonColors |
|
1558 | 1374 |
) |
1820 | 1375 |
(DataSetSpec |
1376 |
name: 'colorDataSetView' |
|
1377 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
1378 |
activeHelpKey: colorMapTable |
|
1379 |
style: (FontDescription helvetica medium roman 10) |
|
1380 |
model: selectionOfColor |
|
1381 |
menu: colorMapMenu |
|
1382 |
hasHorizontalScrollBar: true |
|
1383 |
hasVerticalScrollBar: true |
|
1384 |
miniScrollerHorizontal: true |
|
1385 |
miniScrollerVertical: true |
|
1386 |
dataList: listOfColors |
|
1387 |
has3Dsepartors: true |
|
1388 |
has3Dseparators: true |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
1389 |
columnHolder: tableColumns |
1820 | 1390 |
verticalSpacing: 1 |
1391 |
columns: |
|
1392 |
(OrderedCollection |
|
1558 | 1393 |
|
1820 | 1394 |
(DataSetColumnSpec |
1395 |
labelButtonType: Button |
|
1396 |
rendererType: rowSelector |
|
1397 |
backgroundSelector: theColorItSelf: |
|
1558 | 1398 |
) |
1820 | 1399 |
(DataSetColumnSpec |
1400 |
label: 'R' |
|
1401 |
labelAlignment: left |
|
1402 |
labelButtonType: Button |
|
1403 |
columnAlignment: right |
|
1404 |
editorType: InputField |
|
1405 |
type: number |
|
1406 |
model: redFromColor: |
|
1407 |
writeSelector: redAtColor:put: |
|
1408 |
selectSelector: canSelectRedInColor: |
|
1558 | 1409 |
) |
1410 |
||
1820 | 1411 |
(DataSetColumnSpec |
1412 |
label: 'G' |
|
1413 |
labelAlignment: left |
|
1414 |
labelButtonType: Button |
|
1415 |
columnAlignment: right |
|
1416 |
editorType: InputField |
|
1417 |
type: number |
|
1418 |
model: greenFromColor: |
|
1419 |
writeSelector: greenAtColor:put: |
|
1420 |
selectSelector: canSelectGreenInColor: |
|
1558 | 1421 |
) |
1820 | 1422 |
(DataSetColumnSpec |
1423 |
label: 'B' |
|
1424 |
labelAlignment: left |
|
1425 |
labelButtonType: Button |
|
1426 |
columnAlignment: right |
|
1427 |
editorType: InputField |
|
1428 |
type: number |
|
1429 |
model: blueFromColor: |
|
1430 |
writeSelector: blueAtColor:put: |
|
1431 |
selectSelector: canSelectBlueInColor: |
|
767 | 1432 |
) |
1558 | 1433 |
) |
1820 | 1434 |
columnAdaptor: colorColumnAdaptor |
767 | 1435 |
) |
1558 | 1436 |
) |
1437 |
||
1438 |
) |
|
1439 |
) |
|
1820 | 1440 |
(ArbitraryComponentSpec |
1441 |
name: 'imagePreView' |
|
1442 |
activeHelpKey: previewView |
|
1443 |
menu: previewMenu |
|
1444 |
hasHorizontalScrollBar: true |
|
1445 |
hasVerticalScrollBar: true |
|
1446 |
miniScrollerHorizontal: true |
|
1447 |
miniScrollerVertical: true |
|
1448 |
hasBorder: false |
|
1449 |
component: ImageView |
|
767 | 1450 |
) |
1558 | 1451 |
) |
1452 |
||
767 | 1453 |
) |
1820 | 1454 |
handles: (Any 0.5 1.0) |
767 | 1455 |
) |
1558 | 1456 |
) |
1457 |
||
767 | 1458 |
) |
1558 | 1459 |
) |
1820 | 1460 |
(ViewSpec |
1461 |
name: 'rightView' |
|
1462 |
component: |
|
1463 |
(SpecCollection |
|
1464 |
collection: ( |
|
1465 |
(MenuPanelSpec |
|
1466 |
name: 'ToolBar1' |
|
1467 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
1468 |
level: 1 |
|
1469 |
menu: toolsMenuToolbar |
|
1470 |
verticalLayout: true |
|
1471 |
centerItems: true |
|
1472 |
textDefault: true |
|
1558 | 1473 |
) |
1820 | 1474 |
(ViewSpec |
1475 |
name: 'editingView' |
|
1476 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
1477 |
level: 1 |
|
1478 |
component: |
|
1479 |
(SpecCollection |
|
1480 |
collection: ( |
|
1481 |
(ArbitraryComponentSpec |
|
1482 |
name: 'imageEditView' |
|
1483 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
1484 |
hasHorizontalScrollBar: true |
|
1485 |
hasVerticalScrollBar: true |
|
1486 |
hasBorder: false |
|
1487 |
component: ImageEditView |
|
1637 | 1488 |
) |
1820 | 1489 |
(LabelSpec |
1490 |
name: 'coordLabel' |
|
1491 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1492 |
level: -1 |
|
1493 |
labelChannel: imageInfoHolder |
|
1494 |
resizeForLabel: false |
|
1495 |
adjust: left |
|
1637 | 1496 |
) |
1820 | 1497 |
(ArrowButtonSpec |
1498 |
name: 'magnifyDownButton' |
|
1499 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
1500 |
activeHelpKey: magnifyImageDown |
|
1501 |
model: doMagnifyDown |
|
1502 |
enableChannel: imageIsLoaded |
|
1503 |
isTriggerOnDown: true |
|
1504 |
direction: left |
|
1637 | 1505 |
) |
1820 | 1506 |
(ArrowButtonSpec |
1507 |
name: 'magnifyUpButton' |
|
1508 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
1509 |
activeHelpKey: magnifyImageUp |
|
1510 |
model: doMagnifyUp |
|
1511 |
enableChannel: imageIsLoaded |
|
1512 |
isTriggerOnDown: true |
|
1513 |
direction: right |
|
1637 | 1514 |
) |
1820 | 1515 |
(InputFieldSpec |
1516 |
name: 'magnificationInputField' |
|
1517 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
1518 |
activeHelpKey: magnificationNumber |
|
1519 |
enableChannel: imageIsLoaded |
|
1520 |
model: valueOfMagnification |
|
1521 |
type: numberInRange |
|
1522 |
acceptOnReturn: false |
|
1523 |
acceptOnTab: false |
|
1524 |
numChars: 2 |
|
1525 |
minValue: 1 |
|
1526 |
maxValue: 99 |
|
1527 |
acceptOnPointerLeave: false |
|
1637 | 1528 |
) |
1529 |
) |
|
1530 |
||
1531 |
) |
|
1558 | 1532 |
) |
1533 |
) |
|
1534 |
||
1535 |
) |
|
1536 |
) |
|
1537 |
) |
|
1538 |
||
767 | 1539 |
) |
1843 | 1540 |
handles: (Any 0.288889 1.0) |
1558 | 1541 |
) |
1820 | 1542 |
(UISubSpecification |
1543 |
name: 'infoBarSubSpec' |
|
1544 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1545 |
majorKey: ToolApplicationModel |
|
1546 |
minorKey: windowSpecForInfoBar |
|
1558 | 1547 |
) |
1548 |
) |
|
1549 |
||
1550 |
) |
|
767 | 1551 |
) |
519 | 1552 |
! ! |
1553 |
||
1554 |
!ImageEditor class methodsFor:'menu specs'! |
|
1555 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1556 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1557 |
"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
|
1558 |
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
|
1559 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1560 |
"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
|
1561 |
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
|
1562 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1563 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1564 |
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
|
1565 |
(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
|
1566 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1567 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1568 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1569 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1570 |
^ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1571 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1572 |
#(#Menu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1573 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1574 |
#( |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1575 |
#(#MenuItem |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1576 |
#label: 'Add Color' |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1577 |
#translateLabel: true |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1578 |
#value: #addColorToColormap |
1741 | 1579 |
#enabled: #hasColormap |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1580 |
) |
1544 | 1581 |
#(#MenuItem |
1682 | 1582 |
#label: 'Pick and Add Color' |
1583 |
#translateLabel: true |
|
1584 |
#value: #pickAndAddColorToColormap |
|
1741 | 1585 |
#enabled: #hasColormap |
1682 | 1586 |
) |
1587 |
#(#MenuItem |
|
1588 |
#label: '-' |
|
1589 |
) |
|
1590 |
#(#MenuItem |
|
1762 | 1591 |
#label: 'Brighter' |
1592 |
#translateLabel: true |
|
1593 |
#value: #makeSelectedColorBrighter |
|
1594 |
#enabled: #hasColormap |
|
1595 |
) |
|
1596 |
#(#MenuItem |
|
1682 | 1597 |
#label: 'Darker' |
1598 |
#translateLabel: true |
|
1599 |
#value: #makeSelectedColorDarker |
|
1741 | 1600 |
#enabled: #hasColormap |
1682 | 1601 |
) |
1602 |
#(#MenuItem |
|
1544 | 1603 |
#label: '-' |
1604 |
) |
|
1605 |
#(#MenuItem |
|
1606 |
#label: 'Inspect Color' |
|
1607 |
#translateLabel: true |
|
1608 |
#value: #inspectColor |
|
1741 | 1609 |
#enabled: #hasColormap |
1544 | 1610 |
) |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1611 |
) nil |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1612 |
nil |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1613 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1614 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1615 |
"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
|
1616 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1617 |
|
400 | 1618 |
menu |
737 | 1619 |
"This resource specification was automatically generated |
1620 |
by the MenuEditor of ST/X." |
|
400 | 1621 |
|
737 | 1622 |
"Do not manually edit this!! If it is corrupted, |
1623 |
the MenuEditor may not be able to read the specification." |
|
400 | 1624 |
|
1625 |
" |
|
1626 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
1627 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
1628 |
" |
|
1629 |
||
1630 |
<resource: #menu> |
|
1631 |
||
1124 | 1632 |
^ |
1633 |
#(#Menu |
|
1634 |
#( |
|
1635 |
#(#MenuItem |
|
1489 | 1636 |
#label: '&File' |
1124 | 1637 |
#translateLabel: true |
1638 |
#submenu: |
|
1639 |
#(#Menu |
|
1640 |
#( |
|
1641 |
#(#MenuItem |
|
1637 | 1642 |
#activeHelpKey: #fileNewImage |
1124 | 1643 |
#label: 'New...' |
1637 | 1644 |
#itemValue: #doNewImage |
1124 | 1645 |
#translateLabel: true |
1646 |
) |
|
1647 |
#(#MenuItem |
|
1682 | 1648 |
#activeHelpKey: #fileNewImage |
1649 |
#label: 'New from ClipBoard' |
|
1650 |
#itemValue: #doNewImageFromClipboard |
|
1651 |
#translateLabel: true |
|
1652 |
) |
|
1653 |
#(#MenuItem |
|
1124 | 1654 |
#label: '-' |
1655 |
) |
|
1656 |
#(#MenuItem |
|
1637 | 1657 |
#activeHelpKey: #fileLoadFromClass |
1124 | 1658 |
#label: 'Load...' |
1637 | 1659 |
#itemValue: #doLoadFromClass |
1124 | 1660 |
#translateLabel: true |
1661 |
) |
|
1662 |
#(#MenuItem |
|
1637 | 1663 |
#activeHelpKey: #fileLoadFromFile |
1570 | 1664 |
#label: 'Load from File...' |
1637 | 1665 |
#itemValue: #doLoadFromFile |
1124 | 1666 |
#translateLabel: true |
1667 |
) |
|
1668 |
#(#MenuItem |
|
1637 | 1669 |
#activeHelpKey: #fileGrabImage |
1656 | 1670 |
#label: 'Grab from Screen...' |
1637 | 1671 |
#itemValue: #grabScreenImage |
1124 | 1672 |
#translateLabel: true |
1673 |
) |
|
1674 |
#(#MenuItem |
|
1637 | 1675 |
#enabled: #imageHasNextImage |
1496 | 1676 |
#label: 'Next in Sequence' |
1637 | 1677 |
#itemValue: #nextImageInSequence |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
1678 |
#translateLabel: true |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
1679 |
) |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
1680 |
#(#MenuItem |
1124 | 1681 |
#label: '-' |
1682 |
) |
|
1683 |
#(#MenuItem |
|
1684 |
#activeHelpKey: #fileSaveMethod |
|
1685 |
#enabled: #imageIsLoadedAndClassDefined |
|
1637 | 1686 |
#label: 'Save' |
1687 |
#itemValue: #doSaveMethod |
|
1688 |
#translateLabel: true |
|
1124 | 1689 |
) |
1690 |
#(#MenuItem |
|
1691 |
#activeHelpKey: #fileSaveMethodAs |
|
1692 |
#enabled: #imageIsLoaded |
|
1637 | 1693 |
#label: 'Save As...' |
1694 |
#itemValue: #doSaveMethodAs |
|
1695 |
#translateLabel: true |
|
1124 | 1696 |
) |
1697 |
#(#MenuItem |
|
1698 |
#activeHelpKey: #fileSaveAs |
|
1699 |
#enabled: #imageIsLoaded |
|
1637 | 1700 |
#label: 'Save to File...' |
1701 |
#itemValue: #doSaveImageFileAs |
|
1702 |
#translateLabel: true |
|
1124 | 1703 |
) |
1704 |
#(#MenuItem |
|
1705 |
#activeHelpKey: #fileSaveMaskAs |
|
1706 |
#enabled: #imageIsLoaded |
|
1637 | 1707 |
#label: 'Save Mask to File...' |
1708 |
#itemValue: #doSaveImageMaskFileAs |
|
1709 |
#translateLabel: true |
|
1124 | 1710 |
) |
1711 |
#(#MenuItem |
|
1613 | 1712 |
#activeHelpKey: #fileSaveButtonImageAs |
1713 |
#enabled: #imageIsLoaded |
|
1656 | 1714 |
#label: 'Save as Button to File...' |
1637 | 1715 |
#itemValue: #doSaveButtonImageToFileAs |
1716 |
#translateLabel: true |
|
1613 | 1717 |
) |
1718 |
#(#MenuItem |
|
1713 | 1719 |
#enabled: #imageIsLoaded |
1703 | 1720 |
#label: 'Copy to Clipboard' |
1721 |
#itemValue: #doCopyImageToClipboard |
|
1722 |
#translateLabel: true |
|
1723 |
) |
|
1724 |
#(#MenuItem |
|
1124 | 1725 |
#label: '-' |
1726 |
) |
|
1727 |
#(#MenuItem |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1728 |
#activeHelpKey: #fileShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1729 |
#enabled: #imageIsLoaded |
1637 | 1730 |
#label: 'Show storeString' |
1731 |
#itemValue: #doShowStoreString |
|
1732 |
#translateLabel: true |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1733 |
) |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1734 |
#(#MenuItem |
1433 | 1735 |
#activeHelpKey: #fileEditMask |
1736 |
#enabled: #imageIsLoaded |
|
1637 | 1737 |
#label: 'Edit Mask' |
1738 |
#itemValue: #doEditMask |
|
1739 |
#translateLabel: true |
|
1433 | 1740 |
) |
1741 |
#(#MenuItem |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1742 |
#label: '-' |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1743 |
) |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1744 |
#(#MenuItem |
1124 | 1745 |
#activeHelpKey: #filePrint |
1746 |
#enabled: #imageIsLoaded |
|
1637 | 1747 |
#label: 'Print' |
1748 |
#itemValue: #doPrint |
|
1749 |
#translateLabel: true |
|
1124 | 1750 |
) |
1751 |
#(#MenuItem |
|
1752 |
#label: '-' |
|
1753 |
) |
|
1754 |
#(#MenuItem |
|
1755 |
#activeHelpKey: #fileBrowseClass |
|
1756 |
#enabled: #hasClassDefined |
|
1637 | 1757 |
#label: 'Browse Class' |
1758 |
#itemValue: #doBrowseClass |
|
1759 |
#translateLabel: true |
|
1124 | 1760 |
) |
1761 |
#(#MenuItem |
|
1762 |
#label: '-' |
|
1763 |
) |
|
1764 |
#(#MenuItem |
|
1637 | 1765 |
#activeHelpKey: #fileExit |
1124 | 1766 |
#label: 'Exit' |
1637 | 1767 |
#itemValue: #closeRequest |
1124 | 1768 |
#translateLabel: true |
1769 |
) |
|
1770 |
) |
|
1771 |
nil |
|
1772 |
nil |
|
400 | 1773 |
) |
1124 | 1774 |
) |
1775 |
#(#MenuItem |
|
1637 | 1776 |
#enabled: #imageIsLoaded |
1124 | 1777 |
#label: 'Edit' |
1778 |
#translateLabel: true |
|
1779 |
#submenu: |
|
1780 |
#(#Menu |
|
1781 |
#( |
|
1782 |
#(#MenuItem |
|
1783 |
#activeHelpKey: #editUndo |
|
1784 |
#enabled: #valueOfCanUndo |
|
1637 | 1785 |
#label: 'Undo' |
1786 |
#itemValue: #doUndo |
|
1787 |
#translateLabel: true |
|
1124 | 1788 |
) |
1789 |
#(#MenuItem |
|
1790 |
#label: '-' |
|
1791 |
) |
|
1792 |
#(#MenuItem |
|
1637 | 1793 |
#activeHelpKey: #editFlipVertical |
1124 | 1794 |
#label: 'Flip - Vertical' |
1637 | 1795 |
#itemValue: #doFlipVertical |
1124 | 1796 |
#translateLabel: true |
1797 |
) |
|
1798 |
#(#MenuItem |
|
1637 | 1799 |
#activeHelpKey: #editFlipHorizontal |
1124 | 1800 |
#label: 'Flip - Horizontal' |
1637 | 1801 |
#itemValue: #doFlipHorizontal |
1124 | 1802 |
#translateLabel: true |
1803 |
) |
|
1804 |
#(#MenuItem |
|
1805 |
#label: '-' |
|
1806 |
) |
|
1807 |
#(#MenuItem |
|
1637 | 1808 |
#activeHelpKey: #editResize |
1124 | 1809 |
#label: 'Resize...' |
1637 | 1810 |
#itemValue: #doResizeImage |
1124 | 1811 |
#translateLabel: true |
1812 |
) |
|
1813 |
#(#MenuItem |
|
1637 | 1814 |
#activeHelpKey: #editMagnifyImage |
1124 | 1815 |
#label: 'Magnify...' |
1637 | 1816 |
#itemValue: #doMagnifyImage |
1124 | 1817 |
#translateLabel: true |
1818 |
) |
|
1819 |
#(#MenuItem |
|
1637 | 1820 |
#activeHelpKey: #editMagnifyImage |
1479 | 1821 |
#label: 'Magnify By...' |
1637 | 1822 |
#itemValue: #doMagnifyImageBy |
1479 | 1823 |
#translateLabel: true |
1824 |
) |
|
1825 |
#(#MenuItem |
|
1637 | 1826 |
#activeHelpKey: #editRotate |
1124 | 1827 |
#label: 'Rotate...' |
1637 | 1828 |
#itemValue: #doRotateImage |
1124 | 1829 |
#translateLabel: true |
1830 |
) |
|
1831 |
#(#MenuItem |
|
1832 |
#label: '-' |
|
1833 |
) |
|
1834 |
#(#MenuItem |
|
1146 | 1835 |
#label: 'Invert' |
1637 | 1836 |
#itemValue: #doNegativeImage |
1146 | 1837 |
#translateLabel: true |
1838 |
) |
|
1839 |
#(#MenuItem |
|
1840 |
#label: '-' |
|
1841 |
) |
|
1842 |
#(#MenuItem |
|
1124 | 1843 |
#label: 'Crop' |
1844 |
#translateLabel: true |
|
1845 |
#submenu: |
|
400 | 1846 |
#(#Menu |
1124 | 1847 |
#( |
1848 |
#(#MenuItem |
|
1637 | 1849 |
#activeHelpKey: #cropAll |
1124 | 1850 |
#label: 'All' |
1637 | 1851 |
#itemValue: #doCropAll |
1124 | 1852 |
#translateLabel: true |
400 | 1853 |
) |
1124 | 1854 |
#(#MenuItem |
1855 |
#label: '-' |
|
986 | 1856 |
) |
1124 | 1857 |
#(#MenuItem |
1637 | 1858 |
#activeHelpKey: #cropLeft |
1124 | 1859 |
#label: 'Left' |
1637 | 1860 |
#itemValue: #doCropLeft |
1124 | 1861 |
#translateLabel: true |
1862 |
) |
|
1863 |
#(#MenuItem |
|
1637 | 1864 |
#activeHelpKey: #cropRight |
1124 | 1865 |
#label: 'Right' |
1637 | 1866 |
#itemValue: #doCropRight |
1124 | 1867 |
#translateLabel: true |
986 | 1868 |
) |
1124 | 1869 |
#(#MenuItem |
1637 | 1870 |
#activeHelpKey: #cropTop |
1124 | 1871 |
#label: 'Top' |
1637 | 1872 |
#itemValue: #doCropTop |
1124 | 1873 |
#translateLabel: true |
672 | 1874 |
) |
1124 | 1875 |
#(#MenuItem |
1637 | 1876 |
#activeHelpKey: #cropBottom |
1124 | 1877 |
#label: 'Bottom' |
1637 | 1878 |
#itemValue: #doCropBottom |
1124 | 1879 |
#translateLabel: true |
400 | 1880 |
) |
1124 | 1881 |
#(#MenuItem |
1882 |
#label: '-' |
|
400 | 1883 |
) |
1124 | 1884 |
#(#MenuItem |
1637 | 1885 |
#activeHelpKey: #cropManual |
1124 | 1886 |
#label: 'Manual...' |
1637 | 1887 |
#itemValue: #doCropManual |
1124 | 1888 |
#translateLabel: true |
400 | 1889 |
) |
1124 | 1890 |
) |
1891 |
nil |
|
400 | 1892 |
nil |
1124 | 1893 |
) |
400 | 1894 |
) |
1489 | 1895 |
#(#MenuItem |
1713 | 1896 |
#activeHelpKey: #uncropManual |
1897 |
#label: 'Uncrop (Add Border)...' |
|
1898 |
#itemValue: #doUnCropManual |
|
1899 |
#translateLabel: true |
|
1900 |
) |
|
1901 |
#(#MenuItem |
|
1637 | 1902 |
#activeHelpKey: #shiftManual |
1557 | 1903 |
#label: 'Shift...' |
1637 | 1904 |
#itemValue: #doShiftManual |
1557 | 1905 |
#translateLabel: true |
1906 |
) |
|
1124 | 1907 |
) |
1908 |
nil |
|
1909 |
nil |
|
400 | 1910 |
) |
1124 | 1911 |
) |
1912 |
#(#MenuItem |
|
1637 | 1913 |
#enabled: #imageIsLoaded |
1914 |
#label: 'Mode' |
|
1915 |
#translateLabel: true |
|
1916 |
#submenuChannel: #modeMenu |
|
1917 |
) |
|
1918 |
#(#MenuItem |
|
1919 |
#enabled: #imageIsLoaded |
|
1124 | 1920 |
#label: 'ColorMap' |
1921 |
#translateLabel: true |
|
1922 |
#submenu: |
|
1923 |
#(#Menu |
|
1924 |
#( |
|
1925 |
#(#MenuItem |
|
1649 | 1926 |
#label: 'Depth' |
1124 | 1927 |
#translateLabel: true |
1649 | 1928 |
#submenu: |
1929 |
#(#Menu |
|
1930 |
#( |
|
1931 |
#(#MenuItem |
|
1932 |
#activeHelpKey: #colorMap8 |
|
1933 |
#label: '8-Plane' |
|
1934 |
#itemValue: #colorMapMode: |
|
1935 |
#translateLabel: true |
|
1936 |
#argument: '8-plane' |
|
1937 |
#choice: #colorMapMode |
|
1938 |
#choiceValue: '8-plane' |
|
1939 |
) |
|
1940 |
#(#MenuItem |
|
1941 |
#activeHelpKey: #colorMap4 |
|
1942 |
#label: '4-Plane' |
|
1943 |
#itemValue: #colorMapMode: |
|
1944 |
#translateLabel: true |
|
1945 |
#argument: '4-plane' |
|
1946 |
#choice: #colorMapMode |
|
1947 |
#choiceValue: '4-plane' |
|
1948 |
) |
|
1949 |
#(#MenuItem |
|
1950 |
#activeHelpKey: #colorMap2 |
|
1951 |
#label: '2-Plane' |
|
1952 |
#itemValue: #colorMapMode: |
|
1953 |
#translateLabel: true |
|
1954 |
#argument: '2-plane' |
|
1955 |
#choice: #colorMapMode |
|
1956 |
#choiceValue: '2-plane' |
|
1957 |
) |
|
1958 |
#(#MenuItem |
|
1959 |
#activeHelpKey: #colorMap1 |
|
1960 |
#label: '1-Plane' |
|
1961 |
#itemValue: #colorMapMode: |
|
1962 |
#translateLabel: true |
|
1963 |
#argument: '1-plane' |
|
1964 |
#choice: #colorMapMode |
|
1965 |
#choiceValue: '1-plane' |
|
1966 |
) |
|
1967 |
#(#MenuItem |
|
1968 |
#label: '-' |
|
1969 |
) |
|
1970 |
#(#MenuItem |
|
1971 |
#activeHelpKey: #colorMap8M |
|
1972 |
#label: '8-Plane + Mask' |
|
1973 |
#itemValue: #colorMapMode: |
|
1974 |
#translateLabel: true |
|
1975 |
#argument: '8-plane + mask' |
|
1976 |
#choice: #colorMapMode |
|
1977 |
#choiceValue: '8-plane + mask' |
|
1978 |
) |
|
1979 |
#(#MenuItem |
|
1980 |
#activeHelpKey: #colorMap4M |
|
1981 |
#label: '4-Plane + Mask' |
|
1982 |
#itemValue: #colorMapMode: |
|
1983 |
#translateLabel: true |
|
1984 |
#argument: '4-plane + mask' |
|
1985 |
#choice: #colorMapMode |
|
1986 |
#choiceValue: '4-plane + mask' |
|
1987 |
) |
|
1988 |
#(#MenuItem |
|
1989 |
#activeHelpKey: #colorMap2M |
|
1990 |
#label: '2-Plane + Mask' |
|
1991 |
#itemValue: #colorMapMode: |
|
1992 |
#translateLabel: true |
|
1993 |
#argument: '2-plane + mask' |
|
1994 |
#choice: #colorMapMode |
|
1995 |
#choiceValue: '2-plane + mask' |
|
1996 |
) |
|
1997 |
#(#MenuItem |
|
1998 |
#activeHelpKey: #colorMap1M |
|
1999 |
#label: '1-Plane + Mask' |
|
2000 |
#itemValue: #colorMapMode: |
|
2001 |
#translateLabel: true |
|
2002 |
#argument: '1-plane + mask' |
|
2003 |
#choice: #colorMapMode |
|
2004 |
#choiceValue: '1-plane + mask' |
|
2005 |
) |
|
2006 |
) |
|
2007 |
nil |
|
2008 |
nil |
|
2009 |
) |
|
1124 | 2010 |
) |
2011 |
#(#MenuItem |
|
1649 | 2012 |
#label: 'Colors' |
1124 | 2013 |
#translateLabel: true |
1649 | 2014 |
#submenu: |
2015 |
#(#Menu |
|
2016 |
#( |
|
2017 |
#(#MenuItem |
|
2018 |
#activeHelpKey: #compressColormap |
|
2019 |
#enabled: #hasColormap |
|
2020 |
#label: 'Compress Colormap' |
|
2021 |
#itemValue: #compressColorMap |
|
2022 |
#translateLabel: true |
|
2023 |
) |
|
2024 |
#(#MenuItem |
|
2025 |
#enabled: #hasColormap |
|
2026 |
#label: 'Sort Colormap' |
|
2027 |
#itemValue: #sortColorMap |
|
2028 |
#translateLabel: true |
|
2029 |
) |
|
2030 |
#(#MenuItem |
|
2031 |
#label: 'Reduce Number of Colors...' |
|
2032 |
#itemValue: #reduceNumberOfColors |
|
2033 |
#translateLabel: true |
|
2034 |
) |
|
2035 |
) |
|
2036 |
nil |
|
2037 |
nil |
|
2038 |
) |
|
1124 | 2039 |
) |
2040 |
#(#MenuItem |
|
1649 | 2041 |
#label: 'Process' |
1598 | 2042 |
#translateLabel: true |
1649 | 2043 |
#submenu: |
2044 |
#(#Menu |
|
2045 |
#( |
|
2046 |
#(#MenuItem |
|
2047 |
#label: 'Make GrayScale' |
|
2048 |
#itemValue: #makeGrayScale |
|
2049 |
#translateLabel: true |
|
2050 |
) |
|
2051 |
#(#MenuItem |
|
2052 |
#label: 'Make Brighter' |
|
2053 |
#itemValue: #makeBrighter |
|
2054 |
#translateLabel: true |
|
2055 |
) |
|
2056 |
#(#MenuItem |
|
2057 |
#label: 'Make Darker' |
|
2058 |
#itemValue: #makeDarker |
|
2059 |
#translateLabel: true |
|
2060 |
) |
|
2061 |
#(#MenuItem |
|
2062 |
#label: 'Make Inverse' |
|
2063 |
#itemValue: #makeInverse |
|
2064 |
#translateLabel: true |
|
2065 |
) |
|
2066 |
#(#MenuItem |
|
2067 |
#label: '-' |
|
2068 |
) |
|
2069 |
#(#MenuItem |
|
1650 | 2070 |
#label: 'Change HLS...' |
2071 |
#itemValue: #changeHLS |
|
1649 | 2072 |
#translateLabel: true |
2073 |
) |
|
2074 |
) |
|
2075 |
nil |
|
2076 |
nil |
|
2077 |
) |
|
1436 | 2078 |
) |
1480 | 2079 |
#(#MenuItem |
1649 | 2080 |
#label: 'Mask' |
1637 | 2081 |
#translateLabel: true |
1649 | 2082 |
#submenu: |
2083 |
#(#Menu |
|
2084 |
#( |
|
2085 |
#(#MenuItem |
|
2086 |
#activeHelpKey: #copyMask |
|
2087 |
#enabled: #hasMask |
|
2088 |
#label: 'Copy Mask' |
|
2089 |
#itemValue: #copyMask |
|
2090 |
#translateLabel: true |
|
2091 |
) |
|
2092 |
#(#MenuItem |
|
2093 |
#activeHelpKey: #pasteMask |
|
2094 |
#enabled: #hasMask |
|
2095 |
#label: 'Paste Mask' |
|
2096 |
#itemValue: #pasteMask |
|
2097 |
#translateLabel: true |
|
2098 |
) |
|
2099 |
#(#MenuItem |
|
2100 |
#label: 'Clear Masked Pixels' |
|
2101 |
#itemValue: #clearMaskedPixels |
|
2102 |
#translateLabel: true |
|
2103 |
) |
|
2104 |
) |
|
2105 |
nil |
|
2106 |
nil |
|
2107 |
) |
|
1598 | 2108 |
) |
1124 | 2109 |
) |
2110 |
nil |
|
2111 |
nil |
|
756 | 2112 |
) |
1124 | 2113 |
) |
2114 |
#(#MenuItem |
|
2115 |
#label: 'Settings' |
|
2116 |
#translateLabel: true |
|
2117 |
#submenu: |
|
2118 |
#(#Menu |
|
2119 |
#( |
|
2120 |
#(#MenuItem |
|
1637 | 2121 |
#activeHelpKey: #settingsGridMagnification |
1353 | 2122 |
#label: 'Grid Magnification Limit...' |
1637 | 2123 |
#itemValue: #doChangeGridMagnification |
1124 | 2124 |
#translateLabel: true |
2125 |
) |
|
2126 |
) |
|
2127 |
nil |
|
2128 |
nil |
|
400 | 2129 |
) |
1124 | 2130 |
) |
2131 |
#(#MenuItem |
|
2132 |
#label: 'History' |
|
2133 |
#translateLabel: true |
|
2134 |
#submenuChannel: #menuHistory |
|
2135 |
) |
|
2136 |
#(#MenuItem |
|
2137 |
#label: 'Help' |
|
2138 |
#translateLabel: true |
|
2139 |
#startGroup: #right |
|
2140 |
#submenuChannel: #menuHelp |
|
2141 |
) |
|
2142 |
) |
|
2143 |
nil |
|
2144 |
nil |
|
400 | 2145 |
) |
2146 |
! |
|
2147 |
||
679 | 2148 |
menuMouseButtonColors |
737 | 2149 |
"This resource specification was automatically generated |
2150 |
by the MenuEditor of ST/X." |
|
679 | 2151 |
|
737 | 2152 |
"Do not manually edit this!! If it is corrupted, |
2153 |
the MenuEditor may not be able to read the specification." |
|
679 | 2154 |
|
2155 |
" |
|
2156 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2157 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2158 |
" |
|
2159 |
||
2160 |
<resource: #menu> |
|
2161 |
||
2162 |
^ |
|
2163 |
||
2164 |
#(#Menu |
|
2165 |
||
2166 |
#( |
|
2167 |
#(#MenuItem |
|
2168 |
#label: 'Left Mouse Button' |
|
2169 |
#nameKey: #leftMouseKeyButton |
|
2170 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2171 |
#enabled: #imageIsLoaded |
679 | 2172 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2173 |
#choice: #mouseKeyColorMode |
2174 |
#choiceValue: 1 |
|
679 | 2175 |
) |
2176 |
#(#MenuItem |
|
2177 |
#label: 'Right Mouse Button' |
|
2178 |
#nameKey: #rightMouseKeyButton |
|
2179 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2180 |
#enabled: #imageIsLoaded |
679 | 2181 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2182 |
#choice: #mouseKeyColorMode |
2183 |
#choiceValue: 2 |
|
679 | 2184 |
) |
2185 |
) nil |
|
2186 |
nil |
|
2187 |
) |
|
2188 |
! |
|
2189 |
||
400 | 2190 |
menuToolbar |
737 | 2191 |
"This resource specification was automatically generated |
2192 |
by the MenuEditor of ST/X." |
|
400 | 2193 |
|
737 | 2194 |
"Do not manually edit this!! If it is corrupted, |
2195 |
the MenuEditor may not be able to read the specification." |
|
400 | 2196 |
|
2197 |
" |
|
2198 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
2199 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
2200 |
" |
|
2201 |
||
2202 |
<resource: #menu> |
|
2203 |
||
1196 | 2204 |
^ |
1820 | 2205 |
#(Menu |
2206 |
( |
|
2207 |
(MenuItem |
|
2208 |
activeHelpKey: fileNewImage |
|
2209 |
label: 'newImage' |
|
2210 |
itemValue: doNewImage |
|
2211 |
translateLabel: true |
|
2212 |
isButton: true |
|
2213 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImage24x24Icon) |
|
1196 | 2214 |
) |
1820 | 2215 |
(MenuItem |
2216 |
activeHelpKey: fileLoadFromFile |
|
2217 |
label: 'loadFromFile' |
|
2218 |
itemValue: doLoadFromFile |
|
2219 |
translateLabel: true |
|
2220 |
isButton: true |
|
2221 |
labelImage: (ResourceRetriever ToolbarIconLibrary load22x22Icon) |
|
2222 |
) |
|
2223 |
(MenuItem |
|
2224 |
activeHelpKey: fileSaveAs |
|
2225 |
enabled: imageIsLoaded |
|
2226 |
label: 'saveAsFile' |
|
2227 |
itemValue: doSaveImageFileAs |
|
2228 |
translateLabel: true |
|
2229 |
isButton: true |
|
2230 |
labelImage: (ResourceRetriever ToolbarIconLibrary save22x22Icon) |
|
2231 |
) |
|
2232 |
(MenuItem |
|
2233 |
label: '' |
|
1196 | 2234 |
) |
1820 | 2235 |
(MenuItem |
2236 |
activeHelpKey: fileLoadFromClass |
|
2237 |
label: 'loadFromClass' |
|
2238 |
itemValue: doLoadFromClass |
|
2239 |
translateLabel: true |
|
2240 |
isButton: true |
|
2241 |
submenuChannel: menuHistory |
|
2242 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethod22x22Icon) |
|
2243 |
keepLinkedMenu: true |
|
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
2244 |
) |
1820 | 2245 |
(MenuItem |
2246 |
activeHelpKey: fileSaveMethodAs |
|
2247 |
enabled: imageIsLoaded |
|
2248 |
label: 'saveAsMethod' |
|
2249 |
itemValue: doSaveMethodAs |
|
2250 |
translateLabel: true |
|
2251 |
isButton: true |
|
2252 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethod22x22Icon) |
|
2253 |
) |
|
2254 |
(MenuItem |
|
2255 |
label: '' |
|
1196 | 2256 |
) |
1820 | 2257 |
(MenuItem |
2258 |
label: '' |
|
1196 | 2259 |
) |
1820 | 2260 |
(MenuItem |
2261 |
activeHelpKey: editUndo |
|
2262 |
enabled: valueOfCanUndo |
|
2263 |
label: 'Undo' |
|
2264 |
itemValue: doUndo |
|
2265 |
translateLabel: true |
|
2266 |
isButton: true |
|
2267 |
labelImage: (ResourceRetriever ToolbarIconLibrary undo16x16Icon2) |
|
1196 | 2268 |
) |
1637 | 2269 |
) |
2270 |
nil |
|
2271 |
nil |
|
2272 |
) |
|
2273 |
! |
|
2274 |
||
2275 |
modeMenu |
|
2276 |
"This resource specification was automatically generated |
|
2277 |
by the MenuEditor of ST/X." |
|
2278 |
||
2279 |
"Do not manually edit this!! If it is corrupted, |
|
2280 |
the MenuEditor may not be able to read the specification." |
|
2281 |
||
2282 |
" |
|
2283 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
2284 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
2285 |
" |
|
2286 |
||
2287 |
<resource: #menu> |
|
2288 |
||
2289 |
^ |
|
2290 |
#(#Menu |
|
2291 |
#( |
|
1196 | 2292 |
#(#MenuItem |
2293 |
#activeHelpKey: #drawModePoint |
|
2294 |
#enabled: #imageIsLoaded |
|
1637 | 2295 |
#label: 'Point' |
2296 |
#translateLabel: true |
|
1196 | 2297 |
#choice: #editMode |
2298 |
#choiceValue: #point |
|
2299 |
) |
|
2300 |
#(#MenuItem |
|
2301 |
#activeHelpKey: #drawModeBox |
|
2302 |
#enabled: #imageIsLoaded |
|
1637 | 2303 |
#label: 'Rect' |
2304 |
#translateLabel: true |
|
1196 | 2305 |
#choice: #editMode |
2306 |
#choiceValue: #box |
|
2307 |
) |
|
2308 |
#(#MenuItem |
|
2309 |
#activeHelpKey: #drawModeFilledBox |
|
2310 |
#enabled: #imageIsLoaded |
|
1656 | 2311 |
#label: 'Filled Rectangle' |
1637 | 2312 |
#translateLabel: true |
1196 | 2313 |
#choice: #editMode |
2314 |
#choiceValue: #filledBox |
|
2315 |
) |
|
2316 |
#(#MenuItem |
|
2317 |
#activeHelpKey: #drawModeFill |
|
2318 |
#enabled: #imageIsLoaded |
|
1637 | 2319 |
#label: 'Fill' |
2320 |
#translateLabel: true |
|
1196 | 2321 |
#choice: #editMode |
2322 |
#choiceValue: #fill |
|
2323 |
) |
|
2324 |
#(#MenuItem |
|
2325 |
#activeHelpKey: #drawModeCopy |
|
2326 |
#enabled: #imageIsLoaded |
|
1637 | 2327 |
#label: 'Copy' |
2328 |
#translateLabel: true |
|
1196 | 2329 |
#choice: #editMode |
2330 |
#choiceValue: #copy |
|
2331 |
) |
|
2332 |
#(#MenuItem |
|
2333 |
#activeHelpKey: #drawModePaste |
|
2334 |
#enabled: #imageIsLoaded |
|
1637 | 2335 |
#label: 'Paste' |
2336 |
#translateLabel: true |
|
1196 | 2337 |
#choice: #editMode |
2338 |
#choiceValue: #paste |
|
2339 |
) |
|
2340 |
#(#MenuItem |
|
2341 |
#activeHelpKey: #drawModePasteUnder |
|
2342 |
#enabled: #imageIsLoaded |
|
1637 | 2343 |
#label: 'Paste Under' |
2344 |
#translateLabel: true |
|
1196 | 2345 |
#choice: #editMode |
2346 |
#choiceValue: #pasteUnder |
|
2347 |
) |
|
1411 | 2348 |
#(#MenuItem |
1579 | 2349 |
#activeHelpKey: #drawModePasteWithMask |
2350 |
#enabled: #imageIsLoaded |
|
1656 | 2351 |
#label: 'Paste with Mask' |
1637 | 2352 |
#translateLabel: true |
1579 | 2353 |
#choice: #editMode |
2354 |
#choiceValue: #pasteWithMask |
|
2355 |
) |
|
2356 |
#(#MenuItem |
|
1411 | 2357 |
#activeHelpKey: #drawModeSpecial |
2358 |
#enabled: #imageIsLoaded |
|
1637 | 2359 |
#label: 'Special' |
2360 |
#translateLabel: true |
|
1411 | 2361 |
#choice: #editMode |
2362 |
#choiceValue: #specialOperation |
|
2363 |
) |
|
1196 | 2364 |
) |
2365 |
nil |
|
2366 |
nil |
|
400 | 2367 |
) |
1558 | 2368 |
! |
2369 |
||
2370 |
previewMenu |
|
2371 |
"This resource specification was automatically generated |
|
2372 |
by the MenuEditor of ST/X." |
|
2373 |
||
2374 |
"Do not manually edit this!! If it is corrupted, |
|
2375 |
the MenuEditor may not be able to read the specification." |
|
2376 |
||
2377 |
" |
|
2378 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
2379 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
2380 |
" |
|
2381 |
||
2382 |
<resource: #menu> |
|
2383 |
||
2384 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2385 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2386 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2387 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2388 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2389 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2390 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2391 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2392 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2393 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2394 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2395 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2396 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2397 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2398 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2399 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2400 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2401 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2402 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2403 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2404 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2405 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2406 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2407 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2408 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2409 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2410 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2411 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2412 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2413 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2414 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2415 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2416 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2417 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2418 |
) |
1774 | 2419 |
(MenuItem |
2420 |
label: '-' |
|
2421 |
) |
|
2422 |
(MenuItem |
|
2423 |
label: 'Red' |
|
2424 |
translateLabel: true |
|
2425 |
choice: previewBackgroundColor |
|
2426 |
choiceValue: red |
|
2427 |
) |
|
2428 |
(MenuItem |
|
2429 |
label: 'Green' |
|
2430 |
translateLabel: true |
|
2431 |
choice: previewBackgroundColor |
|
2432 |
choiceValue: green |
|
2433 |
) |
|
2434 |
(MenuItem |
|
2435 |
label: 'Blue' |
|
2436 |
translateLabel: true |
|
2437 |
choice: previewBackgroundColor |
|
2438 |
choiceValue: blue |
|
2439 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2440 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2441 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2442 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2443 |
) |
1558 | 2444 |
) |
2445 |
) |
|
2446 |
nil |
|
2447 |
nil |
|
2448 |
) |
|
1637 | 2449 |
! |
2450 |
||
2451 |
toolsMenuToolbar |
|
2452 |
"This resource specification was automatically generated |
|
2453 |
by the MenuEditor of ST/X." |
|
2454 |
||
2455 |
"Do not manually edit this!! If it is corrupted, |
|
2456 |
the MenuEditor may not be able to read the specification." |
|
2457 |
||
2458 |
" |
|
2459 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
2460 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
2461 |
" |
|
2462 |
||
2463 |
<resource: #menu> |
|
2464 |
||
2465 |
^ |
|
2466 |
#(#Menu |
|
2467 |
#( |
|
2468 |
#(#MenuItem |
|
2469 |
#activeHelpKey: #drawModePoint |
|
2470 |
#enabled: #imageIsLoaded |
|
2471 |
#label: 'Point' |
|
2472 |
#translateLabel: true |
|
2473 |
#isButton: true |
|
2474 |
#labelImage: #(#ResourceRetriever #ImageEditor #pointIcon) |
|
2475 |
#choice: #editMode |
|
2476 |
#choiceValue: #point |
|
2477 |
) |
|
2478 |
#(#MenuItem |
|
2479 |
#activeHelpKey: #drawModeBox |
|
2480 |
#enabled: #imageIsLoaded |
|
2481 |
#label: 'Rect' |
|
2482 |
#translateLabel: true |
|
2483 |
#isButton: true |
|
2484 |
#labelImage: #(#ResourceRetriever #ImageEditor #rectIcon) |
|
2485 |
#choice: #editMode |
|
2486 |
#choiceValue: #box |
|
2487 |
) |
|
2488 |
#(#MenuItem |
|
2489 |
#activeHelpKey: #drawModeFilledBox |
|
2490 |
#enabled: #imageIsLoaded |
|
2491 |
#label: 'FillRect' |
|
2492 |
#translateLabel: true |
|
2493 |
#isButton: true |
|
2494 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon) |
|
2495 |
#choice: #editMode |
|
2496 |
#choiceValue: #filledBox |
|
2497 |
) |
|
2498 |
#(#MenuItem |
|
2499 |
#activeHelpKey: #drawModeFill |
|
2500 |
#enabled: #imageIsLoaded |
|
2501 |
#label: 'Fill' |
|
2502 |
#translateLabel: true |
|
2503 |
#isButton: true |
|
2504 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillIcon) |
|
2505 |
#choice: #editMode |
|
2506 |
#choiceValue: #fill |
|
2507 |
) |
|
2508 |
#(#MenuItem |
|
2509 |
#activeHelpKey: #drawModeCopy |
|
2510 |
#enabled: #imageIsLoaded |
|
2511 |
#label: 'Copy' |
|
2512 |
#translateLabel: true |
|
2513 |
#isButton: true |
|
2514 |
#labelImage: #(#ResourceRetriever #ImageEditor #copyIcon) |
|
2515 |
#choice: #editMode |
|
2516 |
#choiceValue: #copy |
|
2517 |
) |
|
2518 |
#(#MenuItem |
|
2519 |
#activeHelpKey: #drawModePaste |
|
2520 |
#enabled: #imageIsLoaded |
|
2521 |
#label: 'Paste' |
|
2522 |
#translateLabel: true |
|
2523 |
#isButton: true |
|
2524 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon) |
|
2525 |
#choice: #editMode |
|
2526 |
#choiceValue: #paste |
|
2527 |
) |
|
2528 |
#(#MenuItem |
|
2529 |
#activeHelpKey: #drawModePasteUnder |
|
2530 |
#enabled: #imageIsLoaded |
|
2531 |
#label: 'Paste Under' |
|
2532 |
#translateLabel: true |
|
2533 |
#isButton: true |
|
2534 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon) |
|
2535 |
#choice: #editMode |
|
2536 |
#choiceValue: #pasteUnder |
|
2537 |
) |
|
2538 |
#(#MenuItem |
|
2539 |
#activeHelpKey: #drawModePasteWithMask |
|
2540 |
#enabled: #imageIsLoaded |
|
2541 |
#label: 'Paste With Mask' |
|
2542 |
#translateLabel: true |
|
2543 |
#isButton: true |
|
2544 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon) |
|
2545 |
#choice: #editMode |
|
2546 |
#choiceValue: #pasteWithMask |
|
2547 |
) |
|
2548 |
#(#MenuItem |
|
2549 |
#activeHelpKey: #drawModeSpecial |
|
2550 |
#enabled: #imageIsLoaded |
|
2551 |
#label: 'Special' |
|
2552 |
#translateLabel: true |
|
2553 |
#isButton: true |
|
2554 |
#labelImage: #(#ResourceRetriever #ImageEditor #specialIcon) |
|
2555 |
#choice: #editMode |
|
2556 |
#choiceValue: #specialOperation |
|
2557 |
) |
|
2558 |
) |
|
2559 |
nil |
|
2560 |
nil |
|
2561 |
) |
|
400 | 2562 |
! ! |
2563 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2564 |
!ImageEditor class methodsFor:'tableColumns specs'! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2565 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2566 |
tableColumns |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2567 |
"This resource specification was automatically generated |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2568 |
by the DataSetBuilder of ST/X." |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2569 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2570 |
"Do not manually edit this!! If it is corrupted, |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2571 |
the DataSetBuilder may not be able to read the specification." |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2572 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2573 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2574 |
DataSetBuilder new openOnClass:ImageEditor andSelector:#tableColumns |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2575 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2576 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2577 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2578 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2579 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2580 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2581 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2582 |
rendererType: rowSelector |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2583 |
backgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2584 |
selectedBackgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2585 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2586 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2587 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2588 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2589 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2590 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2591 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2592 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2593 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2594 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2595 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2596 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2597 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2598 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2599 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2600 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2601 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2602 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2603 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2604 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2605 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2606 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2607 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2608 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2609 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2610 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2611 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2612 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2613 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2614 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2615 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2616 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2617 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2618 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2619 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2620 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2621 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2622 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2623 |
|
400 | 2624 |
!ImageEditor methodsFor:'accessing'! |
2625 |
||
2626 |
image |
|
767 | 2627 |
"returns the current editing image" |
400 | 2628 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2629 |
^ imageEditView image |
400 | 2630 |
! |
2631 |
||
2632 |
postOpenAction: anAction |
|
767 | 2633 |
"sets an action which is evaluated after opening" |
400 | 2634 |
|
2635 |
postOpenAction := anAction |
|
1381 | 2636 |
! |
2637 |
||
2638 |
resourceClass:aClass |
|
2639 |
imageEditView resourceClass:aClass |
|
400 | 2640 |
! ! |
2641 |
||
1398 | 2642 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 2643 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2644 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2645 |
"returns the view of the colormap" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2646 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2647 |
^(self componentAt: #colorDataSetView) |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2648 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2649 |
"Created: / 26.7.1998 / 12:02:14 / cg" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2650 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2651 |
|
487 | 2652 |
coordLabel |
767 | 2653 |
"returns the view the coord label" |
487 | 2654 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2655 |
^self componentAt: #coordLabel |
487 | 2656 |
! |
2657 |
||
400 | 2658 |
imageEditView |
911 | 2659 |
"returns the view of the image" |
400 | 2660 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2661 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2662 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2663 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2664 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2665 |
^ imageEditView |
1345 | 2666 |
|
2667 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 2668 |
! |
2669 |
||
2670 |
imagePreView |
|
767 | 2671 |
"returns the preview of the image" |
400 | 2672 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2673 |
^ (self componentAt: #imagePreView) subViews first |
475 | 2674 |
! ! |
2675 |
||
400 | 2676 |
!ImageEditor methodsFor:'aspects'! |
2677 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2678 |
activityInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2679 |
^ self valueOfInfoLabel |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2680 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2681 |
"Modified: / 29.7.1998 / 18:49:03 / cg" |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2682 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2683 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2684 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2685 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2686 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2687 |
"Created: / 26.7.1998 / 12:17:03 / cg" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2688 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2689 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2690 |
hasClassAndSelectorDefined |
1054 | 2691 |
^ [ |
2692 |
|clsName| |
|
2693 |
||
2694 |
(clsName := imageEditView resourceClass) size > 0 |
|
2695 |
and:[(Smalltalk at:clsName ifAbsent:nil) notNil |
|
2696 |
and:[imageEditView resourceSelector notNil]] |
|
2697 |
] |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2698 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2699 |
"Created: / 31.7.1998 / 02:02:54 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2700 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2701 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2702 |
hasClassDefined |
1054 | 2703 |
^ [ |
2704 |
|clsName| |
|
2705 |
||
1443 | 2706 |
(clsName := imageEditView resourceClass) size > 0 |
1054 | 2707 |
and:[(Smalltalk at:clsName ifAbsent:nil) notNil] |
2708 |
] |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2709 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2710 |
"Created: / 31.7.1998 / 02:02:22 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2711 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2712 |
|
1008 | 2713 |
hasColormap |
2714 |
^ [self image notNil and:[self image colorMap notNil]] |
|
2715 |
||
2716 |
"Created: / 30.9.1998 / 23:53:55 / cg" |
|
2717 |
! |
|
2718 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2719 |
imageHasNextImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2720 |
"returns whether an image is loaded as value holder" |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2721 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2722 |
^ [self image notNil |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2723 |
and:[self image imageSequence notNil]] |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2724 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2725 |
"Created: / 31.7.1998 / 02:04:18 / cg" |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2726 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2727 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2728 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2729 |
|holder| |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2730 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2731 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2732 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2733 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2734 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2735 |
"Modified: / 29.7.1998 / 18:32:08 / cg" |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2736 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2737 |
|
400 | 2738 |
imageIsLoaded |
767 | 2739 |
"returns whether an image is loaded as value holder" |
400 | 2740 |
|
2741 |
|holder| |
|
2742 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
2743 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
2744 |
]. |
|
2745 |
^ holder |
|
2746 |
! |
|
2747 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2748 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2749 |
"returns whether an image is loaded as value holder" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2750 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2751 |
^ [self hasClassAndSelectorDefined value |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2752 |
and:[self imageIsLoaded value]] |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2753 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2754 |
"Created: / 31.7.1998 / 02:04:18 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2755 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2756 |
|
400 | 2757 |
listOfColors |
767 | 2758 |
"returns the list of colors in a List" |
400 | 2759 |
|
2760 |
|holder| |
|
2761 |
(holder := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
2762 |
builder aspectAt:#listOfColors put:(holder := List new). |
|
942 | 2763 |
holder addDependent:self. |
400 | 2764 |
]. |
2765 |
^ holder |
|
2766 |
! |
|
2767 |
||
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2768 |
previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2769 |
|holder| |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2770 |
(holder := builder bindingAt:#previewBackgroundColor) isNil ifTrue:[ |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2771 |
builder aspectAt:#previewBackgroundColor put:(holder := nil asValue). |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2772 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2773 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2774 |
^ holder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2775 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2776 |
|
400 | 2777 |
selectionOfColor |
1682 | 2778 |
"returns a valueHolder for the current selection of the edit color. |
2779 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 2780 |
|
2781 |
|holder| |
|
1682 | 2782 |
|
400 | 2783 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
2784 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 2785 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 2786 |
]. |
2787 |
^ holder |
|
2788 |
! |
|
2789 |
||
1558 | 2790 |
tileModeHolder |
2791 |
|holder| |
|
2792 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
|
2793 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
2794 |
holder addDependent:self. |
|
2795 |
]. |
|
2796 |
^ holder |
|
2797 |
! |
|
2798 |
||
400 | 2799 |
valueOfMagnification |
767 | 2800 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 2801 |
|
2802 |
|holder| |
|
2803 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
2804 |
builder aspectAt:#valueOfMagnification put:( |
|
2805 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
2806 |
]. |
|
2807 |
^ holder |
|
2808 |
! ! |
|
2809 |
||
767 | 2810 |
!ImageEditor methodsFor:'change & update'! |
2811 |
||
2812 |
findColorMapMode |
|
899 | 2813 |
"finds the colorMapMode for a new image" |
767 | 2814 |
|
1054 | 2815 |
|image listOfColors| |
2816 |
||
2817 |
image := self image. |
|
2818 |
image depth > 8 ifTrue: [ |
|
2819 |
colorMapMode value: ''. |
|
2820 |
self listOfColors removeAll. |
|
2821 |
^ nil |
|
2822 |
]. |
|
2823 |
||
2824 |
colorMapMode value:(image depth printString, '-plane'). |
|
2825 |
||
2826 |
(listOfColors := self listOfColors) isEmpty ifTrue:[ |
|
2827 |
self colorMapMode: colorMapMode value. |
|
2828 |
listOfColors := self listOfColors. |
|
2829 |
image := self image. |
|
767 | 2830 |
]. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2831 |
imageEditView drawingColors:(Array |
1054 | 2832 |
with: (listOfColors at:1) |
2833 |
with: (listOfColors at:2 ifAbsent:[listOfColors at:1])). |
|
2834 |
||
2835 |
image mask notNil ifTrue: [ |
|
2836 |
colorMapMode value:(colorMapMode value, ' + mask'). |
|
2837 |
||
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2838 |
(listOfColors detect: [:clr| clr = (Color colorId:0)] ifNone: nil) isNil |
1054 | 2839 |
ifTrue:[ |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2840 |
listOfColors addFirst:(Color colorId:0). |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2841 |
imageEditView drawingColors: (Array |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2842 |
with:(listOfColors at:2 ifAbsent:[listOfColors at:1]) |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2843 |
with:(listOfColors at:1)). |
898 | 2844 |
] |
767 | 2845 |
]. |
1054 | 2846 |
self selectionOfColor |
1446 | 2847 |
setValue: 0; |
1054 | 2848 |
value: (self listOfColors indexOf: imageEditView selectedColor). |
767 | 2849 |
! |
2850 |
||
942 | 2851 |
update:something with:aParameter from:changedObject |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2852 |
|clrIndex img clr| |
1436 | 2853 |
|
2854 |
img := self image. |
|
1558 | 2855 |
|
2856 |
changedObject == self tileModeHolder ifTrue:[ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2857 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2858 |
tileMode:(changedObject value) tileOffset:(img extent); |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2859 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2860 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2861 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2862 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2863 |
changedObject == self previewBackgroundColor ifTrue:[ |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2864 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2865 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2866 |
ifFalse:[Color perform:changedObject value]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2867 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2868 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2869 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2870 |
invalidate. |
1558 | 2871 |
^ self |
2872 |
]. |
|
2873 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2874 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2875 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2876 |
"/ colormap entry changed at aParameter |
960 | 2877 |
|
2878 |
clrIndex := aParameter. |
|
2879 |
(self hasMask) ifTrue:[ |
|
2880 |
clrIndex := clrIndex - 1. |
|
2881 |
]. |
|
2882 |
||
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
2883 |
(img colorMap ? drawingColormap) at:clrIndex put:(changedObject at:aParameter). |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2884 |
self colorMapChanged. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2885 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2886 |
]. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2887 |
]. |
1124 | 2888 |
|
2889 |
changedObject == imageEditView undoImages ifTrue:[ |
|
2890 |
self valueOfCanUndo value:(changedObject notEmpty). |
|
2891 |
^ self. |
|
2892 |
]. |
|
2893 |
||
1345 | 2894 |
changedObject == imageEditView ifTrue:[ |
2895 |
something == #imageColors ifTrue:[ |
|
1436 | 2896 |
self listOfColors contents:img colorMap. |
1345 | 2897 |
self findColorMapMode. |
2898 |
^ self. |
|
2899 |
]. |
|
2900 |
something == #image ifTrue:[ |
|
1436 | 2901 |
self imagePreView image:img. |
2902 |
self listOfColors contents:img colorMap. |
|
2903 |
self findColorMapMode. |
|
1558 | 2904 |
self tileModeHolder value ifTrue:[ |
2905 |
self imagePreView tileMode:true tileOffset:(img extent). |
|
2906 |
]. |
|
1345 | 2907 |
^ self. |
2908 |
]. |
|
2909 |
something == #subImageIn ifTrue:[ |
|
1436 | 2910 |
self imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
2911 |
self error:'internal error' mayProceed:true. |
1406 | 2912 |
]. |
1558 | 2913 |
self tileModeHolder value ifTrue:[ |
2914 |
self imagePreView invalidate. |
|
2915 |
] ifFalse:[ |
|
2916 |
self imagePreView invalidate:aParameter. |
|
2917 |
]. |
|
1345 | 2918 |
^ self. |
2919 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2920 |
something == #selectedColor ifTrue:[ |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2921 |
(aParameter isNil or:[aParameter = (Color colorId:0)]) ifTrue:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2922 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2923 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2924 |
clrIndex := self hasMask ifTrue:[1] ifFalse:[0]. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2925 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2926 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2927 |
]. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2928 |
self selectionOfColor value:clrIndex. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2929 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2930 |
]. |
1345 | 2931 |
^ self. |
2932 |
]. |
|
2933 |
||
2934 |
changedObject == imageEditView image ifTrue:[ |
|
1377 | 2935 |
self halt:'to be implemented'. |
1345 | 2936 |
^ self. |
2937 |
]. |
|
2938 |
||
942 | 2939 |
super update:something with:aParameter from:changedObject |
2940 |
||
1345 | 2941 |
"Modified: / 10.2.2000 / 23:36:49 / cg" |
942 | 2942 |
! |
2943 |
||
1054 | 2944 |
updateForNoImage |
767 | 2945 |
"updates channels and view, if image is loaded" |
2946 |
||
2947 |
self imageIsLoaded value: false. |
|
2948 |
self listOfColors removeAll. |
|
2949 |
self imagePreView image: nil |
|
2950 |
||
2951 |
||
2952 |
||
2953 |
||
2954 |
! |
|
2955 |
||
2956 |
updateLabelsAndHistory |
|
2957 |
"updates labels and history, if something has changed" |
|
2958 |
||
2959 |
self imageIsLoaded value: self image notNil. |
|
2960 |
||
2961 |
self image isNil ifTrue: [^nil]. |
|
2962 |
||
2963 |
self updateInfoLabel. |
|
2964 |
||
911 | 2965 |
imageEditView resourceMessage asCollectionOfWords size = 2 |
2966 |
ifTrue: [self addToHistory: imageEditView resourceMessage -> #loadFromMessage:]. |
|
767 | 2967 |
|
2968 |
self image fileName notNil |
|
2969 |
ifTrue: [self addToHistory: self image fileName -> #loadFromFile:]. |
|
2970 |
||
2971 |
||
2972 |
||
2973 |
! ! |
|
2974 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2975 |
!ImageEditor methodsFor:'data access'! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2976 |
|
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2977 |
atColor:aOldColor put:aNewColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2978 |
"a color changed to a new color |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2979 |
" |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2980 |
|index list| |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2981 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2982 |
list := self listOfColors. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2983 |
index := list identityIndexOf:aOldColor. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2984 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2985 |
index ~~ 0 ifTrue:[ |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2986 |
list at:index put:aNewColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2987 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
2988 |
self error:'internal error' mayProceed:true. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2989 |
list add:aNewColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2990 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2991 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2992 |
|
942 | 2993 |
blueAtColor:aColor put:newBlue |
2994 |
"helper used to return a new row element, when blue is changed" |
|
2995 |
||
2996 |
|byte| |
|
2997 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
2998 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 2999 |
byte := newBlue clampBetween:0 and:255. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3000 |
byte = aColor blueByte ifTrue:[^ self ]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3001 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3002 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3003 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 3004 |
! |
3005 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3006 |
blueFromColor:aColor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3007 |
"helper used to access a color as a row in the dataSet view" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3008 |
|
930 | 3009 |
aColor isNil ifTrue:[^ 'none']. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3010 |
^ aColor blueByte ? 'mask' |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3011 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3012 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 3013 |
"Modified: / 31.7.1998 / 01:11:18 / cg" |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3014 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3015 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3016 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3017 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3018 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3019 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3020 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3021 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3022 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3023 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3024 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3025 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3026 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3027 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3028 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3029 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3030 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3031 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3032 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3033 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3034 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3035 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3036 |
|
942 | 3037 |
greenAtColor:aColor put:newGreen |
3038 |
"helper used to return a new row element, when green is changed" |
|
3039 |
||
3040 |
|byte| |
|
3041 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3042 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3043 |
byte := newGreen clampBetween:0 and:255. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3044 |
byte = aColor greenByte ifTrue:[^ self]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3045 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3046 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3047 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 3048 |
! |
3049 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3050 |
greenFromColor:aColor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3051 |
"helper used to access a color as a row in the dataSet view" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3052 |
|
930 | 3053 |
aColor isNil ifTrue:[^ 'none']. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3054 |
^ aColor greenByte ? 'mask' |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3055 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3056 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 3057 |
"Modified: / 31.7.1998 / 01:11:31 / cg" |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3058 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3059 |
|
942 | 3060 |
redAtColor:aColor put:newRed |
3061 |
"helper used to return a new row element, when red is changed" |
|
3062 |
||
3063 |
|byte| |
|
3064 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3065 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3066 |
byte := newRed clampBetween:0 and:255. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3067 |
byte = aColor redByte ifTrue:[^ self]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3068 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3069 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3070 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 3071 |
! |
3072 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3073 |
redFromColor:aColor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3074 |
"helper used to access a color as a row in the dataSet view" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3075 |
|
930 | 3076 |
aColor isNil ifTrue:[^ 'none']. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3077 |
^ aColor redByte ? 'mask' |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3078 |
|
930 | 3079 |
"Modified: / 31.7.1998 / 01:11:35 / cg" |
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3080 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3081 |
|
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3082 |
theColorItSelf:aColor |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3083 |
^ aColor |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3084 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3085 |
|
672 | 3086 |
!ImageEditor methodsFor:'help'! |
3087 |
||
3088 |
defaultInfoLabel |
|
767 | 3089 |
"returns the default info label" |
672 | 3090 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3091 |
|resourceClass| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3092 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3093 |
resourceClass := imageEditView resourceClass. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3094 |
(resourceClass isSymbol and: [(Smalltalk at:resourceClass) isClass]) |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3095 |
ifTrue:[ |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3096 |
^ resourceClass, ' >> ', imageEditView resourceSelector |
672 | 3097 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3098 |
^ 'No class and selector defined.' |
674 | 3099 |
! |
3100 |
||
702 | 3101 |
openDocumentation |
767 | 3102 |
"opens the documentation file of the Image Editor" |
674 | 3103 |
|
763 | 3104 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
3105 |
||
672 | 3106 |
! ! |
3107 |
||
767 | 3108 |
!ImageEditor methodsFor:'loading'! |
3109 |
||
3110 |
loadFromFile: aFileName |
|
3111 |
"loads an image from aFileName and sets up color map list and other info labels" |
|
3112 |
||
960 | 3113 |
|img| |
3114 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3115 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3116 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3117 |
(img := self image) notNil ifTrue:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3118 |
img colorMap notNil ifTrue:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3119 |
self listOfColors contents:(img usedColors asSet asOrderedCollection). |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3120 |
] ifFalse:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3121 |
self listOfColors removeAll. |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3122 |
]. |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3123 |
self findColorMapMode. |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3124 |
self updateLabelsAndHistory. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3125 |
img := img onDevice:device. |
1057 | 3126 |
imageEditView image:img. |
960 | 3127 |
] ifFalse:[ |
1054 | 3128 |
self updateForNoImage |
1057 | 3129 |
]. |
767 | 3130 |
] |
3131 |
] |
|
960 | 3132 |
|
1057 | 3133 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 3134 |
! |
3135 |
||
960 | 3136 |
loadFromImage:anImage |
767 | 3137 |
"loads an image from anImage and sets up color map list and other info labels" |
3138 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3139 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3140 |
|
1057 | 3141 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3142 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3143 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3144 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3145 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
3146 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3147 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3148 |
img notNil ifTrue:[ |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3149 |
img colorMap notNil ifTrue:[ |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3150 |
self listOfColors contents:(img usedColors asSet asOrderedCollection). |
960 | 3151 |
] ifFalse:[ |
767 | 3152 |
self listOfColors removeAll. |
3153 |
]. |
|
3154 |
self findColorMapMode. |
|
3155 |
self updateLabelsAndHistory. |
|
960 | 3156 |
] ifFalse:[ |
1054 | 3157 |
self updateForNoImage |
767 | 3158 |
] |
960 | 3159 |
|
1057 | 3160 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 3161 |
! |
3162 |
||
3163 |
loadFromMessage: aMessage |
|
3164 |
"loads an image by evaluating aMessage and sets up color map list and other info labels" |
|
3165 |
||
960 | 3166 |
|img| |
3167 |
||
3168 |
(imageEditView loadFromMessage: aMessage) notNil ifTrue:[ |
|
3169 |
(img := self image) notNil ifTrue:[ |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3170 |
img := img onDevice:device. |
960 | 3171 |
self listOfColors contents:(img usedColors asSet asOrderedCollection). |
767 | 3172 |
self findColorMapMode. |
3173 |
self updateLabelsAndHistory. |
|
1769
8782d5b6dc24
modified flag after edit operations
Claus Gittinger <cg@exept.de>
parents:
1764
diff
changeset
|
3174 |
"/ imageEditView image:img. |
960 | 3175 |
] ifFalse:[ |
1054 | 3176 |
self updateForNoImage |
767 | 3177 |
] |
3178 |
] |
|
960 | 3179 |
|
1057 | 3180 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
767 | 3181 |
! |
3182 |
||
3183 |
loadFromOrPrepareForMessage: aMessage |
|
3184 |
"loads an image by evaluating aMessage; |
|
3185 |
if no image could extract from aMessage; do set the class and the selector from |
|
3186 |
the aMessage for a saving at the end of editing" |
|
3187 |
||
911 | 3188 |
(imageEditView loadFromMessage: aMessage) notNil |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3189 |
ifTrue: [ |
767 | 3190 |
self listOfColors contents: self image usedColors asSet asOrderedCollection. |
3191 |
self findColorMapMode. |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3192 |
] ifFalse: [ |
911 | 3193 |
imageEditView resourceMessage: aMessage. |
767 | 3194 |
]. |
3195 |
self updateLabelsAndHistory. |
|
1057 | 3196 |
|
3197 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 3198 |
! ! |
3199 |
||
400 | 3200 |
!ImageEditor methodsFor:'menu modes'! |
3201 |
||
975 | 3202 |
colorMapMode |
3203 |
"returns colorMapMode" |
|
400 | 3204 |
|
975 | 3205 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 3206 |
|
975 | 3207 |
^colorMapMode |
400 | 3208 |
! |
3209 |
||
975 | 3210 |
editMode |
3211 |
"returns editMode" |
|
400 | 3212 |
|
1054 | 3213 |
editMode isNil ifTrue: [ |
975 | 3214 |
editMode := #point asValue. |
1329 | 3215 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 3216 |
]. |
3217 |
||
3218 |
^editMode |
|
400 | 3219 |
! |
3220 |
||
975 | 3221 |
mouseKeyColorMode |
3222 |
"returns mouseKeyColorMode" |
|
400 | 3223 |
|
1345 | 3224 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 3225 |
mouseKeyColorMode := 1 asValue. |
1345 | 3226 |
mouseKeyColorMode onChangeEvaluate: [ |
3227 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
3228 |
self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor). |
|
3229 |
] |
|
956 | 3230 |
]. |
400 | 3231 |
|
975 | 3232 |
^mouseKeyColorMode |
1345 | 3233 |
|
3234 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 3235 |
! ! |
3236 |
||
1558 | 3237 |
!ImageEditor methodsFor:'private'! |
3238 |
||
1598 | 3239 |
updateImage |
3240 |
|img| |
|
3241 |
||
3242 |
img := imageEditView image. |
|
3243 |
imageEditView image:img. |
|
3244 |
self fetchImageData. |
|
3245 |
! |
|
3246 |
||
1558 | 3247 |
updateImagePreView |
3248 |
self tileModeHolder value ifTrue:[ |
|
3249 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
3250 |
] |
|
3251 |
! ! |
|
3252 |
||
535 | 3253 |
!ImageEditor methodsFor:'queries'! |
3254 |
||
960 | 3255 |
hasMask |
1556 | 3256 |
^ colorMapMode value notNil and:[colorMapMode value endsWith:'mask'] |
960 | 3257 |
|
3258 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
3259 |
! |
|
3260 |
||
535 | 3261 |
preferredExtent |
767 | 3262 |
"returns the preferred extent" |
535 | 3263 |
|
3264 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
|
3265 |
||
3266 |
||
3267 |
! ! |
|
3268 |
||
400 | 3269 |
!ImageEditor methodsFor:'selection'! |
3270 |
||
3271 |
magnification |
|
767 | 3272 |
"returns the magnification of the image" |
400 | 3273 |
|
911 | 3274 |
self imageEditView isNil ifTrue: [^1]. |
3275 |
^imageEditView magnification x |
|
400 | 3276 |
! |
3277 |
||
3278 |
magnification: aValue |
|
767 | 3279 |
"sets the magnification of the image" |
400 | 3280 |
|
905 | 3281 |
|magnification| |
3282 |
magnification := (aValue ? 1) asPoint. |
|
911 | 3283 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
3284 |
imageEditView magnification: magnification |
|
400 | 3285 |
! |
3286 |
||
3287 |
selectedColorIndex |
|
767 | 3288 |
"returns the index of the selected color" |
400 | 3289 |
|
3290 |
^selectedColorIndex |
|
3291 |
! |
|
3292 |
||
3293 |
selectedColorIndex: anIndex |
|
767 | 3294 |
"sets the index of the selected color" |
400 | 3295 |
|
1054 | 3296 |
|clr pixel| |
3297 |
||
3298 |
selectedColorIndex := anIndex. |
|
3299 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
|
3300 |
clr isNil ifTrue:[^ self]. |
|
3301 |
||
1075 | 3302 |
pixel := anIndex - 1. |
1054 | 3303 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
3304 |
anIndex == 1 ifTrue:[ |
|
3305 |
pixel := nil. "/ mask |
|
3306 |
] ifFalse:[ |
|
1075 | 3307 |
pixel := pixel - 1 |
1054 | 3308 |
] |
3309 |
]. |
|
3310 |
imageEditView selectedColorIndex:pixel. |
|
3311 |
imageEditView selectedColor:clr. |
|
400 | 3312 |
|
3313 |
! ! |
|
3314 |
||
1716 | 3315 |
!ImageEditor methodsFor:'startup & release'! |
400 | 3316 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3317 |
closeDownViews |
1644 | 3318 |
builder notNil ifTrue:[ |
3319 |
DefaultRelativeSizes := |
|
3320 |
Array |
|
3321 |
with:(builder componentAt:#horizontalPanel) relativeCorners |
|
3322 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
|
3323 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3324 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3325 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3326 |
|
400 | 3327 |
closeRequest |
767 | 3328 |
"close request" |
400 | 3329 |
|
911 | 3330 |
imageEditView checkModified ifTrue:[super closeRequest] |
400 | 3331 |
|
3332 |
! |
|
3333 |
||
3334 |
open |
|
767 | 3335 |
"after opening, sets the masterApplication of the imageEditView to self" |
400 | 3336 |
|
3337 |
super open. |
|
444 | 3338 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3339 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
400 | 3340 |
! |
3341 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3342 |
postBuildWith:aBuilder |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3343 |
super postBuildWith:aBuilder. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3344 |
|
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3345 |
DefaultRelativeSizes notNil ifTrue:[ |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3346 |
(aBuilder componentAt:#horizontalPanel) relativeCorners:DefaultRelativeSizes first. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3347 |
(aBuilder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3348 |
]. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3349 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3350 |
|
400 | 3351 |
postOpenWith:aBuilder |
767 | 3352 |
"after opening, sets the masterApplication of the imageEditView to self; |
3353 |
evaluate the postOpenAction" |
|
400 | 3354 |
|
1124 | 3355 |
imageEditView undoImages addDependent:self. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3356 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3357 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
1345 | 3358 |
imageEditView clickInfoCallBack:[:button :point | |
3359 |
|mouseButtonColorToolBar| |
|
3360 |
||
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3361 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
1345 | 3362 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
3363 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
3364 |
]. |
|
3365 |
imageEditView addDependent:self. |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3366 |
|
400 | 3367 |
postOpenAction notNil ifTrue: [postOpenAction value]. |
3368 |
||
1250 | 3369 |
super postOpenWith:aBuilder. |
3370 |
||
3371 |
aBuilder keyboardProcessor menuBar:nil. |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3372 |
|
1345 | 3373 |
"Modified: / 10.2.2000 / 23:17:43 / cg" |
400 | 3374 |
! ! |
3375 |
||
1715 | 3376 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3377 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3378 |
addColorToColormap |
1682 | 3379 |
self addColorToColormap:(Color black) |
3380 |
! |
|
3381 |
||
3382 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3383 |
|depth img cMap newColorMap newImage oldCListSize newMode listOfColors| |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3384 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3385 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3386 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3387 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3388 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3389 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3390 |
|
1054 | 3391 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3392 |
cMap := img colorMap. |
1054 | 3393 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3394 |
drawingColormap isNil ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3395 |
self information:'Image has no colormap.\The shown colorMap is for drawing only.' withCRs. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3396 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3397 |
]. |
1682 | 3398 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3399 |
self listOfColors contents:drawingColormap. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3400 |
self selectionOfColor value:(drawingColormap size). |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3401 |
|
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3402 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 3403 |
^ self |
3404 |
]. |
|
3405 |
||
1583 | 3406 |
("(depth == 1)" false |
1054 | 3407 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
3408 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3409 |
self warn:'No space for more colors in colormap.'. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3410 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3411 |
]. |
1054 | 3412 |
(self confirm:'No space for more colors in colormap.\Change depth first.' withCRs) |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3413 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3414 |
^ self |
1057 | 3415 |
]. |
3416 |
||
3417 |
imageEditView makeUndo. |
|
3418 |
newMode := (depth*2) printString , (colorMapMode value copyFrom:2). |
|
3419 |
self colorMapMode:newMode. |
|
3420 |
] ifFalse:[ |
|
3421 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3422 |
]. |
1054 | 3423 |
|
3424 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3425 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3426 |
oldCListSize := listOfColors size. |
1054 | 3427 |
|
3428 |
"/ (colorMapMode value asString endsWith:'mask') ifTrue:[ |
|
3429 |
"/ cMap last = Color noColor ifTrue:[ |
|
3430 |
"/ cMap := cMap copyWithoutLast:1 |
|
3431 |
"/ ] ifFalse:[ |
|
3432 |
"/ cMap first = Color noColor ifTrue:[ |
|
3433 |
"/ cMap := cMap copyFrom:2 |
|
3434 |
"/ ] |
|
3435 |
"/ ]. |
|
3436 |
"/ ]. |
|
3437 |
"/ |
|
3438 |
||
1682 | 3439 |
newColorMap := cMap copyWith:newColor. |
1054 | 3440 |
|
3441 |
newImage := img species new |
|
3442 |
width:img width |
|
3443 |
height:img height |
|
3444 |
depth:depth |
|
3445 |
fromArray:img bits. |
|
3446 |
||
3447 |
newImage colorMap:newColorMap. |
|
3448 |
newImage fileName:img fileName. |
|
3449 |
newImage mask:(img mask copy). |
|
3450 |
||
3451 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3452 |
listOfColors contents: newImage colorMap. |
1054 | 3453 |
self findColorMapMode. |
3454 |
"/ mhmh - somehow, we get two colors added ... (sigh findColorMapMode adds another one ...) |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3455 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3456 |
listOfColors removeLast |
1054 | 3457 |
]. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3458 |
self selectionOfColor value:(listOfColors size). |
1054 | 3459 |
self updateLabelsAndHistory. |
3460 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3461 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3462 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 3463 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3464 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3465 |
|
1650 | 3466 |
changeHLS |
3467 |
"interactive Hue/Light/Saturation editing" |
|
3468 |
||
3469 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1652 | 3470 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema| |
3471 |
||
1741 | 3472 |
"/ compute the averageColor in the background (while asking user) |
1652 | 3473 |
readySema := Semaphore new. |
3474 |
[ |
|
3475 |
originalColormap := imageEditView image colorMap copy. |
|
3476 |
avgColor := imageEditView image averageColor. |
|
3477 |
readySema signal. |
|
3478 |
] forkAt:7. |
|
1649 | 3479 |
|
3480 |
acceptChannel := TriggerValue new. |
|
1652 | 3481 |
avgColorHolder := avgColor asValue. |
1649 | 3482 |
|
3483 |
firstChange := true. |
|
3484 |
||
1651 | 3485 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
3486 |
Color |
|
3487 |
hue:((clr hue) ? 0 + hShift) |
|
3488 |
light:((clr light * lFactor / 100) min:100) |
|
3489 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
1652 | 3490 |
|
1649 | 3491 |
shiftAction := |
3492 |
[ |
|
1650 | 3493 |
|hShift lFactor sFactor| |
3494 |
||
1649 | 3495 |
acceptChannel value:true. |
3496 |
||
3497 |
firstChange ifTrue:[ |
|
3498 |
imageEditView makeUndo. |
|
3499 |
firstChange := false. |
|
3500 |
]. |
|
1652 | 3501 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 3502 |
|
3503 |
hShift := hueShift value. |
|
3504 |
lFactor := lightValue value. |
|
3505 |
sFactor := saturationValue value. |
|
3506 |
||
1652 | 3507 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
3508 |
||
3509 |
shiftProcess notNil ifTrue:[ |
|
3510 |
shiftProcess terminate. |
|
3511 |
shiftProcess waitUntilTerminated. |
|
3512 |
shiftProcess := nil. |
|
3513 |
]. |
|
3514 |
shiftProcess := |
|
3515 |
[ |
|
3516 |
[ |
|
1656 | 3517 |
imageEditView image |
3518 |
colorMap:originalColormap copy; |
|
3519 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
1652 | 3520 |
self updateImage. |
3521 |
self updateInfoLabel. |
|
3522 |
] ensure:[ shiftProcess := nil ]. |
|
3523 |
] forkAt:7. |
|
1649 | 3524 |
]. |
3525 |
||
3526 |
bindings := IdentityDictionary new. |
|
1650 | 3527 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 3528 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 3529 |
|
3530 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 3531 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 3532 |
|
3533 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 3534 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 3535 |
|
1649 | 3536 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 3537 |
bindings at:#hlsColor put:avgColorHolder. |
1650 | 3538 |
|
3539 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 3540 |
ifFalse:[ |
3541 |
firstChange ~~ true ifTrue:[ |
|
3542 |
imageEditView undo |
|
3543 |
] |
|
3544 |
]. |
|
1741 | 3545 |
self updateImage |
1649 | 3546 |
! |
3547 |
||
1403 | 3548 |
clearMaskedPixels |
3549 |
"clear all masked pixels (to pixelValue 0)" |
|
3550 |
||
1460 | 3551 |
|newImage oldImage| |
1403 | 3552 |
|
3553 |
oldImage := self image. |
|
3554 |
||
3555 |
imageEditView makeUndo. |
|
3556 |
||
3557 |
self withExecuteCursorDo:[ |
|
3558 |
newImage := oldImage clearMaskedPixels. |
|
1460 | 3559 |
0 to:newImage height - 1 do:[:y | |
3560 |
0 to:newImage width - 1 do:[:x | |
|
3561 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
3562 |
newImage pixelAtX:x y:y put:0 |
|
3563 |
] |
|
3564 |
] |
|
3565 |
]. |
|
3566 |
||
1403 | 3567 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 3568 |
self fetchImageData. |
1403 | 3569 |
] |
3570 |
] |
|
3571 |
! |
|
3572 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3573 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3574 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3575 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3576 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3577 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3578 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3579 |
self imageEditView invalidate. |
960 | 3580 |
self imagePreView invalidate. |
3581 |
||
3582 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
3583 |
"/ self updateLabelsAndHistory. |
|
3584 |
"/ self imagePreView image:img |
|
3585 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3586 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3587 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 3588 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3589 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3590 |
|
975 | 3591 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3592 |
"calculates a new color map for the image from aMode" |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3593 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3594 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3595 |
oldImage image newColors realColorMap oldFileName |
1008 | 3596 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
3597 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3598 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3599 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3600 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3601 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3602 |
prevMode := colorMapMode value. |
1008 | 3603 |
oldImage depth > 8 ifTrue:[ |
3604 |
prevMode := nil |
|
3605 |
]. |
|
3606 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3607 |
newColorMap := self class listOfColorMaps at:aMode. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3608 |
depth := (newColorMap size log: 2) asInteger. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3609 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3610 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3611 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3612 |
quest := 'Keep colormap (or use standard B&W)' |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3613 |
] ifFalse:[ |
1008 | 3614 |
prevMode isNil ifTrue:[ |
3615 |
quest := 'Compute colormap (or use standard)' |
|
3616 |
] ifFalse:[ |
|
3617 |
quest := 'Keep colormap (or use standard)' |
|
3618 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3619 |
]. |
1008 | 3620 |
((prevMode = aMode) |
1057 | 3621 |
or:[depth > oldImage depth |
3622 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1008 | 3623 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3624 |
"/ keep the colormap |
1008 | 3625 |
newColorMap atAllPut:Color black. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3626 |
depth > oldImage depth ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3627 |
"/ easy - simply copy the part |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3628 |
numColors := 1 bitShift:oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3629 |
0 to:numColors-1 do:[:pixel | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3630 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3631 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3632 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3633 |
"/ see if all used color fit the new colormap |
986 | 3634 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
1403 | 3635 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
3636 |
usedColors := oldImage realUsedColors |
|
3637 |
]. |
|
986 | 3638 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3639 |
"/ yea - just install them |
986 | 3640 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3641 |
newColorMap at:idx put:clr |
1008 | 3642 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3643 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3644 |
"/ copy over those that are most often used. |
986 | 3645 |
oldImage depth < 8 ifTrue:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3646 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3647 |
oldImage bits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3648 |
expandPixels:(oldImage depth) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3649 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3650 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3651 |
into:tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3652 |
mapping:nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3653 |
] ifFalse:[ |
986 | 3654 |
oldImage depth == 8 ifTrue:[ |
3655 |
tmpBits := oldImage bits |
|
3656 |
] ifFalse:[ |
|
1124 | 3657 |
colorMapMode value:prevMode. |
1471 | 3658 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
986 | 3659 |
^ self |
1471 | 3660 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
3661 |
"/ ifFalse:[. |
|
3662 |
"/ ^ self |
|
3663 |
"/ ]. |
|
3664 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
3665 |
"/ ^ self. |
|
986 | 3666 |
] |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3667 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3668 |
usageCounts := tmpBits usageCounts. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3669 |
tmpMap := Array new:usageCounts size. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3670 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3671 |
tmpMap at:i put:clr |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3672 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3673 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3674 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3675 |
1 to:(1 bitShift:depth) do:[:idx | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3676 |
newColorMap at:idx put:(tmpMap at:idx) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3677 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3678 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3679 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3680 |
confirmWithCancel:(resources |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3681 |
string:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3682 |
with:usedColors size |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3683 |
with:(1 bitShift:depth)) withCRs |
1542 | 3684 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3685 |
useNearest isNil ifTrue:[ |
1542 | 3686 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3687 |
^ self "/ cancel |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3688 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3689 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3690 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3691 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3692 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3693 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3694 |
(usedColors conform:[:clr | newColorMap includes:clr]) ifFalse:[ |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3695 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3696 |
confirmWithCancel:(resources |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3697 |
string:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3698 |
) withCRs |
1542 | 3699 |
labels:(resources string:#('Cancel' 'First' 'Nearest')). |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3700 |
useNearest isNil ifTrue:[ |
1542 | 3701 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3702 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3703 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3704 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3705 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3706 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3707 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3708 |
|
1424
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
3709 |
newImage := Image newForDepth:depth. |
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
3710 |
newImage depth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3711 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3712 |
|
1008 | 3713 |
Image imageErrorSignal handle:[:ex| |
3714 |
Color colorErrorSignal handle:[:ex| |
|
1542 | 3715 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3716 |
imageEditView undo. |
1008 | 3717 |
^ self warn:(resources string:'Conversion failed !!') |
3718 |
] do:[ |
|
1393 | 3719 |
newImage := Image newForDepth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3720 |
newImage width:oldImage width height:oldImage height depth:depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3721 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3722 |
newImage photometric:#palette. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3723 |
newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3724 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3725 |
oldImage colorsFromX:0 y:0 toX:(oldImage width-1) y:(oldImage height-1) do: |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3726 |
[:x :y :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3727 |
|newColor| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3728 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3729 |
(newColorMap includes:clr) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3730 |
ifTrue: [newColor := clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3731 |
ifFalse: [ |
1008 | 3732 |
newColor := clr nearestIn:newColorMap. |
3733 |
useNearest ifFalse:[ |
|
3734 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
3735 |
newColor := oldImage colorFromValue:0 |
|
3736 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3737 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3738 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3739 |
newImage colorAtX:x y:y put:newColor. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3740 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3741 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3742 |
]. |
1008 | 3743 |
] do:[ |
3744 |
image := newImage fromImage:oldImage |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3745 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3746 |
|
1008 | 3747 |
(aMode asString endsWith:'mask') ifTrue:[ |
3748 |
image mask isNil ifTrue:[ |
|
1776 | 3749 |
(Dialog confirm:'Generate mask from black ?' default:false) ifTrue:[ |
1008 | 3750 |
maskThreshold := 0.1. |
3751 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
3752 |
] ifFalse:[ |
|
3753 |
maskImage := Depth1Image extent:image extent. |
|
1770 | 3754 |
maskImage bits:(ByteArray |
1008 | 3755 |
new:(maskImage bytesPerRow * maskImage height) |
3756 |
withAll:16rFF). |
|
3757 |
||
3758 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
3759 |
]. |
|
3760 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3761 |
]. |
1008 | 3762 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3763 |
image mask: nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3764 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3765 |
realColorMap := OrderedCollection new. |
1054 | 3766 |
image realColorMap do:[:clr| |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3767 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3768 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3769 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
1054 | 3770 |
newColorMap do:[:clr| |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3771 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
1054 | 3772 |
ifTrue:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3773 |
newColors add: clr |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3774 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3775 |
]. |
975 | 3776 |
image colorMap: newColors. |
1446 | 3777 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3778 |
|
1054 | 3779 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 3780 |
self fetchImageData. |
3781 |
"/ self listOfColors contents: image colorMap. |
|
3782 |
"/ self findColorMapMode. |
|
3783 |
"/ self updateLabelsAndHistory. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3784 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3785 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3786 |
|
1057 | 3787 |
"Modified: / 16.3.1999 / 21:55:39 / cg" |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3788 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3789 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3790 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3791 |
"calculates a new color map for the image, using only used colors" |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3792 |
|
927 | 3793 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3794 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3795 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3796 |
depth := oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3797 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3798 |
oldImage photometric ~~ #palette ifTrue:[ |
930 | 3799 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3800 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3801 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3802 |
|
1403 | 3803 |
usedColors := oldImage realUsedColors. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3804 |
usedColors size == (1 bitShift:depth) ifTrue:[ |
930 | 3805 |
self information:'Compress colorMap: All colors are used - no compression.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3806 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3807 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3808 |
usedColors size == oldImage colorMap size ifTrue:[ |
930 | 3809 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3810 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3811 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3812 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3813 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3814 |
|
930 | 3815 |
self information:('Compress colorMap: %1 colors used.' bindWith:usedColors size). |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3816 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3817 |
self withExecuteCursorDo:[ |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3818 |
"/ newColorMap := Array new:usedColors size. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3819 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3820 |
"/ translation table |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3821 |
oldToNew := ByteArray new:(1 bitShift:depth). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3822 |
newColorMap := usedColors asArray. |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3823 |
newColorMap sort:[:a :b | |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3824 |
a redByte == b redByte ifTrue:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3825 |
a greenByte == b greenByte ifTrue:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3826 |
a blueByte < b blueByte |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3827 |
] ifFalse:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3828 |
a greenByte < b greenByte |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3829 |
] |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3830 |
] ifFalse:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3831 |
a redByte < b redByte |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3832 |
] |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3833 |
]. |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3834 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3835 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3836 |
|newPixel| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3837 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3838 |
(usedColors includes:clr) ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3839 |
newPixel := newColorMap indexOf:clr. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3840 |
oldToNew at:oldIdx put:newPixel-1. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3841 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3842 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3843 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3844 |
oldBits := oldImage bits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3845 |
newBits := ByteArray new:(oldBits size). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3846 |
depth ~~ 8 ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3847 |
"/ expand/compress can only handle 8bits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3848 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3849 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3850 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3851 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3852 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3853 |
into:tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3854 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3855 |
tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3856 |
compressPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3857 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3858 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3859 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3860 |
mapping:nil |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3861 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3862 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3863 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3864 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3865 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3866 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3867 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3868 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3869 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3870 |
newImage := oldImage species new |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3871 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3872 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3873 |
depth:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3874 |
fromArray:newBits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3875 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3876 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3877 |
newImage fileName:oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3878 |
newImage mask:(oldImage mask copy). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3879 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3880 |
(imageEditView image:newImage) notNil ifTrue: |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3881 |
[ |
1446 | 3882 |
self fetchImageData. |
3883 |
"/ self listOfColors contents: newImage colorMap. |
|
3884 |
"/ self findColorMapMode. |
|
3885 |
"/ self updateLabelsAndHistory. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3886 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3887 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3888 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3889 |
"Created: / 28.7.1998 / 20:03:11 / cg" |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3890 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
1008 | 3891 |
! |
3892 |
||
1480 | 3893 |
copyMask |
3894 |
|mask| |
|
3895 |
||
3896 |
mask := self image mask. |
|
3897 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
3898 |
! |
|
3899 |
||
1446 | 3900 |
fetchImageData |
1460 | 3901 |
|image| |
3902 |
||
3903 |
(image := imageEditView image) notNil ifTrue:[ |
|
3904 |
self listOfColors contents:(image colorMap). |
|
3905 |
self findColorMapMode. |
|
3906 |
self updateLabelsAndHistory. |
|
3907 |
] |
|
1446 | 3908 |
! |
3909 |
||
1544 | 3910 |
inspectColor |
1682 | 3911 |
|clrIndex| |
3912 |
||
3913 |
clrIndex := self selectedColorIndexOrNil. |
|
3914 |
clrIndex isNil ifTrue:[ |
|
1544 | 3915 |
^ self |
3916 |
]. |
|
1682 | 3917 |
(self image colorFromValue:clrIndex-1) inspect |
1544 | 3918 |
! |
3919 |
||
1598 | 3920 |
makeBrighter |
3921 |
| anyChange| |
|
3922 |
||
3923 |
self withExecuteCursorDo:[ |
|
3924 |
anyChange := imageEditView makeBrighter. |
|
3925 |
anyChange ifFalse:[ |
|
3926 |
Dialog warn:'Image unchanged'. |
|
3927 |
] ifTrue:[ |
|
3928 |
self updateImage. |
|
3929 |
] |
|
3930 |
]. |
|
3931 |
! |
|
3932 |
||
3933 |
makeDarker |
|
3934 |
| anyChange| |
|
3935 |
||
3936 |
self withExecuteCursorDo:[ |
|
3937 |
anyChange := imageEditView makeDarker. |
|
3938 |
anyChange ifFalse:[ |
|
3939 |
Dialog warn:'Image unchanged'. |
|
3940 |
] ifTrue:[ |
|
3941 |
self updateImage. |
|
3942 |
] |
|
3943 |
]. |
|
3944 |
! |
|
3945 |
||
1436 | 3946 |
makeGrayScale |
1598 | 3947 |
|anyChange| |
1436 | 3948 |
|
3949 |
self withExecuteCursorDo:[ |
|
3950 |
anyChange := imageEditView makeGrayScale. |
|
3951 |
anyChange ifFalse:[ |
|
3952 |
Dialog warn:'Image unchanged'. |
|
3953 |
] ifTrue:[ |
|
1598 | 3954 |
self updateImage. |
3955 |
] |
|
3956 |
]. |
|
3957 |
! |
|
3958 |
||
3959 |
makeInverse |
|
3960 |
| anyChange| |
|
3961 |
||
3962 |
self withExecuteCursorDo:[ |
|
3963 |
anyChange := imageEditView makeInverse. |
|
3964 |
anyChange ifFalse:[ |
|
3965 |
Dialog warn:'Image unchanged'. |
|
3966 |
] ifTrue:[ |
|
3967 |
self updateImage. |
|
1436 | 3968 |
] |
3969 |
]. |
|
3970 |
! |
|
3971 |
||
1446 | 3972 |
makeSelectedColorBrighter |
1682 | 3973 |
self processSelectedColorWith:[:clr | clr lightened] |
1446 | 3974 |
! |
3975 |
||
3976 |
makeSelectedColorDarker |
|
1682 | 3977 |
self processSelectedColorWith:[:clr | clr darkened] |
1446 | 3978 |
! |
3979 |
||
1480 | 3980 |
pasteMask |
3981 |
|img mask| |
|
3982 |
||
3983 |
imageEditView makeUndo. |
|
3984 |
||
3985 |
img := self image. |
|
3986 |
mask := img mask. |
|
3987 |
||
3988 |
mask |
|
3989 |
copyFrom:MaskClipboard |
|
3990 |
x:0 y:0 |
|
3991 |
toX:0 y:0 |
|
3992 |
width:(mask width min:MaskClipboard width) |
|
3993 |
height:(mask height min:MaskClipboard height). |
|
3994 |
img mask:mask. |
|
3995 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
3996 |
self fetchImageData. |
|
3997 |
] |
|
3998 |
! |
|
3999 |
||
1682 | 4000 |
pickAndAddColorToColormap |
4001 |
self addColorToColormap:(Color fromUser) |
|
4002 |
! |
|
4003 |
||
4004 |
processSelectedColorWith:aBlock |
|
4005 |
|img cMap clr newImage selectedColorIndex oldSelection| |
|
4006 |
||
4007 |
selectedColorIndex := self selectedColorIndexOrNil. |
|
4008 |
selectedColorIndex isNil ifTrue:[^ self]. |
|
4009 |
||
4010 |
img := self image. |
|
4011 |
cMap := img colorMap. |
|
4012 |
cMap isNil ifTrue:[ |
|
4013 |
self warn:'Image has no colormap\change colorMap mode first.' withCRs. |
|
4014 |
^ self |
|
4015 |
]. |
|
4016 |
imageEditView makeUndo. |
|
4017 |
||
4018 |
cMap := cMap asArray. |
|
4019 |
clr := cMap at:selectedColorIndex. |
|
4020 |
cMap at:selectedColorIndex put:(aBlock value:clr). |
|
4021 |
||
4022 |
newImage := img species new |
|
4023 |
width:img width |
|
4024 |
height:img height |
|
1843 | 4025 |
depth:img depth |
1682 | 4026 |
fromArray:img bits. |
4027 |
||
4028 |
newImage colorMap:cMap. |
|
4029 |
newImage fileName:img fileName. |
|
4030 |
newImage mask:(img mask copy). |
|
4031 |
||
4032 |
oldSelection := self selectionOfColor value. |
|
4033 |
||
4034 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
4035 |
self fetchImageData. |
|
4036 |
"/ self listOfColors contents: newImage colorMap. |
|
4037 |
"/ self findColorMapMode. |
|
4038 |
"/ self updateLabelsAndHistory. |
|
4039 |
]. |
|
4040 |
self selectionOfColor value:oldSelection. |
|
4041 |
||
4042 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
|
4043 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
|
4044 |
! |
|
4045 |
||
1124 | 4046 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4047 |
|s n anyChange img usedColors| |
1124 | 4048 |
|
4049 |
s := Dialog request:'Number of color bits to strip (1-7) ?'. |
|
1435 | 4050 |
s size == 0 ifTrue:[^ self]. |
1124 | 4051 |
n := Integer readFrom:s onError:0. |
4052 |
(n between:1 and:7) ifFalse:[ |
|
4053 |
Dialog warn:'Image unchanged'. |
|
4054 |
^ self |
|
4055 |
]. |
|
4056 |
||
4057 |
self withExecuteCursorDo:[ |
|
4058 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
4059 |
anyChange ifFalse:[ |
|
4060 |
Dialog warn:'Image unchanged'. |
|
4061 |
] ifTrue:[ |
|
4062 |
img := imageEditView image. |
|
4063 |
imageEditView image:img. |
|
1446 | 4064 |
|
4065 |
self fetchImageData. |
|
4066 |
"/ self listOfColors contents:(img colorMap). |
|
4067 |
"/ self findColorMapMode. |
|
4068 |
"/ self updateLabelsAndHistory. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4069 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4070 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4071 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4072 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4073 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4074 |
] |
1124 | 4075 |
] |
4076 |
]. |
|
4077 |
! |
|
4078 |
||
1682 | 4079 |
selectedColorIndexOrNil |
4080 |
| img clrIndex| |
|
4081 |
||
4082 |
img := self image. |
|
4083 |
img isNil ifTrue:[ |
|
4084 |
self warn:'No Image.'. |
|
4085 |
^ nil |
|
4086 |
]. |
|
4087 |
clrIndex := self selectionOfColor value. |
|
4088 |
img mask notNil ifTrue: [ clrIndex := clrIndex - 1 ]. |
|
4089 |
^ clrIndex |
|
4090 |
! |
|
4091 |
||
1008 | 4092 |
sortColorMap |
4093 |
"calculates a new color map for the image, sorting colors" |
|
4094 |
||
4095 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
|
4096 |
||
4097 |
oldImage := self image. |
|
4098 |
depth := oldImage depth. |
|
4099 |
||
4100 |
oldImage photometric ~~ #palette ifTrue:[ |
|
4101 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
4102 |
^ self |
|
4103 |
]. |
|
4104 |
||
4105 |
usedColors := oldImage realColorMap. |
|
4106 |
||
4107 |
imageEditView makeUndo. |
|
4108 |
||
4109 |
self withExecuteCursorDo:[ |
|
4110 |
"/ newColorMap := Array new:usedColors size. |
|
4111 |
||
4112 |
"/ translation table |
|
4113 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
4114 |
newColorMap := usedColors asArray. |
|
4115 |
newColorMap sort:[:a :b | |
|
4116 |
a redByte == b redByte ifTrue:[ |
|
4117 |
a greenByte == b greenByte ifTrue:[ |
|
4118 |
a blueByte < b blueByte |
|
4119 |
] ifFalse:[ |
|
4120 |
a greenByte < b greenByte |
|
4121 |
] |
|
4122 |
] ifFalse:[ |
|
4123 |
a redByte < b redByte |
|
4124 |
] |
|
4125 |
]. |
|
4126 |
||
4127 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
4128 |
|newPixel| |
|
4129 |
||
4130 |
(usedColors includes:clr) ifTrue:[ |
|
4131 |
newPixel := newColorMap indexOf:clr. |
|
4132 |
oldToNew at:oldIdx put:newPixel-1. |
|
4133 |
] |
|
4134 |
]. |
|
4135 |
||
4136 |
oldBits := oldImage bits. |
|
4137 |
newBits := ByteArray new:(oldBits size). |
|
4138 |
depth ~~ 8 ifTrue:[ |
|
4139 |
"/ expand/compress can only handle 8bits |
|
4140 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4141 |
oldBits |
|
4142 |
expandPixels:depth |
|
4143 |
width:oldImage width |
|
4144 |
height:oldImage height |
|
4145 |
into:tmpBits |
|
4146 |
mapping:oldToNew. |
|
4147 |
tmpBits |
|
4148 |
compressPixels:depth |
|
4149 |
width:oldImage width |
|
4150 |
height:oldImage height |
|
4151 |
into:newBits |
|
4152 |
mapping:nil |
|
4153 |
] ifFalse:[ |
|
4154 |
oldBits |
|
4155 |
expandPixels:depth |
|
4156 |
width:oldImage width |
|
4157 |
height:oldImage height |
|
4158 |
into:newBits |
|
4159 |
mapping:oldToNew. |
|
4160 |
]. |
|
4161 |
||
4162 |
newImage := oldImage species new |
|
4163 |
width:oldImage width |
|
4164 |
height:oldImage height |
|
4165 |
depth:depth |
|
4166 |
fromArray:newBits. |
|
4167 |
||
4168 |
newImage colorMap:newColorMap. |
|
4169 |
newImage fileName:oldImage fileName. |
|
4170 |
newImage mask:(oldImage mask copy). |
|
4171 |
||
1054 | 4172 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 4173 |
self fetchImageData. |
4174 |
"/ self listOfColors contents: newImage colorMap. |
|
4175 |
"/ self findColorMapMode. |
|
4176 |
"/ self updateLabelsAndHistory. |
|
1008 | 4177 |
] |
4178 |
] |
|
4179 |
||
4180 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
4181 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4182 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4183 |
|
1715 | 4184 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 4185 |
|
767 | 4186 |
doBrowseClass |
4187 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 4188 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4189 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4190 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4191 |
cls := Smalltalk at:(imageEditView resourceClass) ifAbsent:nil. |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4192 |
cls isNil ifTrue:[^ self warn:'No Class specified']. |
1488 | 4193 |
UserPreferences systemBrowserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4194 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4195 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4196 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4197 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 4198 |
! |
4199 |
||
1703 | 4200 |
doCopyImageToClipboard |
4201 |
imageEditView copyImageToClipboard. |
|
4202 |
! |
|
4203 |
||
1045 | 4204 |
doCropAll |
986 | 4205 |
"find all borders and cut them off" |
4206 |
||
1045 | 4207 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 4208 |
self updateInfoLabel |
4209 |
||
4210 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4211 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
4212 |
! |
|
4213 |
||
1045 | 4214 |
doCropBottom |
986 | 4215 |
"find a bottom border and cut it off" |
4216 |
||
1045 | 4217 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 4218 |
self updateInfoLabel |
4219 |
||
4220 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
4221 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4222 |
! |
|
4223 |
||
1045 | 4224 |
doCropLeft |
986 | 4225 |
"find a left border and cut it off" |
4226 |
||
1045 | 4227 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 4228 |
self updateInfoLabel |
4229 |
||
4230 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4231 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
4232 |
! |
|
4233 |
||
1045 | 4234 |
doCropManual |
986 | 4235 |
"let user specify borders and cut them off" |
4236 |
||
1502 | 4237 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
4238 |
||
4239 |
acceptChannel := TriggerValue new. |
|
1490 | 4240 |
|
4241 |
firstChange := true. |
|
4242 |
||
1502 | 4243 |
gropAction := |
4244 |
[:lV :rV :tV :bV | |l r t b| |
|
4245 |
acceptChannel value:true. |
|
4246 |
||
4247 |
l := lV value. |
|
4248 |
r := rV value. |
|
4249 |
t := tV value. |
|
4250 |
b := bV value. |
|
4251 |
(l + r + t + b) == 0 ifTrue:[ |
|
4252 |
Screen current beep |
|
4253 |
] ifFalse:[ |
|
4254 |
img := imageEditView image. |
|
4255 |
firstChange ifTrue:[ |
|
4256 |
imageEditView makeUndo. |
|
4257 |
firstChange := false. |
|
4258 |
]. |
|
4259 |
imageEditView |
|
4260 |
makeSubImageX:l y:t |
|
4261 |
width:(img width - l - r) |
|
4262 |
height:(img height - t - b). |
|
4263 |
self updateInfoLabel |
|
4264 |
]. |
|
1490 | 4265 |
]. |
986 | 4266 |
|
4267 |
bindings := IdentityDictionary new. |
|
1507 | 4268 |
bindings at:#left put:(left := 1 asValue). |
4269 |
bindings at:#right put:(right := 1 asValue). |
|
4270 |
bindings at:#top put:(top := 1 asValue). |
|
4271 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 4272 |
bindings at:#acceptChannel put:acceptChannel. |
4273 |
||
4274 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
4275 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
4276 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
4277 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
4278 |
||
4279 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 4280 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4281 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 4282 |
ifFalse:[ |
4283 |
firstChange ~~ true ifTrue:[ |
|
1558 | 4284 |
imageEditView undo. |
4285 |
self updateImagePreView. |
|
1507 | 4286 |
] |
4287 |
]. |
|
986 | 4288 |
|
4289 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4290 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4291 |
! |
|
4292 |
||
1045 | 4293 |
doCropRight |
986 | 4294 |
"find a right border and cut it off" |
4295 |
||
1045 | 4296 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 4297 |
self updateInfoLabel |
4298 |
||
4299 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4300 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
4301 |
! |
|
4302 |
||
1045 | 4303 |
doCropTop |
986 | 4304 |
"find a top border and cut it off" |
4305 |
||
1045 | 4306 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 4307 |
self updateInfoLabel |
4308 |
||
4309 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
4310 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
4311 |
! |
|
4312 |
||
1433 | 4313 |
doEditMask |
4314 |
"" |
|
4315 |
||
4316 |
self image mask edit |
|
4317 |
! |
|
4318 |
||
767 | 4319 |
doFlipHorizontal |
4320 |
"flips horizontally current image" |
|
400 | 4321 |
|
911 | 4322 |
imageEditView flipHorizontal |
400 | 4323 |
! |
4324 |
||
767 | 4325 |
doFlipVertical |
4326 |
"flips vertically current image" |
|
400 | 4327 |
|
911 | 4328 |
imageEditView flipVertical |
400 | 4329 |
! |
4330 |
||
767 | 4331 |
doMagnifyDown |
4332 |
"magnifies current image one step down" |
|
400 | 4333 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4334 |
|magHolder mag| |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4335 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4336 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4337 |
(mag := magHolder value) > 1 ifTrue: [ |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4338 |
magHolder value: mag - 1 |
400 | 4339 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4340 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4341 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 4342 |
! |
4343 |
||
767 | 4344 |
doMagnifyImage |
1479 | 4345 |
"magnifies the current image to a new size" |
400 | 4346 |
|
1353 | 4347 |
|box newSize image| |
4348 |
||
4349 |
image := imageEditView image. |
|
4350 |
||
4351 |
box := EnterBox new. |
|
4352 |
box title:(resources string:'Images new size:'). |
|
4353 |
box okText:(resources string:'OK'). |
|
4354 |
box abortText:(resources string:'Cancel'). |
|
4355 |
box initialText:image extent printString. |
|
4356 |
box showAtPointer. |
|
4357 |
(box accepted |
|
4358 |
and: [(newSize := Object readFromString:(box contents) onError:nil) notNil]) |
|
4359 |
ifTrue:[ |
|
1479 | 4360 |
newSize isPoint ifFalse:[ |
4361 |
self warn:'please enter the new size as ''x @ y''.'. |
|
4362 |
^ self. |
|
4363 |
]. |
|
4364 |
imageEditView magnifyImageTo:newSize. |
|
4365 |
]. |
|
4366 |
||
4367 |
self updateInfoLabel |
|
4368 |
! |
|
4369 |
||
4370 |
doMagnifyImageBy |
|
4371 |
"magnifies the current image (by a scale)" |
|
4372 |
||
4373 |
|box oldSize newSize scale image| |
|
4374 |
||
4375 |
image := imageEditView image. |
|
4376 |
oldSize := image extent. |
|
4377 |
||
4378 |
box := EnterBox new. |
|
4379 |
box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
4380 |
box okText:(resources string:'OK'). |
|
4381 |
box abortText:(resources string:'Cancel'). |
|
4382 |
box initialText:1 printString. |
|
4383 |
box showAtPointer. |
|
4384 |
||
4385 |
(box accepted |
|
4386 |
and: [(scale := Object readFromString:(box contents) onError:nil) notNil]) |
|
4387 |
ifTrue:[ |
|
4388 |
scale isNumber ifFalse:[ |
|
4389 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
4390 |
^ self. |
|
4391 |
]. |
|
4392 |
newSize := oldSize * scale. |
|
1353 | 4393 |
imageEditView magnifyImageTo:newSize. |
4394 |
]. |
|
4395 |
||
400 | 4396 |
self updateInfoLabel |
4397 |
! |
|
4398 |
||
767 | 4399 |
doMagnifyUp |
4400 |
"magnifies current image one step up" |
|
400 | 4401 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4402 |
|magHolder mag| |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4403 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4404 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4405 |
(mag := magHolder value) < 99 ifTrue: [ |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4406 |
magHolder value: mag + 1 |
400 | 4407 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4408 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4409 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 4410 |
! |
4411 |
||
767 | 4412 |
doNegativeImage |
4413 |
"negates current image by negating the color map" |
|
400 | 4414 |
|
1598 | 4415 |
self image depth ~~ 1 ifTrue:[ |
4416 |
Dialog warn:'Only useful for depth 1 images'. |
|
4417 |
^ self |
|
4418 |
]. |
|
911 | 4419 |
imageEditView negativeImage. |
400 | 4420 |
self listOfColors removeAll. |
901 | 4421 |
self findColorMapMode. |
911 | 4422 |
imageEditView undoImages removeLast |
400 | 4423 |
! |
4424 |
||
767 | 4425 |
doResizeImage |
1353 | 4426 |
"resizes the current image" |
4427 |
||
4428 |
|box newSize image| |
|
4429 |
||
4430 |
image := imageEditView image. |
|
4431 |
||
4432 |
box := EnterBox new. |
|
4433 |
box title:(resources string:'Images new size:'). |
|
4434 |
box okText:(resources string:'OK'). |
|
4435 |
box abortText:(resources string:'Cancel'). |
|
4436 |
box initialText:image extent printString. |
|
4437 |
box showAtPointer. |
|
4438 |
(box accepted |
|
4439 |
and: [(newSize := Object readFromString:(box contents) onError:nil) notNil]) |
|
4440 |
ifTrue:[ |
|
4441 |
imageEditView resizeImageTo:newSize. |
|
4442 |
]. |
|
400 | 4443 |
! |
4444 |
||
767 | 4445 |
doRotateImage |
4446 |
"rotates current image" |
|
400 | 4447 |
|
1353 | 4448 |
|box rotation| |
4449 |
||
4450 |
box := EnterBox new. |
|
4451 |
box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
4452 |
box okText:(resources string:'OK'). |
|
4453 |
box abortText:(resources string:'Cancel'). |
|
4454 |
box initialText: '0'. |
|
4455 |
box showAtPointer. |
|
4456 |
(box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil]) |
|
4457 |
ifTrue:[ |
|
4458 |
imageEditView rotateImageBy:rotation. |
|
1558 | 4459 |
self updateInfoLabel. |
1353 | 4460 |
]. |
400 | 4461 |
! |
4462 |
||
1557 | 4463 |
doShiftManual |
4464 |
"let user specify amount and shift" |
|
4465 |
||
1713 | 4466 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 4467 |
|
4468 |
acceptChannel := TriggerValue new. |
|
1713 | 4469 |
wrapHolder := false asValue. |
1557 | 4470 |
|
4471 |
firstChange := true. |
|
4472 |
||
4473 |
shiftAction := |
|
4474 |
[:shiftH :shiftV | |
|
4475 |
acceptChannel value:true. |
|
4476 |
||
4477 |
img := imageEditView image. |
|
4478 |
firstChange ifTrue:[ |
|
4479 |
imageEditView makeUndo. |
|
4480 |
firstChange := false. |
|
4481 |
]. |
|
1713 | 4482 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 4483 |
self updateInfoLabel |
4484 |
]. |
|
4485 |
||
4486 |
bindings := IdentityDictionary new. |
|
4487 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 4488 |
bindings at:#wrap put:wrapHolder. |
1557 | 4489 |
bindings at:#acceptChannel put:acceptChannel. |
4490 |
||
4491 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
4492 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
4493 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
4494 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
4495 |
||
4496 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
4497 |
ifFalse:[ |
|
4498 |
firstChange ~~ true ifTrue:[ |
|
4499 |
imageEditView undo |
|
4500 |
] |
|
4501 |
]. |
|
4502 |
||
4503 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4504 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4505 |
! |
|
4506 |
||
1480 | 4507 |
doUnCropManual |
4508 |
"let user specify borders and add them" |
|
4509 |
||
4510 |
|bindings left top right bottom img| |
|
4511 |
||
4512 |
bindings := IdentityDictionary new. |
|
1704 | 4513 |
bindings at:#left put:(left := 1 asValue). |
4514 |
bindings at:#right put:(right := 1 asValue). |
|
4515 |
bindings at:#top put:(top := 1 asValue). |
|
4516 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4517 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 4518 |
ifTrue:[ |
4519 |
left := left value. |
|
4520 |
right := right value. |
|
4521 |
top := top value. |
|
4522 |
bottom := bottom value. |
|
4523 |
img := imageEditView image. |
|
4524 |
||
4525 |
imageEditView |
|
4526 |
makeBorderedImageX:left y:top |
|
4527 |
width:(img width + left + right) |
|
4528 |
height:(img height + top + bottom). |
|
4529 |
self updateInfoLabel |
|
4530 |
]. |
|
4531 |
||
4532 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4533 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4534 |
! |
|
4535 |
||
767 | 4536 |
doUndo |
4537 |
"reverses last edit action" |
|
400 | 4538 |
|
1436 | 4539 |
imageEditView undo. |
400 | 4540 |
! ! |
4541 |
||
1715 | 4542 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 4543 |
|
767 | 4544 |
doLoadFromClass |
4545 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 4546 |
|
1122 | 4547 |
|img| |
4548 |
||
1054 | 4549 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4550 |
imageSeqNr := nil. |
1122 | 4551 |
(img := self image) notNil ifTrue: [ |
4552 |
self listOfColors contents: img usedColors asSet asOrderedCollection. |
|
574 | 4553 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4554 |
self updateLabelsAndHistory. |
1054 | 4555 |
] ifFalse: [ |
4556 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4557 |
]. |
449 | 4558 |
] |
400 | 4559 |
! |
4560 |
||
767 | 4561 |
doLoadFromFile |
4562 |
"opens a dialog for loading an image from a file" |
|
400 | 4563 |
|
1353 | 4564 |
|img file dir filters| |
4565 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4566 |
imageSeqNr := nil. |
1353 | 4567 |
img := self image. |
4568 |
img notNil ifTrue: [ |
|
4569 |
file := img fileName |
|
4570 |
] ifFalse:[ |
|
4571 |
dir := LastDirectory |
|
4572 |
]. |
|
4573 |
||
4574 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
4575 |
||
4576 |
file notNil ifTrue:[ |
|
4577 |
file := FileSelectionBrowser |
|
4578 |
request:'Load Image From' |
|
4579 |
fileName:file |
|
4580 |
withFileFilters:filters. |
|
4581 |
] ifFalse:[ |
|
4582 |
file := FileSelectionBrowser |
|
4583 |
request:'Load Image From' |
|
4584 |
inDirectory:dir |
|
4585 |
withFileFilters:filters. |
|
4586 |
]. |
|
4587 |
file notNil ifTrue:[ |
|
4588 |
LastDirectory := file asFilename directoryName. |
|
4589 |
self loadFromFile:file |
|
4590 |
] |
|
400 | 4591 |
! |
4592 |
||
767 | 4593 |
doNewImage |
4594 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 4595 |
|
1637 | 4596 |
|aspects width height cMapString cMap imageClass image szString| |
767 | 4597 |
|
400 | 4598 |
aspects := IdentityDictionary new |
767 | 4599 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
4600 |
at:#listOfColorMaps put: self class listOfColorMaps keys asSortedCollection asValue; |
|
1637 | 4601 |
at:#selectionOfSize put: (LastSizeString ? self class listOfDefaultSizes first copy) asValue; |
4602 |
at:#selectionOfColorMap put: (LastColormapMode ? self class listOfColorMaps keys asSortedCollection first) asValue; |
|
400 | 4603 |
yourself. |
4604 |
||
767 | 4605 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:aspects) |
1383 | 4606 |
ifTrue:[ |
4607 |
szString := (aspects at:#selectionOfSize) value. |
|
4608 |
width := 128 min: (Integer readFromString: (szString upTo: $x) onError:[24]). |
|
4609 |
height := 128 min: (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[24]). |
|
400 | 4610 |
|
1637 | 4611 |
cMapString := (aspects at:#selectionOfColorMap) value. |
975 | 4612 |
cMap := (self class listOfColorMaps at: (colorMapMode value: (aspects at:#selectionOfColorMap) value) value). |
400 | 4613 |
imageClass := Image implementorForDepth: ((cMap size log: 2) asInteger). |
767 | 4614 |
image := imageClass width: width height: height fromArray: (ByteArray new: width*height). |
400 | 4615 |
|
1637 | 4616 |
LastSizeString := szString. |
4617 |
LastColormapMode := cMapString. |
|
4618 |
||
975 | 4619 |
(colorMapMode value endsWith: 'mask') |
400 | 4620 |
ifTrue: |
4621 |
[ |
|
767 | 4622 |
image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
400 | 4623 |
]. |
4624 |
image colorMap: cMap. |
|
4625 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
|
911 | 4626 |
(imageEditView image: image) notNil |
400 | 4627 |
ifTrue: |
4628 |
[ |
|
4629 |
self listOfColors contents: cMap. |
|
4630 |
self findColorMapMode. |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4631 |
self updateLabelsAndHistory. |
400 | 4632 |
] |
767 | 4633 |
] |
929 | 4634 |
! |
4635 |
||
1682 | 4636 |
doNewImageFromClipboard |
4637 |
|image| |
|
4638 |
||
4639 |
image := imageEditView clipBoard. |
|
4640 |
||
4641 |
(imageEditView image:image) notNil |
|
4642 |
ifTrue:[ |
|
4643 |
self listOfColors contents:(image colorMap). |
|
4644 |
self findColorMapMode. |
|
4645 |
self updateLabelsAndHistory. |
|
4646 |
] |
|
4647 |
! |
|
4648 |
||
929 | 4649 |
grabScreenImage |
4650 |
"let user choose an area and grab that are for editing" |
|
4651 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4652 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4653 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4654 |
|image d8image img| |
929 | 4655 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4656 |
imageSeqNr := nil. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4657 |
image := Image fromUser. |
1121 | 4658 |
image isNil ifFalse:[ |
4659 |
image depth > 8 ifTrue:[ |
|
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
4660 |
Error handle:[:ex | |sig| |
1537
e86a686eeba2
class based exceptions - no longer need to send #haltSÃgnal
Claus Gittinger <cg@exept.de>
parents:
1507
diff
changeset
|
4661 |
(sig := ex signal) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 4662 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 4663 |
|
4664 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
4665 |
d8image := nil. |
|
4666 |
] do:[ |
|
4667 |
d8image := Depth8Image new. |
|
4668 |
d8image fromImage:image. |
|
4669 |
]. |
|
4670 |
d8image notNil ifTrue:[ |
|
4671 |
image := d8image |
|
4672 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4673 |
]. |
1121 | 4674 |
(imageEditView image:image) notNil ifTrue:[ |
4675 |
self listOfColors contents:(image colorMap). |
|
4676 |
self findColorMapMode. |
|
4677 |
self updateLabelsAndHistory. |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4678 |
] |
1121 | 4679 |
] |
4680 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4681 |
afterSeconds:1 |
929 | 4682 |
|
4683 |
"Created: / 29.7.1998 / 21:24:42 / cg" |
|
1537
e86a686eeba2
class based exceptions - no longer need to send #haltSÃgnal
Claus Gittinger <cg@exept.de>
parents:
1507
diff
changeset
|
4684 |
"Modified: / 16.11.2001 / 16:21:19 / cg" |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4685 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4686 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4687 |
nextImageInSequence |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4688 |
"display the next image in the image sequence" |
1383 | 4689 |
|img seq frame listOfColors| |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4690 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4691 |
imageEditView releaseUndos. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4692 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4693 |
seq := self image imageSequence. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4694 |
imageSeqNr isNil ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4695 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4696 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4697 |
imageSeqNr := imageSeqNr + 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4698 |
imageSeqNr > seq size ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4699 |
self information:'Back to first image in sequence'. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4700 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4701 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4702 |
frame := seq at:imageSeqNr. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4703 |
imageEditView image:(frame image). |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4704 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4705 |
(img := self image) notNil ifTrue:[ |
1383 | 4706 |
listOfColors := self listOfColors. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4707 |
img colorMap notNil ifTrue:[ |
1383 | 4708 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4709 |
] ifFalse:[ |
1383 | 4710 |
listOfColors removeAll. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4711 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4712 |
self findColorMapMode. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4713 |
self updateLabelsAndHistory. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4714 |
img := img onDevice:device. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4715 |
imageEditView image:img. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4716 |
] ifFalse:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4717 |
self updateForNoImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4718 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4719 |
|
400 | 4720 |
! ! |
4721 |
||
1715 | 4722 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 4723 |
|
767 | 4724 |
doPrint |
4725 |
"prints current image on the current printer" |
|
400 | 4726 |
|
1734 | 4727 |
self withWaitCursorDo:[ |
4728 |
imageEditView print |
|
4729 |
] |
|
400 | 4730 |
! |
4731 |
||
1613 | 4732 |
doSaveButtonImageToFileAs |
4733 |
"opens a dialog for saving current image to a file" |
|
4734 |
||
4735 |
imageEditView saveButtonImageToFileAs. |
|
4736 |
self updateLabelsAndHistory. |
|
4737 |
! |
|
4738 |
||
767 | 4739 |
doSaveImageFile |
4740 |
"saves current image to current file" |
|
400 | 4741 |
|
1481 | 4742 |
imageEditView save. |
400 | 4743 |
! |
4744 |
||
767 | 4745 |
doSaveImageFileAs |
4746 |
"opens a dialog for saving current image to a file" |
|
400 | 4747 |
|
911 | 4748 |
imageEditView saveImageFileAs. |
1481 | 4749 |
self updateLabelsAndHistory. |
400 | 4750 |
! |
4751 |
||
767 | 4752 |
doSaveImageMaskFileAs |
4753 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 4754 |
|
1481 | 4755 |
imageEditView saveImageMaskFileAs. |
400 | 4756 |
! |
4757 |
||
767 | 4758 |
doSaveMethod |
4759 |
"saves current image on current class and selector" |
|
400 | 4760 |
|
911 | 4761 |
imageEditView saveMethod notNil |
400 | 4762 |
ifTrue: |
4763 |
[ |
|
694 | 4764 |
self updateLabelsAndHistory |
400 | 4765 |
] |
4766 |
! |
|
4767 |
||
767 | 4768 |
doSaveMethodAs |
4769 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 4770 |
|
911 | 4771 |
imageEditView saveMethodAs notNil |
400 | 4772 |
ifTrue: |
4773 |
[ |
|
694 | 4774 |
self updateLabelsAndHistory |
400 | 4775 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4776 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4777 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4778 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4779 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4780 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4781 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4782 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4783 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4784 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4785 |
TextBox openOn:img storeString |
400 | 4786 |
! ! |
4787 |
||
1715 | 4788 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 4789 |
|
4790 |
doChangeGridMagnification |
|
4791 |
"change grid magnification" |
|
4792 |
||
4793 |
|box oldGridLimit newGridLimit| |
|
4794 |
||
4795 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
4796 |
||
4797 |
box := EnterBox new. |
|
4798 |
box title:(resources string:'Grid Magnification Limit:'). |
|
4799 |
box okText:(resources string:'OK'). |
|
4800 |
box abortText:(resources string:'Cancel'). |
|
4801 |
box initialText:(oldGridLimit x printString). |
|
4802 |
box showAtPointer. |
|
4803 |
||
4804 |
(box accepted |
|
4805 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
4806 |
) ifTrue:[ |
|
4807 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
4808 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
4809 |
imageEditView invalidate |
|
4810 |
] |
|
4811 |
||
4812 |
! ! |
|
4813 |
||
400 | 4814 |
!ImageEditor class methodsFor:'documentation'! |
4815 |
||
4816 |
version |
|
4817 |
^ '$Header$' |
|
4818 |
! ! |