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