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