author | Claus Gittinger <cg@exept.de> |
Tue, 14 Feb 2006 11:06:02 +0100 | |
changeset 1980 | 862d4036cebd |
parent 1975 | 14b7babca4f5 |
child 1985 | 8c887bee94fa |
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 |
|
1539 |
model: valueOfMagnification |
|
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 |
) |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1571 |
! |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1572 |
|
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1573 |
windowSpecInBrowser |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1574 |
"This resource specification was automatically generated |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1575 |
by the UIPainter of ST/X." |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1576 |
|
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1577 |
"Do not manually edit this!! If it is corrupted, |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1578 |
the UIPainter may not be able to read the specification." |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1579 |
|
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1580 |
" |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1581 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpecInBrowser |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1582 |
ImageEditor new openInterface:#windowSpecInBrowser |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1583 |
" |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1584 |
|
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1585 |
<resource: #canvas> |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1586 |
|
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1587 |
^ |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1588 |
#(FullSpec |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1589 |
name: windowSpecInBrowser |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1590 |
window: |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1591 |
(WindowSpec |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1592 |
label: 'Image Editor' |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1593 |
name: 'Image Editor' |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1594 |
min: (Point 400 320) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1595 |
bounds: (Rectangle 0 0 450 350) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1596 |
menu: menu |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1597 |
) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1598 |
component: |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1599 |
(SpecCollection |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1600 |
collection: ( |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1601 |
(MenuPanelSpec |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1602 |
name: 'ToolBar1' |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1603 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1604 |
menu: menu |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1605 |
) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1606 |
(UISubSpecification |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1607 |
name: 'SubSpecification1' |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1608 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1609 |
majorKey: ImageEditor |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1610 |
minorKey: windowSpec |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1611 |
) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1612 |
) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1613 |
|
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1614 |
) |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
1615 |
) |
519 | 1616 |
! ! |
1617 |
||
1618 |
!ImageEditor class methodsFor:'menu specs'! |
|
1619 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1620 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1621 |
"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
|
1622 |
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
|
1623 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1624 |
"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
|
1625 |
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
|
1626 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1627 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1628 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1629 |
(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
|
1630 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1631 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1632 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1633 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1634 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1635 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1636 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1637 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1638 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1639 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1640 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1641 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1642 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1643 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1644 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1645 |
label: 'Pick and Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1646 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1647 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1648 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1649 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1650 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1651 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1652 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1653 |
enabled: hasColormap |
1852 | 1654 |
label: 'Cut Color' |
1655 |
itemValue: cutColorFromColormap |
|
1656 |
translateLabel: true |
|
1657 |
isVisible: false |
|
1658 |
) |
|
1659 |
(MenuItem |
|
1660 |
enabled: hasColormap |
|
1661 |
label: 'Copy Color' |
|
1662 |
itemValue: copyColorFromColormap |
|
1663 |
translateLabel: true |
|
1664 |
) |
|
1665 |
(MenuItem |
|
1666 |
enabled: hasColormap |
|
1933 | 1667 |
label: 'Pick and Paste Color' |
1668 |
itemValue: pickAndPasteColor |
|
1852 | 1669 |
translateLabel: true |
1670 |
) |
|
1671 |
(MenuItem |
|
1672 |
enabled: hasColormap |
|
1673 |
label: 'Paste Color' |
|
1674 |
itemValue: pasteColorIntoColormap |
|
1675 |
translateLabel: true |
|
1676 |
) |
|
1677 |
(MenuItem |
|
1678 |
label: '-' |
|
1679 |
) |
|
1680 |
(MenuItem |
|
1681 |
enabled: hasColormap |
|
1931 | 1682 |
label: 'Edit Color' |
1683 |
itemValue: editSelectedColor |
|
1684 |
translateLabel: true |
|
1685 |
) |
|
1686 |
(MenuItem |
|
1687 |
enabled: hasColormap |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1688 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1689 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1690 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1691 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1692 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1693 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1694 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1695 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1696 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1697 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1698 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1699 |
enabled: hasColormap |
1884 | 1700 |
label: 'Make Gray' |
1701 |
itemValue: makeSelectedColorGray |
|
1702 |
translateLabel: true |
|
1703 |
) |
|
1704 |
(MenuItem |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1705 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1706 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1707 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1708 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1709 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1710 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1711 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1712 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1713 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1714 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1715 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1716 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1717 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1718 |
|
400 | 1719 |
menu |
737 | 1720 |
"This resource specification was automatically generated |
1721 |
by the MenuEditor of ST/X." |
|
400 | 1722 |
|
737 | 1723 |
"Do not manually edit this!! If it is corrupted, |
1724 |
the MenuEditor may not be able to read the specification." |
|
400 | 1725 |
|
1726 |
" |
|
1727 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
1728 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
1729 |
" |
|
1730 |
||
1731 |
<resource: #menu> |
|
1732 |
||
1124 | 1733 |
^ |
1882 | 1734 |
#(Menu |
1735 |
( |
|
1736 |
(MenuItem |
|
1737 |
label: '&File' |
|
1738 |
translateLabel: true |
|
1739 |
submenu: |
|
1740 |
(Menu |
|
1741 |
( |
|
1742 |
(MenuItem |
|
1743 |
activeHelpKey: fileNewImage |
|
1744 |
label: 'New...' |
|
1745 |
itemValue: doNewImage |
|
1746 |
translateLabel: true |
|
1124 | 1747 |
) |
1882 | 1748 |
(MenuItem |
1749 |
activeHelpKey: fileNewImage |
|
1750 |
label: 'New from ClipBoard' |
|
1751 |
itemValue: doNewImageFromClipboard |
|
1752 |
translateLabel: true |
|
1682 | 1753 |
) |
1882 | 1754 |
(MenuItem |
1755 |
label: '-' |
|
1124 | 1756 |
) |
1882 | 1757 |
(MenuItem |
1758 |
activeHelpKey: fileLoadFromClass |
|
1759 |
label: 'Load...' |
|
1760 |
itemValue: doLoadFromClass |
|
1761 |
translateLabel: true |
|
1124 | 1762 |
) |
1882 | 1763 |
(MenuItem |
1764 |
activeHelpKey: fileLoadFromFile |
|
1765 |
label: 'Load from File...' |
|
1766 |
itemValue: doLoadFromFile |
|
1767 |
translateLabel: true |
|
1124 | 1768 |
) |
1882 | 1769 |
(MenuItem |
1770 |
activeHelpKey: fileGrabImage |
|
1771 |
label: 'Grab from Screen...' |
|
1772 |
itemValue: grabScreenImage |
|
1773 |
translateLabel: true |
|
1124 | 1774 |
) |
1882 | 1775 |
(MenuItem |
1776 |
enabled: imageHasNextImage |
|
1777 |
label: 'Next in Sequence' |
|
1778 |
itemValue: nextImageInSequence |
|
1779 |
translateLabel: true |
|
1975 | 1780 |
isVisible: isStandAlone |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
1781 |
) |
1882 | 1782 |
(MenuItem |
1783 |
label: '-' |
|
1124 | 1784 |
) |
1882 | 1785 |
(MenuItem |
1786 |
activeHelpKey: fileSaveMethod |
|
1787 |
enabled: imageIsLoadedAndClassDefined |
|
1788 |
label: 'Save' |
|
1789 |
itemValue: doSaveMethod |
|
1790 |
translateLabel: true |
|
1124 | 1791 |
) |
1882 | 1792 |
(MenuItem |
1793 |
activeHelpKey: fileSaveMethodAs |
|
1794 |
enabled: imageIsLoaded |
|
1795 |
label: 'Save As...' |
|
1796 |
itemValue: doSaveMethodAs |
|
1797 |
translateLabel: true |
|
1975 | 1798 |
isVisible: isStandAlone |
1124 | 1799 |
) |
1882 | 1800 |
(MenuItem |
1801 |
activeHelpKey: fileSaveAs |
|
1802 |
enabled: imageIsLoaded |
|
1803 |
label: 'Save to File...' |
|
1804 |
itemValue: doSaveImageFileAs |
|
1805 |
translateLabel: true |
|
1124 | 1806 |
) |
1882 | 1807 |
(MenuItem |
1808 |
activeHelpKey: fileSaveMaskAs |
|
1809 |
enabled: imageIsLoaded |
|
1810 |
label: 'Save Mask to File...' |
|
1811 |
itemValue: doSaveImageMaskFileAs |
|
1812 |
translateLabel: true |
|
1124 | 1813 |
) |
1882 | 1814 |
(MenuItem |
1815 |
activeHelpKey: fileSaveButtonImageAs |
|
1816 |
enabled: imageIsLoaded |
|
1817 |
label: 'Save as Button to File...' |
|
1818 |
itemValue: doSaveButtonImageToFileAs |
|
1819 |
translateLabel: true |
|
1613 | 1820 |
) |
1882 | 1821 |
(MenuItem |
1822 |
enabled: imageIsLoaded |
|
1823 |
label: 'Copy to Clipboard' |
|
1824 |
itemValue: doCopyImageToClipboard |
|
1825 |
translateLabel: true |
|
1703 | 1826 |
) |
1882 | 1827 |
(MenuItem |
1828 |
label: '-' |
|
1124 | 1829 |
) |
1882 | 1830 |
(MenuItem |
1831 |
activeHelpKey: fileShowStoreString |
|
1832 |
enabled: imageIsLoaded |
|
1833 |
label: 'Show storeString' |
|
1834 |
itemValue: doShowStoreString |
|
1835 |
translateLabel: true |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1836 |
) |
1882 | 1837 |
(MenuItem |
1838 |
activeHelpKey: fileEditMask |
|
1839 |
enabled: imageIsLoaded |
|
1840 |
label: 'Edit Mask' |
|
1841 |
itemValue: doEditMask |
|
1842 |
translateLabel: true |
|
1433 | 1843 |
) |
1882 | 1844 |
(MenuItem |
1845 |
label: '-' |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1846 |
) |
1882 | 1847 |
(MenuItem |
1848 |
activeHelpKey: filePrint |
|
1849 |
enabled: imageIsLoaded |
|
1850 |
label: 'Print' |
|
1851 |
itemValue: doPrint |
|
1852 |
translateLabel: true |
|
1124 | 1853 |
) |
1882 | 1854 |
(MenuItem |
1855 |
label: '-' |
|
1975 | 1856 |
isVisible: isStandAlone |
1124 | 1857 |
) |
1882 | 1858 |
(MenuItem |
1859 |
activeHelpKey: fileBrowseClass |
|
1860 |
enabled: hasClassDefined |
|
1861 |
label: 'Browse Class' |
|
1862 |
itemValue: doBrowseClass |
|
1863 |
translateLabel: true |
|
1975 | 1864 |
isVisible: isStandAlone |
1124 | 1865 |
) |
1882 | 1866 |
(MenuItem |
1896 | 1867 |
label: 'Inspect Image' |
1868 |
itemValue: doInspectImage |
|
1869 |
translateLabel: true |
|
1975 | 1870 |
isVisible: isStandAlone |
1896 | 1871 |
) |
1872 |
(MenuItem |
|
1882 | 1873 |
label: '-' |
1975 | 1874 |
isVisible: isStandAlone |
1124 | 1875 |
) |
1882 | 1876 |
(MenuItem |
1877 |
activeHelpKey: fileExit |
|
1878 |
label: 'Exit' |
|
1879 |
itemValue: closeRequest |
|
1880 |
translateLabel: true |
|
1975 | 1881 |
isVisible: isStandAlone |
1124 | 1882 |
) |
1883 |
) |
|
1884 |
nil |
|
1885 |
nil |
|
400 | 1886 |
) |
1124 | 1887 |
) |
1882 | 1888 |
(MenuItem |
1889 |
enabled: imageIsLoaded |
|
1890 |
label: 'Edit' |
|
1891 |
translateLabel: true |
|
1892 |
submenu: |
|
1893 |
(Menu |
|
1894 |
( |
|
1895 |
(MenuItem |
|
1896 |
activeHelpKey: editUndo |
|
1897 |
enabled: valueOfCanUndo |
|
1898 |
label: 'Undo' |
|
1899 |
itemValue: doUndo |
|
1900 |
translateLabel: true |
|
1124 | 1901 |
) |
1882 | 1902 |
(MenuItem |
1903 |
label: '-' |
|
1124 | 1904 |
) |
1882 | 1905 |
(MenuItem |
1906 |
activeHelpKey: editFlipVertical |
|
1907 |
label: 'Flip - Vertical' |
|
1908 |
itemValue: doFlipVertical |
|
1909 |
translateLabel: true |
|
1910 |
) |
|
1911 |
(MenuItem |
|
1912 |
activeHelpKey: editFlipHorizontal |
|
1913 |
label: 'Flip - Horizontal' |
|
1914 |
itemValue: doFlipHorizontal |
|
1915 |
translateLabel: true |
|
1124 | 1916 |
) |
1882 | 1917 |
(MenuItem |
1918 |
label: '-' |
|
1124 | 1919 |
) |
1882 | 1920 |
(MenuItem |
1921 |
activeHelpKey: editResize |
|
1922 |
label: 'Resize...' |
|
1923 |
itemValue: doResizeImage |
|
1924 |
translateLabel: true |
|
1124 | 1925 |
) |
1882 | 1926 |
(MenuItem |
1927 |
activeHelpKey: editMagnifyImage |
|
1928 |
label: 'Magnify...' |
|
1929 |
itemValue: doMagnifyImage |
|
1930 |
translateLabel: true |
|
1124 | 1931 |
) |
1882 | 1932 |
(MenuItem |
1933 |
activeHelpKey: editMagnifyImage |
|
1934 |
label: 'Magnify By...' |
|
1935 |
itemValue: doMagnifyImageBy |
|
1936 |
translateLabel: true |
|
1124 | 1937 |
) |
1882 | 1938 |
(MenuItem |
1939 |
activeHelpKey: editRotate |
|
1940 |
label: 'Rotate...' |
|
1941 |
itemValue: doRotateImage |
|
1942 |
translateLabel: true |
|
1479 | 1943 |
) |
1882 | 1944 |
(MenuItem |
1945 |
label: '-' |
|
1124 | 1946 |
) |
1882 | 1947 |
(MenuItem |
1948 |
label: 'Invert' |
|
1949 |
itemValue: doNegativeImage |
|
1950 |
translateLabel: true |
|
1124 | 1951 |
) |
1882 | 1952 |
(MenuItem |
1953 |
label: 'Brighten' |
|
1954 |
itemValue: doBrightenImage |
|
1955 |
translateLabel: true |
|
1146 | 1956 |
) |
1882 | 1957 |
(MenuItem |
1958 |
label: 'Darken' |
|
1959 |
itemValue: doDarkenImage |
|
1960 |
translateLabel: true |
|
1146 | 1961 |
) |
1882 | 1962 |
(MenuItem |
1963 |
label: '-' |
|
1964 |
) |
|
1965 |
(MenuItem |
|
1966 |
label: 'Crop' |
|
1967 |
translateLabel: true |
|
1968 |
submenu: |
|
1969 |
(Menu |
|
1970 |
( |
|
1971 |
(MenuItem |
|
1888 | 1972 |
activeHelpKey: cropManual |
1973 |
label: 'Manual...' |
|
1974 |
itemValue: doCropManual |
|
1975 |
translateLabel: true |
|
1976 |
) |
|
1977 |
(MenuItem |
|
1978 |
label: '-' |
|
1979 |
) |
|
1980 |
(MenuItem |
|
1882 | 1981 |
activeHelpKey: cropAll |
1982 |
label: 'All' |
|
1983 |
itemValue: doCropAll |
|
1984 |
translateLabel: true |
|
400 | 1985 |
) |
1882 | 1986 |
(MenuItem |
1987 |
label: '-' |
|
986 | 1988 |
) |
1882 | 1989 |
(MenuItem |
1990 |
activeHelpKey: cropLeft |
|
1991 |
label: 'Left' |
|
1992 |
itemValue: doCropLeft |
|
1993 |
translateLabel: true |
|
1124 | 1994 |
) |
1882 | 1995 |
(MenuItem |
1996 |
activeHelpKey: cropRight |
|
1997 |
label: 'Right' |
|
1998 |
itemValue: doCropRight |
|
1999 |
translateLabel: true |
|
986 | 2000 |
) |
1882 | 2001 |
(MenuItem |
2002 |
activeHelpKey: cropTop |
|
2003 |
label: 'Top' |
|
2004 |
itemValue: doCropTop |
|
2005 |
translateLabel: true |
|
672 | 2006 |
) |
1882 | 2007 |
(MenuItem |
2008 |
activeHelpKey: cropBottom |
|
2009 |
label: 'Bottom' |
|
2010 |
itemValue: doCropBottom |
|
2011 |
translateLabel: true |
|
400 | 2012 |
) |
1124 | 2013 |
) |
2014 |
nil |
|
400 | 2015 |
nil |
1124 | 2016 |
) |
400 | 2017 |
) |
1882 | 2018 |
(MenuItem |
2019 |
activeHelpKey: uncropManual |
|
2020 |
label: 'Uncrop (Add Border)...' |
|
2021 |
itemValue: doUnCropManual |
|
2022 |
translateLabel: true |
|
1713 | 2023 |
) |
1882 | 2024 |
(MenuItem |
2025 |
activeHelpKey: shiftManual |
|
2026 |
label: 'Shift...' |
|
2027 |
itemValue: doShiftManual |
|
2028 |
translateLabel: true |
|
1557 | 2029 |
) |
1124 | 2030 |
) |
2031 |
nil |
|
2032 |
nil |
|
400 | 2033 |
) |
1124 | 2034 |
) |
1882 | 2035 |
(MenuItem |
2036 |
enabled: imageIsLoaded |
|
2037 |
label: 'Mode' |
|
2038 |
translateLabel: true |
|
2039 |
submenuChannel: modeMenu |
|
1637 | 2040 |
) |
1882 | 2041 |
(MenuItem |
2042 |
enabled: imageIsLoaded |
|
1924 | 2043 |
label: 'Colors' |
1882 | 2044 |
translateLabel: true |
2045 |
submenu: |
|
2046 |
(Menu |
|
2047 |
( |
|
2048 |
(MenuItem |
|
2049 |
label: 'Depth' |
|
2050 |
translateLabel: true |
|
2051 |
submenu: |
|
2052 |
(Menu |
|
2053 |
( |
|
2054 |
(MenuItem |
|
1936 | 2055 |
activeHelpKey: colorMap1 |
2056 |
label: '1-Plane' |
|
1934 | 2057 |
itemValue: colorMapMode: |
2058 |
translateLabel: true |
|
1936 | 2059 |
argument: depth1 |
1934 | 2060 |
choice: colorMapMode |
1936 | 2061 |
choiceValue: depth1 |
1934 | 2062 |
) |
2063 |
(MenuItem |
|
1936 | 2064 |
activeHelpKey: colorMap1M |
2065 |
label: '1-Plane + Mask' |
|
1882 | 2066 |
itemValue: colorMapMode: |
2067 |
translateLabel: true |
|
1936 | 2068 |
argument: masked1 |
1882 | 2069 |
choice: colorMapMode |
1936 | 2070 |
choiceValue: masked1 |
1649 | 2071 |
) |
1882 | 2072 |
(MenuItem |
1936 | 2073 |
label: '-' |
1649 | 2074 |
) |
1882 | 2075 |
(MenuItem |
2076 |
activeHelpKey: colorMap2 |
|
2077 |
label: '2-Plane' |
|
2078 |
itemValue: colorMapMode: |
|
2079 |
translateLabel: true |
|
2080 |
argument: depth2 |
|
2081 |
choice: colorMapMode |
|
2082 |
choiceValue: depth2 |
|
1649 | 2083 |
) |
1882 | 2084 |
(MenuItem |
1936 | 2085 |
activeHelpKey: colorMap2M |
2086 |
label: '2-Plane + Mask' |
|
1882 | 2087 |
itemValue: colorMapMode: |
2088 |
translateLabel: true |
|
1936 | 2089 |
argument: masked2 |
1882 | 2090 |
choice: colorMapMode |
1936 | 2091 |
choiceValue: masked2 |
1649 | 2092 |
) |
1882 | 2093 |
(MenuItem |
2094 |
label: '-' |
|
1649 | 2095 |
) |
1882 | 2096 |
(MenuItem |
1936 | 2097 |
activeHelpKey: colorMap4 |
2098 |
label: '4-Plane' |
|
2099 |
itemValue: colorMapMode: |
|
2100 |
translateLabel: true |
|
2101 |
argument: depth4 |
|
2102 |
choice: colorMapMode |
|
2103 |
choiceValue: depth4 |
|
2104 |
) |
|
2105 |
(MenuItem |
|
2106 |
activeHelpKey: colorMap4M |
|
2107 |
label: '4-Plane + Mask' |
|
2108 |
itemValue: colorMapMode: |
|
2109 |
translateLabel: true |
|
2110 |
argument: masked4 |
|
2111 |
choice: colorMapMode |
|
2112 |
choiceValue: masked4 |
|
2113 |
) |
|
2114 |
(MenuItem |
|
2115 |
label: '-' |
|
2116 |
) |
|
2117 |
(MenuItem |
|
2118 |
activeHelpKey: colorMap8 |
|
2119 |
label: '8-Plane' |
|
1934 | 2120 |
itemValue: colorMapMode: |
2121 |
translateLabel: true |
|
1936 | 2122 |
argument: depth8 |
2123 |
choice: colorMapMode |
|
2124 |
choiceValue: depth8 |
|
2125 |
) |
|
2126 |
(MenuItem |
|
2127 |
activeHelpKey: colorMap8M |
|
2128 |
label: '8-Plane + Mask' |
|
2129 |
itemValue: colorMapMode: |
|
2130 |
translateLabel: true |
|
2131 |
argument: masked8 |
|
1934 | 2132 |
choice: colorMapMode |
1936 | 2133 |
choiceValue: masked8 |
2134 |
) |
|
2135 |
(MenuItem |
|
2136 |
label: '-' |
|
2137 |
) |
|
2138 |
(MenuItem |
|
2139 |
activeHelpKey: colorMap16 |
|
2140 |
label: '16-Plane' |
|
2141 |
itemValue: colorMapMode: |
|
2142 |
translateLabel: true |
|
2143 |
argument: depth16 |
|
2144 |
choice: colorMapMode |
|
2145 |
choiceValue: depth16 |
|
1934 | 2146 |
) |
2147 |
(MenuItem |
|
2148 |
activeHelpKey: colorMap16M |
|
2149 |
label: '16-Plane + Mask' |
|
2150 |
itemValue: colorMapMode: |
|
2151 |
translateLabel: true |
|
2152 |
argument: masked16 |
|
2153 |
choice: colorMapMode |
|
2154 |
choiceValue: masked16 |
|
2155 |
) |
|
2156 |
(MenuItem |
|
1936 | 2157 |
label: '-' |
1649 | 2158 |
) |
1882 | 2159 |
(MenuItem |
1936 | 2160 |
activeHelpKey: colorMap24 |
2161 |
label: '24-Plane' |
|
1882 | 2162 |
itemValue: colorMapMode: |
2163 |
translateLabel: true |
|
1936 | 2164 |
argument: depth24 |
1882 | 2165 |
choice: colorMapMode |
1936 | 2166 |
choiceValue: depth24 |
1649 | 2167 |
) |
1882 | 2168 |
(MenuItem |
1936 | 2169 |
activeHelpKey: colorMap24M |
2170 |
label: '24-Plane + Mask' |
|
1882 | 2171 |
itemValue: colorMapMode: |
2172 |
translateLabel: true |
|
1936 | 2173 |
argument: masked24 |
1882 | 2174 |
choice: colorMapMode |
1936 | 2175 |
choiceValue: masked24 |
1649 | 2176 |
) |
2177 |
) |
|
2178 |
nil |
|
2179 |
nil |
|
2180 |
) |
|
1124 | 2181 |
) |
1882 | 2182 |
(MenuItem |
1924 | 2183 |
label: 'ColorMap' |
1882 | 2184 |
translateLabel: true |
2185 |
submenu: |
|
2186 |
(Menu |
|
2187 |
( |
|
2188 |
(MenuItem |
|
2189 |
activeHelpKey: compressColormap |
|
2190 |
enabled: hasColormap |
|
2191 |
label: 'Compress Colormap' |
|
2192 |
itemValue: compressColorMap |
|
2193 |
translateLabel: true |
|
1649 | 2194 |
) |
1882 | 2195 |
(MenuItem |
2196 |
enabled: hasColormap |
|
2197 |
label: 'Sort Colormap' |
|
2198 |
itemValue: sortColorMap |
|
2199 |
translateLabel: true |
|
1649 | 2200 |
) |
1882 | 2201 |
(MenuItem |
1934 | 2202 |
label: 'Reduce Number of Colors by Rounding...' |
2203 |
itemValue: reduceNumberOfColors2 |
|
2204 |
translateLabel: true |
|
2205 |
) |
|
2206 |
(MenuItem |
|
2207 |
label: 'Reduce Number of Colors by Masking Bits...' |
|
1882 | 2208 |
itemValue: reduceNumberOfColors |
2209 |
translateLabel: true |
|
1649 | 2210 |
) |
2211 |
) |
|
2212 |
nil |
|
2213 |
nil |
|
2214 |
) |
|
1124 | 2215 |
) |
1882 | 2216 |
(MenuItem |
2217 |
label: 'Process' |
|
2218 |
translateLabel: true |
|
2219 |
submenu: |
|
2220 |
(Menu |
|
2221 |
( |
|
2222 |
(MenuItem |
|
2223 |
label: 'Make GrayScale' |
|
1924 | 2224 |
itemValue: makeGrayScaleImage |
1882 | 2225 |
translateLabel: true |
1649 | 2226 |
) |
1882 | 2227 |
(MenuItem |
1924 | 2228 |
enabled: hasNoColormap |
2229 |
label: 'Make dithered 8Bit Palette' |
|
2230 |
itemValue: makeDitheredPaletteImage |
|
2231 |
translateLabel: true |
|
2232 |
isVisible: false |
|
2233 |
) |
|
2234 |
(MenuItem |
|
1882 | 2235 |
label: 'Make Brighter' |
2236 |
itemValue: makeBrighter |
|
2237 |
translateLabel: true |
|
1649 | 2238 |
) |
1882 | 2239 |
(MenuItem |
2240 |
label: 'Make Darker' |
|
2241 |
itemValue: makeDarker |
|
2242 |
translateLabel: true |
|
1649 | 2243 |
) |
1882 | 2244 |
(MenuItem |
2245 |
label: 'Make Inverse' |
|
2246 |
itemValue: makeInverse |
|
2247 |
translateLabel: true |
|
1649 | 2248 |
) |
1882 | 2249 |
(MenuItem |
2250 |
label: '-' |
|
1649 | 2251 |
) |
1882 | 2252 |
(MenuItem |
2253 |
label: 'Change HLS...' |
|
2254 |
itemValue: changeHLS |
|
2255 |
translateLabel: true |
|
1649 | 2256 |
) |
2257 |
) |
|
2258 |
nil |
|
2259 |
nil |
|
2260 |
) |
|
1436 | 2261 |
) |
1882 | 2262 |
(MenuItem |
2263 |
label: 'Mask' |
|
2264 |
translateLabel: true |
|
2265 |
submenu: |
|
2266 |
(Menu |
|
2267 |
( |
|
2268 |
(MenuItem |
|
2269 |
activeHelpKey: copyMask |
|
2270 |
enabled: hasMask |
|
2271 |
label: 'Copy Mask' |
|
2272 |
itemValue: copyMask |
|
2273 |
translateLabel: true |
|
1649 | 2274 |
) |
1882 | 2275 |
(MenuItem |
2276 |
activeHelpKey: pasteMask |
|
2277 |
enabled: hasMask |
|
2278 |
label: 'Paste Mask' |
|
2279 |
itemValue: pasteMask |
|
2280 |
translateLabel: true |
|
1649 | 2281 |
) |
1882 | 2282 |
(MenuItem |
1924 | 2283 |
enabled: hasMask |
1882 | 2284 |
label: 'Clear Masked Pixels' |
2285 |
itemValue: clearMaskedPixels |
|
2286 |
translateLabel: true |
|
1649 | 2287 |
) |
2288 |
) |
|
2289 |
nil |
|
2290 |
nil |
|
2291 |
) |
|
1598 | 2292 |
) |
1124 | 2293 |
) |
2294 |
nil |
|
2295 |
nil |
|
756 | 2296 |
) |
1124 | 2297 |
) |
1882 | 2298 |
(MenuItem |
2299 |
label: 'Settings' |
|
2300 |
translateLabel: true |
|
2301 |
submenu: |
|
2302 |
(Menu |
|
2303 |
( |
|
2304 |
(MenuItem |
|
2305 |
activeHelpKey: settingsGridMagnification |
|
2306 |
label: 'Grid Magnification Limit...' |
|
2307 |
itemValue: doChangeGridMagnification |
|
2308 |
translateLabel: true |
|
1124 | 2309 |
) |
2310 |
) |
|
2311 |
nil |
|
2312 |
nil |
|
400 | 2313 |
) |
1124 | 2314 |
) |
1882 | 2315 |
(MenuItem |
2316 |
label: 'History' |
|
2317 |
translateLabel: true |
|
1975 | 2318 |
isVisible: isStandAlone |
1882 | 2319 |
submenuChannel: menuHistory |
1124 | 2320 |
) |
1882 | 2321 |
(MenuItem |
2322 |
label: 'Help' |
|
2323 |
translateLabel: true |
|
2324 |
startGroup: right |
|
2325 |
submenuChannel: menuHelp |
|
1124 | 2326 |
) |
2327 |
) |
|
2328 |
nil |
|
2329 |
nil |
|
400 | 2330 |
) |
2331 |
! |
|
2332 |
||
679 | 2333 |
menuMouseButtonColors |
737 | 2334 |
"This resource specification was automatically generated |
2335 |
by the MenuEditor of ST/X." |
|
679 | 2336 |
|
737 | 2337 |
"Do not manually edit this!! If it is corrupted, |
2338 |
the MenuEditor may not be able to read the specification." |
|
679 | 2339 |
|
2340 |
" |
|
2341 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2342 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2343 |
" |
|
2344 |
||
2345 |
<resource: #menu> |
|
2346 |
||
2347 |
^ |
|
2348 |
||
2349 |
#(#Menu |
|
2350 |
||
2351 |
#( |
|
2352 |
#(#MenuItem |
|
2353 |
#label: 'Left Mouse Button' |
|
2354 |
#nameKey: #leftMouseKeyButton |
|
2355 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2356 |
#enabled: #imageIsLoaded |
679 | 2357 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2358 |
#choice: #mouseKeyColorMode |
2359 |
#choiceValue: 1 |
|
679 | 2360 |
) |
2361 |
#(#MenuItem |
|
2362 |
#label: 'Right Mouse Button' |
|
2363 |
#nameKey: #rightMouseKeyButton |
|
2364 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2365 |
#enabled: #imageIsLoaded |
679 | 2366 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2367 |
#choice: #mouseKeyColorMode |
2368 |
#choiceValue: 2 |
|
679 | 2369 |
) |
2370 |
) nil |
|
2371 |
nil |
|
2372 |
) |
|
2373 |
! |
|
2374 |
||
400 | 2375 |
menuToolbar |
737 | 2376 |
"This resource specification was automatically generated |
2377 |
by the MenuEditor of ST/X." |
|
400 | 2378 |
|
737 | 2379 |
"Do not manually edit this!! If it is corrupted, |
2380 |
the MenuEditor may not be able to read the specification." |
|
400 | 2381 |
|
2382 |
" |
|
2383 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
2384 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
2385 |
" |
|
2386 |
||
2387 |
<resource: #menu> |
|
2388 |
||
1196 | 2389 |
^ |
1820 | 2390 |
#(Menu |
2391 |
( |
|
2392 |
(MenuItem |
|
2393 |
activeHelpKey: fileNewImage |
|
2394 |
label: 'newImage' |
|
2395 |
itemValue: doNewImage |
|
2396 |
translateLabel: true |
|
2397 |
isButton: true |
|
1883 | 2398 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 2399 |
) |
1820 | 2400 |
(MenuItem |
1949 | 2401 |
label: '-' |
2402 |
) |
|
2403 |
(MenuItem |
|
1970 | 2404 |
activeHelpKey: fileLoadFromClass |
2405 |
label: 'loadFromClass' |
|
2406 |
itemValue: doLoadFromClass |
|
2407 |
translateLabel: true |
|
2408 |
isButton: true |
|
1975 | 2409 |
isVisible: isStandAlone |
1970 | 2410 |
submenuChannel: menuHistory |
2411 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon) |
|
2412 |
keepLinkedMenu: true |
|
2413 |
) |
|
2414 |
(MenuItem |
|
2415 |
activeHelpKey: fileSaveMethod |
|
2416 |
enabled: imageIsLoaded |
|
2417 |
label: 'saveAsMethod' |
|
2418 |
itemValue: doSaveMethodAs |
|
2419 |
translateLabel: true |
|
2420 |
isButton: true |
|
1975 | 2421 |
isVisible: isStandAlone |
1970 | 2422 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
2423 |
) |
|
2424 |
(MenuItem |
|
2425 |
activeHelpKey: fileSaveMethod |
|
2426 |
enabled: imageIsLoaded |
|
2427 |
label: 'saveAsMethod' |
|
2428 |
itemValue: doSaveMethod |
|
2429 |
translateLabel: true |
|
2430 |
isButton: true |
|
1975 | 2431 |
isVisible: isNotStandAlone |
1970 | 2432 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
2433 |
) |
|
2434 |
(MenuItem |
|
2435 |
label: '-' |
|
2436 |
) |
|
2437 |
(MenuItem |
|
1820 | 2438 |
activeHelpKey: fileLoadFromFile |
2439 |
label: 'loadFromFile' |
|
2440 |
itemValue: doLoadFromFile |
|
2441 |
translateLabel: true |
|
2442 |
isButton: true |
|
1884 | 2443 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 2444 |
) |
2445 |
(MenuItem |
|
2446 |
activeHelpKey: fileSaveAs |
|
2447 |
enabled: imageIsLoaded |
|
2448 |
label: 'saveAsFile' |
|
2449 |
itemValue: doSaveImageFileAs |
|
2450 |
translateLabel: true |
|
2451 |
isButton: true |
|
1885 | 2452 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 2453 |
) |
2454 |
(MenuItem |
|
1949 | 2455 |
label: '-' |
1196 | 2456 |
) |
1820 | 2457 |
(MenuItem |
2458 |
activeHelpKey: editUndo |
|
2459 |
enabled: valueOfCanUndo |
|
2460 |
label: 'Undo' |
|
2461 |
itemValue: doUndo |
|
2462 |
translateLabel: true |
|
2463 |
isButton: true |
|
1883 | 2464 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 2465 |
) |
1637 | 2466 |
) |
2467 |
nil |
|
2468 |
nil |
|
2469 |
) |
|
2470 |
! |
|
2471 |
||
2472 |
modeMenu |
|
2473 |
"This resource specification was automatically generated |
|
2474 |
by the MenuEditor of ST/X." |
|
2475 |
||
2476 |
"Do not manually edit this!! If it is corrupted, |
|
2477 |
the MenuEditor may not be able to read the specification." |
|
2478 |
||
2479 |
" |
|
2480 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
2481 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
2482 |
" |
|
2483 |
||
2484 |
<resource: #menu> |
|
2485 |
||
2486 |
^ |
|
2487 |
#(#Menu |
|
2488 |
#( |
|
1196 | 2489 |
#(#MenuItem |
2490 |
#activeHelpKey: #drawModePoint |
|
2491 |
#enabled: #imageIsLoaded |
|
1637 | 2492 |
#label: 'Point' |
2493 |
#translateLabel: true |
|
1196 | 2494 |
#choice: #editMode |
2495 |
#choiceValue: #point |
|
2496 |
) |
|
2497 |
#(#MenuItem |
|
2498 |
#activeHelpKey: #drawModeBox |
|
2499 |
#enabled: #imageIsLoaded |
|
1637 | 2500 |
#label: 'Rect' |
2501 |
#translateLabel: true |
|
1196 | 2502 |
#choice: #editMode |
2503 |
#choiceValue: #box |
|
2504 |
) |
|
2505 |
#(#MenuItem |
|
2506 |
#activeHelpKey: #drawModeFilledBox |
|
2507 |
#enabled: #imageIsLoaded |
|
1656 | 2508 |
#label: 'Filled Rectangle' |
1637 | 2509 |
#translateLabel: true |
1196 | 2510 |
#choice: #editMode |
2511 |
#choiceValue: #filledBox |
|
2512 |
) |
|
2513 |
#(#MenuItem |
|
2514 |
#activeHelpKey: #drawModeFill |
|
2515 |
#enabled: #imageIsLoaded |
|
1637 | 2516 |
#label: 'Fill' |
2517 |
#translateLabel: true |
|
1196 | 2518 |
#choice: #editMode |
2519 |
#choiceValue: #fill |
|
2520 |
) |
|
2521 |
#(#MenuItem |
|
2522 |
#activeHelpKey: #drawModeCopy |
|
2523 |
#enabled: #imageIsLoaded |
|
1637 | 2524 |
#label: 'Copy' |
2525 |
#translateLabel: true |
|
1196 | 2526 |
#choice: #editMode |
2527 |
#choiceValue: #copy |
|
2528 |
) |
|
2529 |
#(#MenuItem |
|
2530 |
#activeHelpKey: #drawModePaste |
|
2531 |
#enabled: #imageIsLoaded |
|
1637 | 2532 |
#label: 'Paste' |
2533 |
#translateLabel: true |
|
1196 | 2534 |
#choice: #editMode |
2535 |
#choiceValue: #paste |
|
2536 |
) |
|
2537 |
#(#MenuItem |
|
2538 |
#activeHelpKey: #drawModePasteUnder |
|
2539 |
#enabled: #imageIsLoaded |
|
1637 | 2540 |
#label: 'Paste Under' |
2541 |
#translateLabel: true |
|
1196 | 2542 |
#choice: #editMode |
2543 |
#choiceValue: #pasteUnder |
|
2544 |
) |
|
1411 | 2545 |
#(#MenuItem |
1579 | 2546 |
#activeHelpKey: #drawModePasteWithMask |
2547 |
#enabled: #imageIsLoaded |
|
1656 | 2548 |
#label: 'Paste with Mask' |
1637 | 2549 |
#translateLabel: true |
1579 | 2550 |
#choice: #editMode |
2551 |
#choiceValue: #pasteWithMask |
|
2552 |
) |
|
2553 |
#(#MenuItem |
|
1411 | 2554 |
#activeHelpKey: #drawModeSpecial |
2555 |
#enabled: #imageIsLoaded |
|
1637 | 2556 |
#label: 'Special' |
2557 |
#translateLabel: true |
|
1411 | 2558 |
#choice: #editMode |
2559 |
#choiceValue: #specialOperation |
|
2560 |
) |
|
1196 | 2561 |
) |
2562 |
nil |
|
2563 |
nil |
|
400 | 2564 |
) |
1558 | 2565 |
! |
2566 |
||
2567 |
previewMenu |
|
2568 |
"This resource specification was automatically generated |
|
2569 |
by the MenuEditor of ST/X." |
|
2570 |
||
2571 |
"Do not manually edit this!! If it is corrupted, |
|
2572 |
the MenuEditor may not be able to read the specification." |
|
2573 |
||
2574 |
" |
|
2575 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
2576 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
2577 |
" |
|
2578 |
||
2579 |
<resource: #menu> |
|
2580 |
||
2581 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2582 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2583 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2584 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2585 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2586 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2587 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2588 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2589 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2590 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2591 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2592 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2593 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2594 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2595 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2596 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2597 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2598 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2599 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2600 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2601 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2602 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2603 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2604 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2605 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2606 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2607 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2608 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2609 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2610 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2611 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2612 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2613 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2614 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2615 |
) |
1774 | 2616 |
(MenuItem |
2617 |
label: '-' |
|
2618 |
) |
|
2619 |
(MenuItem |
|
2620 |
label: 'Red' |
|
2621 |
translateLabel: true |
|
2622 |
choice: previewBackgroundColor |
|
2623 |
choiceValue: red |
|
2624 |
) |
|
2625 |
(MenuItem |
|
2626 |
label: 'Green' |
|
2627 |
translateLabel: true |
|
2628 |
choice: previewBackgroundColor |
|
2629 |
choiceValue: green |
|
2630 |
) |
|
2631 |
(MenuItem |
|
2632 |
label: 'Blue' |
|
2633 |
translateLabel: true |
|
2634 |
choice: previewBackgroundColor |
|
2635 |
choiceValue: blue |
|
2636 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2637 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2638 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2639 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2640 |
) |
1558 | 2641 |
) |
2642 |
) |
|
2643 |
nil |
|
2644 |
nil |
|
2645 |
) |
|
1637 | 2646 |
! |
2647 |
||
2648 |
toolsMenuToolbar |
|
2649 |
"This resource specification was automatically generated |
|
2650 |
by the MenuEditor of ST/X." |
|
2651 |
||
2652 |
"Do not manually edit this!! If it is corrupted, |
|
2653 |
the MenuEditor may not be able to read the specification." |
|
2654 |
||
2655 |
" |
|
2656 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
2657 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
2658 |
" |
|
2659 |
||
2660 |
<resource: #menu> |
|
2661 |
||
2662 |
^ |
|
2663 |
#(#Menu |
|
2664 |
#( |
|
2665 |
#(#MenuItem |
|
2666 |
#activeHelpKey: #drawModePoint |
|
2667 |
#enabled: #imageIsLoaded |
|
2668 |
#label: 'Point' |
|
2669 |
#translateLabel: true |
|
2670 |
#isButton: true |
|
2671 |
#labelImage: #(#ResourceRetriever #ImageEditor #pointIcon) |
|
2672 |
#choice: #editMode |
|
2673 |
#choiceValue: #point |
|
2674 |
) |
|
2675 |
#(#MenuItem |
|
2676 |
#activeHelpKey: #drawModeBox |
|
2677 |
#enabled: #imageIsLoaded |
|
2678 |
#label: 'Rect' |
|
2679 |
#translateLabel: true |
|
2680 |
#isButton: true |
|
2681 |
#labelImage: #(#ResourceRetriever #ImageEditor #rectIcon) |
|
2682 |
#choice: #editMode |
|
2683 |
#choiceValue: #box |
|
2684 |
) |
|
2685 |
#(#MenuItem |
|
2686 |
#activeHelpKey: #drawModeFilledBox |
|
2687 |
#enabled: #imageIsLoaded |
|
2688 |
#label: 'FillRect' |
|
2689 |
#translateLabel: true |
|
2690 |
#isButton: true |
|
2691 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon) |
|
2692 |
#choice: #editMode |
|
2693 |
#choiceValue: #filledBox |
|
2694 |
) |
|
2695 |
#(#MenuItem |
|
2696 |
#activeHelpKey: #drawModeFill |
|
2697 |
#enabled: #imageIsLoaded |
|
2698 |
#label: 'Fill' |
|
2699 |
#translateLabel: true |
|
2700 |
#isButton: true |
|
2701 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillIcon) |
|
2702 |
#choice: #editMode |
|
2703 |
#choiceValue: #fill |
|
2704 |
) |
|
2705 |
#(#MenuItem |
|
2706 |
#activeHelpKey: #drawModeCopy |
|
2707 |
#enabled: #imageIsLoaded |
|
2708 |
#label: 'Copy' |
|
2709 |
#translateLabel: true |
|
2710 |
#isButton: true |
|
2711 |
#labelImage: #(#ResourceRetriever #ImageEditor #copyIcon) |
|
2712 |
#choice: #editMode |
|
2713 |
#choiceValue: #copy |
|
2714 |
) |
|
2715 |
#(#MenuItem |
|
2716 |
#activeHelpKey: #drawModePaste |
|
2717 |
#enabled: #imageIsLoaded |
|
2718 |
#label: 'Paste' |
|
2719 |
#translateLabel: true |
|
2720 |
#isButton: true |
|
2721 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon) |
|
2722 |
#choice: #editMode |
|
2723 |
#choiceValue: #paste |
|
2724 |
) |
|
2725 |
#(#MenuItem |
|
2726 |
#activeHelpKey: #drawModePasteUnder |
|
2727 |
#enabled: #imageIsLoaded |
|
2728 |
#label: 'Paste Under' |
|
2729 |
#translateLabel: true |
|
2730 |
#isButton: true |
|
2731 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon) |
|
2732 |
#choice: #editMode |
|
2733 |
#choiceValue: #pasteUnder |
|
2734 |
) |
|
2735 |
#(#MenuItem |
|
2736 |
#activeHelpKey: #drawModePasteWithMask |
|
2737 |
#enabled: #imageIsLoaded |
|
2738 |
#label: 'Paste With Mask' |
|
2739 |
#translateLabel: true |
|
2740 |
#isButton: true |
|
2741 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon) |
|
2742 |
#choice: #editMode |
|
2743 |
#choiceValue: #pasteWithMask |
|
2744 |
) |
|
2745 |
#(#MenuItem |
|
2746 |
#activeHelpKey: #drawModeSpecial |
|
2747 |
#enabled: #imageIsLoaded |
|
2748 |
#label: 'Special' |
|
2749 |
#translateLabel: true |
|
2750 |
#isButton: true |
|
2751 |
#labelImage: #(#ResourceRetriever #ImageEditor #specialIcon) |
|
2752 |
#choice: #editMode |
|
2753 |
#choiceValue: #specialOperation |
|
2754 |
) |
|
2755 |
) |
|
2756 |
nil |
|
2757 |
nil |
|
2758 |
) |
|
400 | 2759 |
! ! |
2760 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2761 |
!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
|
2762 |
|
1900 | 2763 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2764 |
"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
|
2765 |
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
|
2766 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2767 |
"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
|
2768 |
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
|
2769 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2770 |
" |
1975 | 2771 |
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
|
2772 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2773 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2774 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2775 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2776 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2777 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2778 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2779 |
rendererType: rowSelector |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2780 |
backgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2781 |
selectedBackgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2782 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2783 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2784 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2785 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2786 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2787 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2788 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2789 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2790 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2791 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2792 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2793 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2794 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2795 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2796 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2797 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2798 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2799 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2800 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2801 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2802 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2803 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2804 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2805 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2806 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2807 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2808 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2809 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2810 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2811 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2812 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2813 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2814 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2815 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2816 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2817 |
) |
1975 | 2818 |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2819 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2820 |
|
400 | 2821 |
!ImageEditor methodsFor:'accessing'! |
2822 |
||
2823 |
image |
|
767 | 2824 |
"returns the current editing image" |
400 | 2825 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2826 |
^ imageEditView image |
400 | 2827 |
! |
2828 |
||
2829 |
postOpenAction: anAction |
|
767 | 2830 |
"sets an action which is evaluated after opening" |
400 | 2831 |
|
2832 |
postOpenAction := anAction |
|
1381 | 2833 |
! |
2834 |
||
2835 |
resourceClass:aClass |
|
2836 |
imageEditView resourceClass:aClass |
|
400 | 2837 |
! ! |
2838 |
||
1398 | 2839 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 2840 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2841 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2842 |
"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
|
2843 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2844 |
^(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
|
2845 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2846 |
"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
|
2847 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2848 |
|
487 | 2849 |
coordLabel |
767 | 2850 |
"returns the view the coord label" |
487 | 2851 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2852 |
^self componentAt: #coordLabel |
487 | 2853 |
! |
2854 |
||
400 | 2855 |
imageEditView |
911 | 2856 |
"returns the view of the image" |
400 | 2857 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2858 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2859 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2860 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2861 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2862 |
^ imageEditView |
1345 | 2863 |
|
2864 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 2865 |
! |
2866 |
||
2867 |
imagePreView |
|
767 | 2868 |
"returns the preview of the image" |
400 | 2869 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2870 |
^ (self componentAt: #imagePreView) subViews first |
475 | 2871 |
! ! |
2872 |
||
400 | 2873 |
!ImageEditor methodsFor:'aspects'! |
2874 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2875 |
activityInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2876 |
^ self valueOfInfoLabel |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2877 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2878 |
"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
|
2879 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2880 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2881 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2882 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2883 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2884 |
"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
|
2885 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2886 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2887 |
hasClassAndSelectorDefined |
1054 | 2888 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
2889 |
|cls| |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
2890 |
|
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
2891 |
(cls := imageEditView resourceClass) notNil |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
2892 |
and:[imageEditView resourceSelector notNil] |
1054 | 2893 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2894 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2895 |
"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
|
2896 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2897 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2898 |
hasClassDefined |
1054 | 2899 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
2900 |
imageEditView resourceClass notNil |
1054 | 2901 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2902 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2903 |
"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
|
2904 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2905 |
|
1008 | 2906 |
hasColormap |
2907 |
^ [self image notNil and:[self image colorMap notNil]] |
|
2908 |
||
2909 |
"Created: / 30.9.1998 / 23:53:55 / cg" |
|
2910 |
! |
|
2911 |
||
1924 | 2912 |
hasNoColormap |
2913 |
^ [self image notNil and:[self image colorMap isNil]] |
|
2914 |
||
2915 |
"Created: / 30.9.1998 / 23:53:55 / cg" |
|
2916 |
! |
|
2917 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2918 |
imageHasNextImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2919 |
"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
|
2920 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2921 |
^ [self image notNil |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2922 |
and:[self image imageSequence notNil]] |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2923 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2924 |
"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
|
2925 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2926 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2927 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2928 |
|holder| |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2929 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2930 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2931 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2932 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2933 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2934 |
"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
|
2935 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2936 |
|
400 | 2937 |
imageIsLoaded |
767 | 2938 |
"returns whether an image is loaded as value holder" |
400 | 2939 |
|
2940 |
|holder| |
|
2941 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
2942 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
2943 |
]. |
|
2944 |
^ holder |
|
2945 |
! |
|
2946 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2947 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2948 |
"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
|
2949 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2950 |
^ [self hasClassAndSelectorDefined value |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2951 |
and:[self imageIsLoaded value]] |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2952 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2953 |
"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
|
2954 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2955 |
|
400 | 2956 |
listOfColors |
1896 | 2957 |
"returns the list of colors" |
2958 |
||
2959 |
|list| |
|
2960 |
||
2961 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
2962 |
builder aspectAt:#listOfColors put:(list := List new). |
|
2963 |
list addDependent:self. |
|
400 | 2964 |
]. |
1896 | 2965 |
^ list |
400 | 2966 |
! |
2967 |
||
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2968 |
previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2969 |
|holder| |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2970 |
(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
|
2971 |
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
|
2972 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2973 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2974 |
^ holder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2975 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2976 |
|
400 | 2977 |
selectionOfColor |
1682 | 2978 |
"returns a valueHolder for the current selection of the edit color. |
2979 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 2980 |
|
2981 |
|holder| |
|
1682 | 2982 |
|
400 | 2983 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
2984 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 2985 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 2986 |
]. |
2987 |
^ holder |
|
2988 |
! |
|
2989 |
||
1558 | 2990 |
tileModeHolder |
2991 |
|holder| |
|
2992 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
|
2993 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
2994 |
holder addDependent:self. |
|
2995 |
]. |
|
2996 |
^ holder |
|
2997 |
! |
|
2998 |
||
400 | 2999 |
valueOfMagnification |
767 | 3000 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 3001 |
|
3002 |
|holder| |
|
3003 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
3004 |
builder aspectAt:#valueOfMagnification put:( |
|
3005 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
3006 |
]. |
|
3007 |
^ holder |
|
3008 |
! ! |
|
3009 |
||
767 | 3010 |
!ImageEditor methodsFor:'change & update'! |
3011 |
||
3012 |
findColorMapMode |
|
899 | 3013 |
"finds the colorMapMode for a new image" |
767 | 3014 |
|
1927 | 3015 |
|image listOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 3016 |
|
3017 |
image := self image. |
|
1975 | 3018 |
image isNil ifTrue:[^ self ]. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3019 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3020 |
image mask notNil ifTrue: [ |
1896 | 3021 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3022 |
] ifFalse:[ |
1896 | 3023 |
colorMapModeKey := 'depth'. |
1054 | 3024 |
]. |
1896 | 3025 |
colorMapModeKey := colorMapModeKey , image depth printString. |
1967 | 3026 |
self colorMapMode setValue:colorMapModeKey. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3027 |
|
1904 | 3028 |
listOfColors := self listOfColors. |
1928 | 3029 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3030 |
image depth > 12 ifTrue:[ |
1904 | 3031 |
listOfColors removeAll. |
3032 |
image colorMap isEmptyOrNil ifTrue:[ |
|
1927 | 3033 |
someOrAllUsedColors := image usedColorsMax:10000. |
1928 | 3034 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
1939 | 3035 |
someOrAllUsedColors sort:self sortBlockForColors. |
1927 | 3036 |
listOfColors addAll:someOrAllUsedColors. |
3037 |
"/ listOfColors add:Color black; add:Color white. |
|
1904 | 3038 |
] ifFalse:[ |
3039 |
listOfColors addAll:(image colorMap). |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3040 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3041 |
] ifFalse:[ |
1904 | 3042 |
listOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3043 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3044 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3045 |
]. |
767 | 3046 |
]. |
1904 | 3047 |
drawColor1 := listOfColors at:1. |
3048 |
drawColor2 := listOfColors at:2 ifAbsent:drawColor1. |
|
1054 | 3049 |
|
1900 | 3050 |
self hasMask ifTrue: [ |
1896 | 3051 |
(listOfColors contains: [:clr| clr = (Color colorId:0)]) |
3052 |
ifFalse:[ |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3053 |
listOfColors addFirst:(Color colorId:0). |
1904 | 3054 |
drawColor1 := listOfColors at:2. |
3055 |
drawColor2 := listOfColors at:3 ifAbsent:drawColor1. |
|
898 | 3056 |
] |
767 | 3057 |
]. |
1904 | 3058 |
|
3059 |
imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
|
3060 |
||
1054 | 3061 |
self selectionOfColor |
1446 | 3062 |
setValue: 0; |
1904 | 3063 |
value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 3064 |
! |
3065 |
||
942 | 3066 |
update:something with:aParameter from:changedObject |
1928 | 3067 |
|clrIndex img clr changedColor| |
1436 | 3068 |
|
3069 |
img := self image. |
|
1558 | 3070 |
|
3071 |
changedObject == self tileModeHolder ifTrue:[ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3072 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3073 |
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
|
3074 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3075 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3076 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3077 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3078 |
changedObject == self previewBackgroundColor ifTrue:[ |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3079 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3080 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3081 |
ifFalse:[Color perform:changedObject value]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3082 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3083 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3084 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3085 |
invalidate. |
1558 | 3086 |
^ self |
3087 |
]. |
|
3088 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3089 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3090 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3091 |
"/ colormap entry changed at aParameter |
960 | 3092 |
|
3093 |
clrIndex := aParameter. |
|
3094 |
(self hasMask) ifTrue:[ |
|
3095 |
clrIndex := clrIndex - 1. |
|
3096 |
]. |
|
1928 | 3097 |
changedColor := changedObject at:aParameter. |
3098 |
img colorMap notNil ifTrue:[ |
|
3099 |
img colorMap at:clrIndex put:changedColor. |
|
3100 |
self colorMapChanged. |
|
3101 |
] ifFalse:[ |
|
3102 |
drawingColormap notNil ifTrue:[ |
|
3103 |
drawingColormap at:clrIndex put:changedColor. |
|
3104 |
]. |
|
3105 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3106 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3107 |
]. |
1896 | 3108 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3109 |
]. |
1124 | 3110 |
|
3111 |
changedObject == imageEditView undoImages ifTrue:[ |
|
3112 |
self valueOfCanUndo value:(changedObject notEmpty). |
|
3113 |
^ self. |
|
3114 |
]. |
|
3115 |
||
1345 | 3116 |
changedObject == imageEditView ifTrue:[ |
3117 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3118 |
self updateListOfColorsAndColormapMode. |
1345 | 3119 |
^ self. |
3120 |
]. |
|
3121 |
something == #image ifTrue:[ |
|
1436 | 3122 |
self imagePreView image:img. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3123 |
self updateListOfColorsAndColormapMode. |
1558 | 3124 |
self tileModeHolder value ifTrue:[ |
3125 |
self imagePreView tileMode:true tileOffset:(img extent). |
|
3126 |
]. |
|
1345 | 3127 |
^ self. |
3128 |
]. |
|
3129 |
something == #subImageIn ifTrue:[ |
|
1436 | 3130 |
self imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3131 |
self error:'internal error' mayProceed:true. |
1406 | 3132 |
]. |
1558 | 3133 |
self tileModeHolder value ifTrue:[ |
3134 |
self imagePreView invalidate. |
|
3135 |
] ifFalse:[ |
|
3136 |
self imagePreView invalidate:aParameter. |
|
3137 |
]. |
|
1345 | 3138 |
^ self. |
3139 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3140 |
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
|
3141 |
(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
|
3142 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3143 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3144 |
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
|
3145 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3146 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3147 |
]. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3148 |
self selectionOfColor value:clrIndex. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3149 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3150 |
]. |
1345 | 3151 |
^ self. |
3152 |
]. |
|
3153 |
||
1880 | 3154 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
3155 |
"/ self halt:'to be implemented'. |
|
3156 |
^ self |
|
3157 |
]. |
|
3158 |
||
1345 | 3159 |
changedObject == imageEditView image ifTrue:[ |
1377 | 3160 |
self halt:'to be implemented'. |
1345 | 3161 |
^ self. |
3162 |
]. |
|
3163 |
||
942 | 3164 |
super update:something with:aParameter from:changedObject |
3165 |
||
1345 | 3166 |
"Modified: / 10.2.2000 / 23:36:49 / cg" |
942 | 3167 |
! |
3168 |
||
1900 | 3169 |
updateColorsFromImage:image |
3170 |
|colors| |
|
3171 |
||
1904 | 3172 |
colors := image colorMap. |
3173 |
colors isNil ifTrue:[ |
|
1906 | 3174 |
Error handle:[:ex | |
3175 |
colors := OrderedCollection new. |
|
3176 |
] do:[ |
|
3177 |
colors := image usedColors asSet. |
|
3178 |
] |
|
1900 | 3179 |
]. |
1904 | 3180 |
self listOfColors contents:(colors asOrderedCollection). |
1900 | 3181 |
! |
3182 |
||
1054 | 3183 |
updateForNoImage |
767 | 3184 |
"updates channels and view, if image is loaded" |
3185 |
||
3186 |
self imageIsLoaded value: false. |
|
3187 |
self listOfColors removeAll. |
|
3188 |
self imagePreView image: nil |
|
3189 |
||
3190 |
||
3191 |
||
3192 |
||
3193 |
! |
|
3194 |
||
3195 |
updateLabelsAndHistory |
|
3196 |
"updates labels and history, if something has changed" |
|
3197 |
||
1910 | 3198 |
|image| |
3199 |
||
3200 |
image := self image. |
|
3201 |
||
3202 |
self imageIsLoaded value: image notNil. |
|
3203 |
image isNil ifTrue: [^nil]. |
|
767 | 3204 |
|
3205 |
self updateInfoLabel. |
|
3206 |
||
1975 | 3207 |
imageEditView resourceClass notNil ifTrue:[ |
3208 |
imageEditView resourceSelector notNil ifTrue:[ |
|
3209 |
self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector. |
|
3210 |
] |
|
3211 |
]. |
|
3212 |
||
3213 |
image fileName notNil ifTrue: [ |
|
3214 |
self addHistoryEntryForFile:image fileName. |
|
3215 |
]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3216 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3217 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3218 |
updateListOfColorsAndColormapMode |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3219 |
|colorMap image| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3220 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3221 |
image := self image. |
1975 | 3222 |
image isNil ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3223 |
self listOfColors removeAll. |
1975 | 3224 |
] ifFalse:[ |
3225 |
colorMap := image colorMap. |
|
3226 |
colorMap size <= 4096 ifTrue:[ |
|
3227 |
self listOfColors contents:colorMap. |
|
3228 |
] ifFalse:[ |
|
3229 |
self listOfColors removeAll. |
|
3230 |
colorMap isFixedPalette ifTrue:[ |
|
3231 |
image colorMap:nil. |
|
3232 |
image photometric:#rgb. |
|
3233 |
image samplesPerPixel:3. |
|
3234 |
||
3235 |
image bitsPerSample:(Array |
|
3236 |
with:(colorMap bitsRed) |
|
3237 |
with:(colorMap bitsGreen) |
|
3238 |
with:(colorMap bitsBlue)). |
|
3239 |
]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3240 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3241 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3242 |
self findColorMapMode. |
767 | 3243 |
! ! |
3244 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3245 |
!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
|
3246 |
|
1951 | 3247 |
atColor:anOldColor put:newColor |
1952 | 3248 |
"a color changed to a new color" |
3249 |
||
1930 | 3250 |
|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
|
3251 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3252 |
list := self listOfColors. |
1951 | 3253 |
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
|
3254 |
|
1930 | 3255 |
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
|
3256 |
index ~~ 0 ifTrue:[ |
1928 | 3257 |
oldColor := list at:index. |
3258 |
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
|
3259 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3260 |
self error:'internal error' mayProceed:true. |
1928 | 3261 |
list add:newColor |
3262 |
]. |
|
3263 |
||
3264 |
image := self image. |
|
3265 |
(image colorMap isNil |
|
3266 |
and:[drawingColormap isNil]) ifTrue:[ |
|
3267 |
oldColor notNil ifTrue:[ |
|
3268 |
imageEditView makeUndo. |
|
3269 |
newImage := image copy. |
|
3270 |
newImage |
|
3271 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
3272 |
do:[:x :y :clr | |
|
3273 |
|newClr| |
|
3274 |
||
1951 | 3275 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 3276 |
newImage colorAtX:x y:y put:newClr |
3277 |
]. |
|
3278 |
imageEditView image:newImage. |
|
3279 |
imageEditView setModified. |
|
3280 |
self updateImage. |
|
3281 |
self updateImagePreView. |
|
1930 | 3282 |
|
3283 |
self selectionOfColor value:oldSel. |
|
3284 |
imageEditView selectedColorIndex:oldSel. |
|
3285 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 3286 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3287 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3288 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3289 |
|
942 | 3290 |
blueAtColor:aColor put:newBlue |
3291 |
"helper used to return a new row element, when blue is changed" |
|
3292 |
||
3293 |
|byte| |
|
3294 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3295 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3296 |
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
|
3297 |
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
|
3298 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3299 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3300 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 3301 |
! |
3302 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3303 |
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
|
3304 |
"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
|
3305 |
|
930 | 3306 |
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
|
3307 |
^ 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
|
3308 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3309 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 3310 |
"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
|
3311 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3312 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3313 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3314 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3315 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3316 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3317 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3318 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3319 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3320 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3321 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3322 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3323 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3324 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3325 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3326 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3327 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3328 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3329 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3330 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3331 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3332 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3333 |
|
942 | 3334 |
greenAtColor:aColor put:newGreen |
3335 |
"helper used to return a new row element, when green is changed" |
|
3336 |
||
3337 |
|byte| |
|
3338 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3339 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3340 |
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
|
3341 |
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
|
3342 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3343 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3344 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 3345 |
! |
3346 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3347 |
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
|
3348 |
"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
|
3349 |
|
930 | 3350 |
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
|
3351 |
^ 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
|
3352 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3353 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 3354 |
"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
|
3355 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3356 |
|
942 | 3357 |
redAtColor:aColor put:newRed |
3358 |
"helper used to return a new row element, when red is changed" |
|
3359 |
||
3360 |
|byte| |
|
3361 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3362 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3363 |
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
|
3364 |
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
|
3365 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3366 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3367 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 3368 |
! |
3369 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3370 |
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
|
3371 |
"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
|
3372 |
|
930 | 3373 |
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
|
3374 |
^ 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
|
3375 |
|
930 | 3376 |
"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
|
3377 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3378 |
|
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3379 |
theColorItSelf:aColor |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3380 |
^ 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
|
3381 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3382 |
|
672 | 3383 |
!ImageEditor methodsFor:'help'! |
3384 |
||
3385 |
defaultInfoLabel |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3386 |
"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
|
3387 |
some widget with a help text." |
672 | 3388 |
|
1966 | 3389 |
|resourceClass resourceSelector| |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3390 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3391 |
resourceClass := imageEditView resourceClass. |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3392 |
resourceClass notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3393 |
resourceSelector := imageEditView resourceSelector. |
1966 | 3394 |
resourceSelector notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3395 |
^ resourceClass name, ' >> ', resourceSelector |
1966 | 3396 |
]. |
672 | 3397 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3398 |
^ 'No class and selector defined.' |
674 | 3399 |
! |
3400 |
||
702 | 3401 |
openDocumentation |
767 | 3402 |
"opens the documentation file of the Image Editor" |
674 | 3403 |
|
763 | 3404 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
3405 |
||
672 | 3406 |
! ! |
3407 |
||
767 | 3408 |
!ImageEditor methodsFor:'loading'! |
3409 |
||
1975 | 3410 |
loadFromClass:aClass andSelector:aSelector |
3411 |
"loads an image from the method specified by class and selector" |
|
3412 |
||
3413 |
self assert:(aClass isNil or:[aClass isClass]). |
|
3414 |
||
3415 |
(aClass isNil or:[aSelector]) isNil ifTrue:[ |
|
3416 |
imageEditView resourceClass:aClass. |
|
3417 |
imageEditView resourceSelector:aSelector. |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3418 |
imageEditView image:nil. |
1966 | 3419 |
^ self. |
3420 |
]. |
|
3421 |
||
1975 | 3422 |
(imageEditView resourceClass == aClass |
3423 |
and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[ |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3424 |
imageEditView modified ifFalse:[ |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3425 |
^ self. |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3426 |
]. |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3427 |
]. |
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
3428 |
|
1975 | 3429 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[ |
1966 | 3430 |
self updateAfterImageChange. |
3431 |
] |
|
1975 | 3432 |
|
3433 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
|
1966 | 3434 |
! |
3435 |
||
767 | 3436 |
loadFromFile: aFileName |
3437 |
"loads an image from aFileName and sets up color map list and other info labels" |
|
3438 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3439 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3440 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
1966 | 3441 |
self updateAfterImageChange |
767 | 3442 |
] |
3443 |
] |
|
960 | 3444 |
|
1057 | 3445 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 3446 |
! |
3447 |
||
960 | 3448 |
loadFromImage:anImage |
767 | 3449 |
"loads an image from anImage and sets up color map list and other info labels" |
3450 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3451 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3452 |
|
1057 | 3453 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3454 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3455 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3456 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3457 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
3458 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3459 |
|
1966 | 3460 |
self updateAfterImageChange. |
3461 |
"/ img notNil ifTrue:[ |
|
3462 |
"/ self updateColorsFromImage:img. |
|
3463 |
"/ self findColorMapMode. |
|
3464 |
"/ self updateLabelsAndHistory. |
|
3465 |
"/ ] ifFalse:[ |
|
3466 |
"/ self updateForNoImage |
|
3467 |
"/ ] |
|
960 | 3468 |
|
1057 | 3469 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 3470 |
! |
3471 |
||
1975 | 3472 |
loadFromOrPrepareForClass: aClass andSelector: aSelector |
767 | 3473 |
"loads an image by evaluating aMessage; |
3474 |
if no image could extract from aMessage; do set the class and the selector from |
|
3475 |
the aMessage for a saving at the end of editing" |
|
3476 |
||
1975 | 3477 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [ |
1900 | 3478 |
self updateColorsFromImage:self image. |
767 | 3479 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3480 |
] ifFalse: [ |
1975 | 3481 |
imageEditView resourceClass: aClass. |
3482 |
imageEditView resourceSelector:aSelector. |
|
767 | 3483 |
]. |
3484 |
self updateLabelsAndHistory. |
|
1057 | 3485 |
|
3486 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
1966 | 3487 |
! |
3488 |
||
3489 |
updateAfterImageChange |
|
3490 |
|img| |
|
3491 |
||
3492 |
(img := self image) notNil ifTrue:[ |
|
3493 |
img := img onDevice:device. |
|
3494 |
self updateColorsFromImage:img. |
|
3495 |
self findColorMapMode. |
|
3496 |
self updateLabelsAndHistory. |
|
3497 |
] ifFalse:[ |
|
3498 |
self updateForNoImage |
|
3499 |
] |
|
767 | 3500 |
! ! |
3501 |
||
400 | 3502 |
!ImageEditor methodsFor:'menu modes'! |
3503 |
||
975 | 3504 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3505 |
"returns the colorMapMode" |
400 | 3506 |
|
975 | 3507 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 3508 |
|
975 | 3509 |
^colorMapMode |
400 | 3510 |
! |
3511 |
||
975 | 3512 |
editMode |
3513 |
"returns editMode" |
|
400 | 3514 |
|
1054 | 3515 |
editMode isNil ifTrue: [ |
975 | 3516 |
editMode := #point asValue. |
1329 | 3517 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 3518 |
]. |
3519 |
||
3520 |
^editMode |
|
400 | 3521 |
! |
3522 |
||
975 | 3523 |
mouseKeyColorMode |
3524 |
"returns mouseKeyColorMode" |
|
400 | 3525 |
|
1345 | 3526 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 3527 |
mouseKeyColorMode := 1 asValue. |
1345 | 3528 |
mouseKeyColorMode onChangeEvaluate: [ |
3529 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
3530 |
self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor). |
|
3531 |
] |
|
956 | 3532 |
]. |
400 | 3533 |
|
975 | 3534 |
^mouseKeyColorMode |
1345 | 3535 |
|
3536 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 3537 |
! ! |
3538 |
||
1558 | 3539 |
!ImageEditor methodsFor:'private'! |
3540 |
||
1975 | 3541 |
checkModified |
3542 |
imageEditView modified value ifTrue:[ |
|
3543 |
(Dialog |
|
3544 |
confirm:(resources string:'Image was not saved. Proceed anyway ?') |
|
3545 |
yesLabel:(resources string:'Proceed') |
|
3546 |
noLabel:(resources string:'Cancel') |
|
3547 |
initialAnswer:false |
|
3548 |
) ifFalse: [^false]. |
|
3549 |
||
3550 |
imageEditView clearModified. |
|
3551 |
]. |
|
3552 |
^ true |
|
3553 |
||
3554 |
"Modified: / 29.7.1998 / 18:55:24 / cg" |
|
3555 |
! |
|
3556 |
||
1960 | 3557 |
pointFromString:aString |
3558 |
|p s x y| |
|
3559 |
||
3560 |
p := Object readFromString:aString onError:nil. |
|
1962 | 3561 |
p isPoint ifTrue:[^ p]. |
1960 | 3562 |
|
3563 |
s := aString readStream. |
|
3564 |
x := Number readFrom:s onError:nil. |
|
3565 |
x notNil ifTrue:[ |
|
3566 |
s skipSeparators. |
|
1962 | 3567 |
[s atEnd not and:[s peek isDigit not]] whileTrue:[s next]. |
1960 | 3568 |
y := Number readFrom:s onError:nil. |
1961 | 3569 |
^ x @ (y ? x) |
1960 | 3570 |
]. |
1962 | 3571 |
^ nil |
1960 | 3572 |
! |
3573 |
||
1939 | 3574 |
sortBlockForColors |
3575 |
^ [:a :b | |
|
3576 |
a redByte == b redByte ifTrue:[ |
|
3577 |
a greenByte == b greenByte ifTrue:[ |
|
3578 |
a blueByte < b blueByte |
|
3579 |
] ifFalse:[ |
|
3580 |
a greenByte < b greenByte |
|
3581 |
] |
|
3582 |
] ifFalse:[ |
|
3583 |
a redByte < b redByte |
|
3584 |
] |
|
3585 |
] |
|
3586 |
! |
|
3587 |
||
1598 | 3588 |
updateImage |
3589 |
|img| |
|
3590 |
||
3591 |
img := imageEditView image. |
|
3592 |
imageEditView image:img. |
|
3593 |
self fetchImageData. |
|
3594 |
! |
|
3595 |
||
1558 | 3596 |
updateImagePreView |
3597 |
self tileModeHolder value ifTrue:[ |
|
3598 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3599 |
]. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3600 |
self imagePreView image:self image. |
1558 | 3601 |
! ! |
3602 |
||
535 | 3603 |
!ImageEditor methodsFor:'queries'! |
3604 |
||
960 | 3605 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3606 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 3607 |
|
3608 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
3609 |
! |
|
3610 |
||
1975 | 3611 |
modified |
3612 |
^ imageEditView modified |
|
3613 |
! |
|
3614 |
||
535 | 3615 |
preferredExtent |
767 | 3616 |
"returns the preferred extent" |
535 | 3617 |
|
3618 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
|
3619 |
||
3620 |
||
3621 |
! ! |
|
3622 |
||
400 | 3623 |
!ImageEditor methodsFor:'selection'! |
3624 |
||
3625 |
magnification |
|
767 | 3626 |
"returns the magnification of the image" |
400 | 3627 |
|
911 | 3628 |
self imageEditView isNil ifTrue: [^1]. |
3629 |
^imageEditView magnification x |
|
400 | 3630 |
! |
3631 |
||
3632 |
magnification: aValue |
|
767 | 3633 |
"sets the magnification of the image" |
400 | 3634 |
|
905 | 3635 |
|magnification| |
3636 |
magnification := (aValue ? 1) asPoint. |
|
911 | 3637 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
3638 |
imageEditView magnification: magnification |
|
400 | 3639 |
! |
3640 |
||
3641 |
selectedColorIndex |
|
767 | 3642 |
"returns the index of the selected color" |
400 | 3643 |
|
3644 |
^selectedColorIndex |
|
3645 |
! |
|
3646 |
||
3647 |
selectedColorIndex: anIndex |
|
767 | 3648 |
"sets the index of the selected color" |
400 | 3649 |
|
1054 | 3650 |
|clr pixel| |
3651 |
||
3652 |
selectedColorIndex := anIndex. |
|
3653 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
|
3654 |
clr isNil ifTrue:[^ self]. |
|
3655 |
||
1075 | 3656 |
pixel := anIndex - 1. |
1054 | 3657 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
3658 |
anIndex == 1 ifTrue:[ |
|
3659 |
pixel := nil. "/ mask |
|
3660 |
] ifFalse:[ |
|
1075 | 3661 |
pixel := pixel - 1 |
1054 | 3662 |
] |
3663 |
]. |
|
3664 |
imageEditView selectedColorIndex:pixel. |
|
3665 |
imageEditView selectedColor:clr. |
|
400 | 3666 |
|
3667 |
! ! |
|
3668 |
||
1716 | 3669 |
!ImageEditor methodsFor:'startup & release'! |
400 | 3670 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3671 |
closeDownViews |
1644 | 3672 |
builder notNil ifTrue:[ |
3673 |
DefaultRelativeSizes := |
|
3674 |
Array |
|
3675 |
with:(builder componentAt:#horizontalPanel) relativeCorners |
|
3676 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
|
3677 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3678 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3679 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3680 |
|
400 | 3681 |
closeRequest |
767 | 3682 |
"close request" |
400 | 3683 |
|
911 | 3684 |
imageEditView checkModified ifTrue:[super closeRequest] |
400 | 3685 |
|
3686 |
! |
|
3687 |
||
1980 | 3688 |
commonPostBuild |
1975 | 3689 |
imageEditView undoImages addDependent:self. |
3690 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
|
3691 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
|
3692 |
||
3693 |
imageEditView clickInfoCallBack:[:button :point | |
|
3694 |
|mouseButtonColorToolBar| |
|
3695 |
||
3696 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
|
3697 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
|
3698 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
3699 |
]. |
|
3700 |
||
3701 |
imageEditView addDependent:self. |
|
3702 |
imageEditView modifiedHolder addDependent:self. |
|
3703 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3704 |
DefaultRelativeSizes notNil ifTrue:[ |
1980 | 3705 |
(builder componentAt:#horizontalPanel) relativeCorners:DefaultRelativeSizes first. |
3706 |
(builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3707 |
]. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3708 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3709 |
|
1980 | 3710 |
open |
3711 |
"after opening, sets the masterApplication of the imageEditView to self" |
|
3712 |
||
3713 |
super open. |
|
3714 |
||
3715 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
|
3716 |
! |
|
3717 |
||
3718 |
postBuildAsSubcanvasWith:aBuilder |
|
3719 |
super postBuildAsSubcanvasWith:aBuilder. |
|
3720 |
self commonPostBuild. |
|
3721 |
! |
|
3722 |
||
3723 |
postBuildWith:aBuilder |
|
3724 |
super postBuildWith:aBuilder. |
|
3725 |
self commonPostBuild. |
|
3726 |
! |
|
3727 |
||
400 | 3728 |
postOpenWith:aBuilder |
767 | 3729 |
"after opening, sets the masterApplication of the imageEditView to self; |
3730 |
evaluate the postOpenAction" |
|
400 | 3731 |
|
1921 | 3732 |
postOpenAction value. |
400 | 3733 |
|
1250 | 3734 |
super postOpenWith:aBuilder. |
3735 |
||
3736 |
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
|
3737 |
|
1345 | 3738 |
"Modified: / 10.2.2000 / 23:17:43 / cg" |
400 | 3739 |
! ! |
3740 |
||
1715 | 3741 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3742 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3743 |
addColorToColormap |
1682 | 3744 |
self addColorToColormap:(Color black) |
3745 |
! |
|
3746 |
||
3747 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3748 |
|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
|
3749 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3750 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3751 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3752 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3753 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3754 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3755 |
|
1054 | 3756 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3757 |
cMap := img colorMap. |
1054 | 3758 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3759 |
drawingColormap isNil ifTrue:[ |
1916 | 3760 |
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
|
3761 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3762 |
]. |
1682 | 3763 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3764 |
self listOfColors contents:drawingColormap. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3765 |
self selectionOfColor value:(drawingColormap size). |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3766 |
|
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3767 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 3768 |
^ self |
3769 |
]. |
|
3770 |
||
1583 | 3771 |
("(depth == 1)" false |
1054 | 3772 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
3773 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3774 |
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
|
3775 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3776 |
]. |
1916 | 3777 |
(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
|
3778 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3779 |
^ self |
1057 | 3780 |
]. |
3781 |
||
3782 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3783 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3784 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3785 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3786 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3787 |
]. |
1057 | 3788 |
self colorMapMode:newMode. |
3789 |
] ifFalse:[ |
|
3790 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3791 |
]. |
1054 | 3792 |
|
3793 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3794 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3795 |
oldCListSize := listOfColors size. |
1054 | 3796 |
|
1682 | 3797 |
newColorMap := cMap copyWith:newColor. |
1054 | 3798 |
|
3799 |
newImage := img species new |
|
3800 |
width:img width |
|
3801 |
height:img height |
|
3802 |
depth:depth |
|
3803 |
fromArray:img bits. |
|
3804 |
||
3805 |
newImage colorMap:newColorMap. |
|
3806 |
newImage fileName:img fileName. |
|
3807 |
newImage mask:(img mask copy). |
|
3808 |
||
3809 |
(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
|
3810 |
listOfColors contents: newImage colorMap. |
1054 | 3811 |
self findColorMapMode. |
3812 |
"/ 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
|
3813 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3814 |
listOfColors removeLast |
1054 | 3815 |
]. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3816 |
self selectionOfColor value:(listOfColors size). |
1054 | 3817 |
self updateLabelsAndHistory. |
3818 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3819 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3820 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 3821 |
"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
|
3822 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3823 |
|
1650 | 3824 |
changeHLS |
3825 |
"interactive Hue/Light/Saturation editing" |
|
3826 |
||
3827 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3828 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3829 |
originalPixels p| |
1652 | 3830 |
|
1741 | 3831 |
"/ compute the averageColor in the background (while asking user) |
1652 | 3832 |
readySema := Semaphore new. |
3833 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3834 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3835 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3836 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3837 |
originalColormap := image colorMap copy. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3838 |
avgColor := image averageColor. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3839 |
originalPixels := image bits. |
1652 | 3840 |
readySema signal. |
3841 |
] forkAt:7. |
|
1649 | 3842 |
|
3843 |
acceptChannel := TriggerValue new. |
|
1652 | 3844 |
avgColorHolder := avgColor asValue. |
1649 | 3845 |
|
3846 |
firstChange := true. |
|
3847 |
||
1651 | 3848 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
3849 |
Color |
|
3850 |
hue:((clr hue) ? 0 + hShift) |
|
1925 | 3851 |
light:((clr light * lFactor / 100) "min:100") |
3852 |
saturation:((clr saturation * sFactor / 100) "min:100")]. |
|
1652 | 3853 |
|
1649 | 3854 |
shiftAction := |
3855 |
[ |
|
1650 | 3856 |
|hShift lFactor sFactor| |
3857 |
||
1649 | 3858 |
acceptChannel value:true. |
3859 |
||
3860 |
firstChange ifTrue:[ |
|
3861 |
imageEditView makeUndo. |
|
3862 |
firstChange := false. |
|
3863 |
]. |
|
1652 | 3864 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 3865 |
|
3866 |
hShift := hueShift value. |
|
3867 |
lFactor := lightValue value. |
|
3868 |
sFactor := saturationValue value. |
|
3869 |
||
1652 | 3870 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
3871 |
||
3872 |
shiftProcess notNil ifTrue:[ |
|
3873 |
shiftProcess terminate. |
|
3874 |
shiftProcess waitUntilTerminated. |
|
3875 |
shiftProcess := nil. |
|
3876 |
]. |
|
3877 |
shiftProcess := |
|
3878 |
[ |
|
3879 |
[ |
|
1656 | 3880 |
imageEditView image |
3881 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3882 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3883 |
release; |
1656 | 3884 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 3885 |
self updateImage. |
3886 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3887 |
self updateImagePreView. |
1652 | 3888 |
] ensure:[ shiftProcess := nil ]. |
3889 |
] forkAt:7. |
|
1649 | 3890 |
]. |
3891 |
||
3892 |
bindings := IdentityDictionary new. |
|
1650 | 3893 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 3894 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 3895 |
|
3896 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 3897 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 3898 |
|
3899 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 3900 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 3901 |
|
1649 | 3902 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 3903 |
bindings at:#hlsColor put:avgColorHolder. |
1650 | 3904 |
|
3905 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 3906 |
ifFalse:[ |
3907 |
firstChange ~~ true ifTrue:[ |
|
3908 |
imageEditView undo |
|
3909 |
] |
|
3910 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3911 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3912 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3913 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3914 |
]. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3915 |
self updateImage. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3916 |
self updateImagePreView. |
1649 | 3917 |
! |
3918 |
||
1403 | 3919 |
clearMaskedPixels |
3920 |
"clear all masked pixels (to pixelValue 0)" |
|
3921 |
||
1460 | 3922 |
|newImage oldImage| |
1403 | 3923 |
|
3924 |
oldImage := self image. |
|
3925 |
||
3926 |
imageEditView makeUndo. |
|
3927 |
||
3928 |
self withExecuteCursorDo:[ |
|
3929 |
newImage := oldImage clearMaskedPixels. |
|
1460 | 3930 |
0 to:newImage height - 1 do:[:y | |
3931 |
0 to:newImage width - 1 do:[:x | |
|
3932 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
3933 |
newImage pixelAtX:x y:y put:0 |
|
3934 |
] |
|
3935 |
] |
|
3936 |
]. |
|
3937 |
||
1403 | 3938 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 3939 |
self fetchImageData. |
1403 | 3940 |
] |
3941 |
] |
|
3942 |
! |
|
3943 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3944 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3945 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3946 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3947 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3948 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3949 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3950 |
self imageEditView invalidate. |
960 | 3951 |
self imagePreView invalidate. |
3952 |
||
3953 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
3954 |
"/ self updateLabelsAndHistory. |
|
3955 |
"/ self imagePreView image:img |
|
3956 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3957 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3958 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 3959 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3960 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3961 |
|
975 | 3962 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3963 |
"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
|
3964 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3965 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3966 |
oldImage image newColors realColorMap oldFileName |
1008 | 3967 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
3968 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3969 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3970 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3971 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3972 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3973 |
prevMode := colorMapMode value. |
1008 | 3974 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3975 |
newColorMap := self class listOfColorMaps at:aMode. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3976 |
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
|
3977 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3978 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3979 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3980 |
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
|
3981 |
] ifFalse:[ |
1008 | 3982 |
prevMode isNil ifTrue:[ |
3983 |
quest := 'Compute colormap (or use standard)' |
|
3984 |
] ifFalse:[ |
|
3985 |
quest := 'Keep colormap (or use standard)' |
|
3986 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3987 |
]. |
1008 | 3988 |
((prevMode = aMode) |
1057 | 3989 |
or:[depth > oldImage depth |
3990 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 3991 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 3992 |
|
3993 |
"/ keep the colormap |
|
3994 |
newColorMap atAllPut:Color black. |
|
3995 |
depth > oldImage depth ifTrue:[ |
|
3996 |
"/ easy - simply copy the part |
|
3997 |
numColors := 1 bitShift:oldImage depth. |
|
3998 |
0 to:numColors-1 do:[:pixel | |
|
3999 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 4000 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4001 |
] ifFalse:[ |
1935 | 4002 |
"/ see if all used color fit the new colormap |
4003 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
4004 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
4005 |
usedColors := oldImage realUsedColors |
|
4006 |
]. |
|
4007 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
4008 |
"/ yea - just install them |
|
4009 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
4010 |
newColorMap at:idx put:clr |
|
4011 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4012 |
] ifFalse:[ |
1935 | 4013 |
"/ copy over those that are most often used. |
4014 |
oldImage depth < 8 ifTrue:[ |
|
4015 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4016 |
oldImage bits |
|
4017 |
expandPixels:(oldImage depth) |
|
4018 |
width:oldImage width |
|
4019 |
height:oldImage height |
|
4020 |
into:tmpBits |
|
4021 |
mapping:nil. |
|
986 | 4022 |
] ifFalse:[ |
1935 | 4023 |
oldImage depth == 8 ifTrue:[ |
4024 |
tmpBits := oldImage bits |
|
4025 |
] ifFalse:[ |
|
4026 |
colorMapMode value:prevMode. |
|
4027 |
self findColorMapMode. |
|
4028 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
4029 |
^ self |
|
4030 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
4031 |
"/ ifFalse:[. |
|
4032 |
"/ ^ self |
|
4033 |
"/ ]. |
|
4034 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
4035 |
"/ ^ self. |
|
4036 |
] |
|
4037 |
]. |
|
4038 |
usageCounts := tmpBits usageCounts. |
|
4039 |
tmpMap := Array new:usageCounts size. |
|
4040 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
4041 |
tmpMap at:i put:clr |
|
4042 |
]. |
|
4043 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
4044 |
||
4045 |
1 to:(1 bitShift:depth) do:[:idx | |
|
4046 |
newColorMap at:idx put:(tmpMap at:idx) |
|
4047 |
]. |
|
4048 |
||
4049 |
useNearest := Dialog |
|
4050 |
confirmWithCancel:(resources |
|
4051 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
4052 |
with:usedColors size |
|
4053 |
with:(1 bitShift:depth)) |
|
4054 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
4055 |
useNearest isNil ifTrue:[ |
|
1124 | 4056 |
colorMapMode value:prevMode. |
1935 | 4057 |
^ self "/ cancel |
4058 |
]. |
|
4059 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4060 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4061 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4062 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4063 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4064 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4065 |
(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
|
4066 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4067 |
confirmWithCancel:(resources |
1916 | 4068 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
4069 |
) |
|
1542 | 4070 |
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
|
4071 |
useNearest isNil ifTrue:[ |
1542 | 4072 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4073 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4074 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4075 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4076 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4077 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4078 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4079 |
|
1424
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
4080 |
newImage := Image newForDepth:depth. |
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
4081 |
newImage depth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4082 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4083 |
|
1008 | 4084 |
Image imageErrorSignal handle:[:ex| |
4085 |
Color colorErrorSignal handle:[:ex| |
|
1542 | 4086 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4087 |
imageEditView undo. |
1008 | 4088 |
^ self warn:(resources string:'Conversion failed !!') |
4089 |
] do:[ |
|
1393 | 4090 |
newImage := Image newForDepth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4091 |
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
|
4092 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4093 |
newImage photometric:#palette. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4094 |
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
|
4095 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4096 |
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
|
4097 |
[:x :y :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4098 |
|newColor| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4099 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4100 |
(newColorMap includes:clr) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4101 |
ifTrue: [newColor := clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4102 |
ifFalse: [ |
1008 | 4103 |
newColor := clr nearestIn:newColorMap. |
4104 |
useNearest ifFalse:[ |
|
4105 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
4106 |
newColor := oldImage colorFromValue:0 |
|
4107 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4108 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4109 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4110 |
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
|
4111 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4112 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4113 |
]. |
1008 | 4114 |
] do:[ |
4115 |
image := newImage fromImage:oldImage |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4116 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4117 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4118 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 4119 |
image mask isNil ifTrue:[ |
1949 | 4120 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 4121 |
maskThreshold := 0.1. |
4122 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
4123 |
] ifFalse:[ |
|
4124 |
maskImage := Depth1Image extent:image extent. |
|
1770 | 4125 |
maskImage bits:(ByteArray |
1008 | 4126 |
new:(maskImage bytesPerRow * maskImage height) |
4127 |
withAll:16rFF). |
|
4128 |
||
4129 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
4130 |
]. |
|
4131 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4132 |
]. |
1008 | 4133 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4134 |
image mask: nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4135 |
]. |
1935 | 4136 |
|
1937 | 4137 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4138 |
realColorMap := OrderedCollection new. |
4139 |
image realColorMap do:[:clr| |
|
4140 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
4141 |
]. |
|
4142 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
4143 |
newColorMap do:[:clr| |
|
4144 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
4145 |
ifTrue:[ |
|
4146 |
newColors add: clr |
|
4147 |
] |
|
4148 |
]. |
|
4149 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4150 |
]. |
1446 | 4151 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4152 |
|
1054 | 4153 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 4154 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4155 |
] |
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 |
|
1057 | 4158 |
"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
|
4159 |
! |
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 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4162 |
"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
|
4163 |
|
927 | 4164 |
|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
|
4165 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4166 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4167 |
depth := oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4168 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4169 |
oldImage photometric ~~ #palette ifTrue:[ |
930 | 4170 |
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
|
4171 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4172 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4173 |
|
1403 | 4174 |
usedColors := oldImage realUsedColors. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4175 |
usedColors size == (1 bitShift:depth) ifTrue:[ |
930 | 4176 |
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
|
4177 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4178 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4179 |
usedColors size == oldImage colorMap size ifTrue:[ |
930 | 4180 |
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
|
4181 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4182 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4183 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4184 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4185 |
|
1949 | 4186 |
"/ 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
|
4187 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4188 |
self withExecuteCursorDo:[ |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
4189 |
"/ newColorMap := Array new:usedColors size. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4190 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4191 |
"/ translation table |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4192 |
oldToNew := ByteArray new:(1 bitShift:depth). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4193 |
newColorMap := usedColors asArray. |
1939 | 4194 |
newColorMap sort:self sortBlockForColors. |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
4195 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4196 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4197 |
|newPixel| |
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 |
(usedColors includes:clr) ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4200 |
newPixel := newColorMap indexOf:clr. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4201 |
oldToNew at:oldIdx put:newPixel-1. |
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 |
oldBits := oldImage bits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4206 |
newBits := ByteArray new:(oldBits size). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4207 |
depth ~~ 8 ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4208 |
"/ expand/compress can only handle 8bits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4209 |
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
|
4210 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4211 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4212 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4213 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4214 |
into:tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4215 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4216 |
tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4217 |
compressPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4218 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4219 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4220 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4221 |
mapping:nil |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4222 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4223 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4224 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4225 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4226 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4227 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4228 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4229 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4230 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4231 |
newImage := oldImage species new |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4232 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4233 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4234 |
depth:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4235 |
fromArray:newBits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4236 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4237 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4238 |
newImage fileName:oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4239 |
newImage mask:(oldImage mask copy). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4240 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4241 |
(imageEditView image:newImage) notNil ifTrue: |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4242 |
[ |
1446 | 4243 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4244 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4245 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4246 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4247 |
"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
|
4248 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
1008 | 4249 |
! |
4250 |
||
1852 | 4251 |
copyColorFromColormap |
1871 | 4252 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 4253 |
! |
4254 |
||
1480 | 4255 |
copyMask |
4256 |
|mask| |
|
4257 |
||
4258 |
mask := self image mask. |
|
4259 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
4260 |
! |
|
4261 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4262 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4263 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4264 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4265 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4266 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4267 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4268 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4269 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4270 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4271 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4272 |
editor color |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4273 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4274 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4275 |
|
1446 | 4276 |
fetchImageData |
1460 | 4277 |
|image| |
4278 |
||
4279 |
(image := imageEditView image) notNil ifTrue:[ |
|
4280 |
self findColorMapMode. |
|
4281 |
self updateLabelsAndHistory. |
|
4282 |
] |
|
1446 | 4283 |
! |
4284 |
||
1544 | 4285 |
inspectColor |
1682 | 4286 |
|clrIndex| |
4287 |
||
4288 |
clrIndex := self selectedColorIndexOrNil. |
|
4289 |
clrIndex isNil ifTrue:[ |
|
1544 | 4290 |
^ self |
4291 |
]. |
|
1682 | 4292 |
(self image colorFromValue:clrIndex-1) inspect |
1544 | 4293 |
! |
4294 |
||
1598 | 4295 |
makeBrighter |
4296 |
| anyChange| |
|
4297 |
||
4298 |
self withExecuteCursorDo:[ |
|
4299 |
anyChange := imageEditView makeBrighter. |
|
4300 |
anyChange ifFalse:[ |
|
4301 |
Dialog warn:'Image unchanged'. |
|
4302 |
] ifTrue:[ |
|
4303 |
self updateImage. |
|
4304 |
] |
|
4305 |
]. |
|
4306 |
! |
|
4307 |
||
4308 |
makeDarker |
|
4309 |
| anyChange| |
|
4310 |
||
4311 |
self withExecuteCursorDo:[ |
|
4312 |
anyChange := imageEditView makeDarker. |
|
4313 |
anyChange ifFalse:[ |
|
4314 |
Dialog warn:'Image unchanged'. |
|
4315 |
] ifTrue:[ |
|
4316 |
self updateImage. |
|
4317 |
] |
|
4318 |
]. |
|
4319 |
! |
|
4320 |
||
1926 | 4321 |
makeGrayScaleImage |
1598 | 4322 |
|anyChange| |
1436 | 4323 |
|
4324 |
self withExecuteCursorDo:[ |
|
1926 | 4325 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 4326 |
anyChange ifFalse:[ |
4327 |
Dialog warn:'Image unchanged'. |
|
4328 |
] ifTrue:[ |
|
1598 | 4329 |
self updateImage. |
4330 |
] |
|
4331 |
]. |
|
4332 |
! |
|
4333 |
||
4334 |
makeInverse |
|
4335 |
| anyChange| |
|
4336 |
||
4337 |
self withExecuteCursorDo:[ |
|
4338 |
anyChange := imageEditView makeInverse. |
|
4339 |
anyChange ifFalse:[ |
|
4340 |
Dialog warn:'Image unchanged'. |
|
4341 |
] ifTrue:[ |
|
4342 |
self updateImage. |
|
1436 | 4343 |
] |
4344 |
]. |
|
4345 |
! |
|
4346 |
||
1446 | 4347 |
makeSelectedColorBrighter |
1682 | 4348 |
self processSelectedColorWith:[:clr | clr lightened] |
1446 | 4349 |
! |
4350 |
||
4351 |
makeSelectedColorDarker |
|
1682 | 4352 |
self processSelectedColorWith:[:clr | clr darkened] |
1446 | 4353 |
! |
4354 |
||
1884 | 4355 |
makeSelectedColorGray |
4356 |
self processSelectedColorWith:[:clr | Color brightness:(clr brightness)] |
|
4357 |
! |
|
4358 |
||
1852 | 4359 |
pasteColorIntoColormap |
4360 |
|copyBufferColor| |
|
4361 |
||
1873 | 4362 |
copyBufferColor := imageEditView getClipboardObject. |
1852 | 4363 |
copyBufferColor isColor ifFalse:[ |
1879
03581b0d7c8f
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
1873
diff
changeset
|
4364 |
self window beep. |
1852 | 4365 |
^ self |
4366 |
]. |
|
4367 |
||
4368 |
self processSelectedColorWith:[:clr | |
|
4369 |
copyBufferColor |
|
4370 |
] |
|
4371 |
! |
|
4372 |
||
1480 | 4373 |
pasteMask |
4374 |
|img mask| |
|
4375 |
||
4376 |
imageEditView makeUndo. |
|
4377 |
||
4378 |
img := self image. |
|
4379 |
mask := img mask. |
|
4380 |
||
4381 |
mask |
|
4382 |
copyFrom:MaskClipboard |
|
4383 |
x:0 y:0 |
|
4384 |
toX:0 y:0 |
|
4385 |
width:(mask width min:MaskClipboard width) |
|
4386 |
height:(mask height min:MaskClipboard height). |
|
4387 |
img mask:mask. |
|
4388 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
4389 |
self fetchImageData. |
|
4390 |
] |
|
4391 |
! |
|
4392 |
||
1682 | 4393 |
pickAndAddColorToColormap |
4394 |
self addColorToColormap:(Color fromUser) |
|
4395 |
! |
|
4396 |
||
1933 | 4397 |
pickAndPasteColor |
4398 |
self pickColor. |
|
4399 |
self pasteColorIntoColormap. |
|
4400 |
! |
|
4401 |
||
1852 | 4402 |
pickColor |
1871 | 4403 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 4404 |
! |
4405 |
||
1682 | 4406 |
processSelectedColorWith:aBlock |
1852 | 4407 |
"undoable color processing: the selected color will be replaced by the |
4408 |
value of aBlock" |
|
4409 |
||
4410 |
|img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor| |
|
1682 | 4411 |
|
4412 |
selectedColorIndex := self selectedColorIndexOrNil. |
|
4413 |
selectedColorIndex isNil ifTrue:[^ self]. |
|
4414 |
||
4415 |
img := self image. |
|
4416 |
cMap := img colorMap. |
|
4417 |
cMap isNil ifTrue:[ |
|
1916 | 4418 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 4419 |
^ self |
4420 |
]. |
|
1852 | 4421 |
|
4422 |
oldColor := cMap at:selectedColorIndex. |
|
1682 | 4423 |
imageEditView makeUndo. |
4424 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4425 |
modifiedColormap := cMap asArray copy. |
1852 | 4426 |
|
4427 |
newColor := aBlock value:oldColor. |
|
1859 | 4428 |
modifiedColormap at:selectedColorIndex put:newColor. |
1682 | 4429 |
|
4430 |
newImage := img species new |
|
4431 |
width:img width |
|
4432 |
height:img height |
|
1843 | 4433 |
depth:img depth |
1682 | 4434 |
fromArray:img bits. |
4435 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4436 |
newImage colorMap:modifiedColormap. |
1682 | 4437 |
newImage fileName:img fileName. |
4438 |
newImage mask:(img mask copy). |
|
4439 |
||
4440 |
oldSelection := self selectionOfColor value. |
|
4441 |
||
4442 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
4443 |
self fetchImageData. |
|
4444 |
]. |
|
4445 |
self selectionOfColor value:oldSelection. |
|
4446 |
||
4447 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
|
4448 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
|
4449 |
! |
|
4450 |
||
1124 | 4451 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4452 |
|s n anyChange img usedColors| |
1124 | 4453 |
|
4454 |
s := Dialog request:'Number of color bits to strip (1-7) ?'. |
|
1435 | 4455 |
s size == 0 ifTrue:[^ self]. |
1934 | 4456 |
|
1124 | 4457 |
n := Integer readFrom:s onError:0. |
4458 |
(n between:1 and:7) ifFalse:[ |
|
4459 |
Dialog warn:'Image unchanged'. |
|
4460 |
^ self |
|
4461 |
]. |
|
4462 |
||
4463 |
self withExecuteCursorDo:[ |
|
4464 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
4465 |
anyChange ifFalse:[ |
|
4466 |
Dialog warn:'Image unchanged'. |
|
4467 |
] ifTrue:[ |
|
4468 |
img := imageEditView image. |
|
4469 |
imageEditView image:img. |
|
1446 | 4470 |
|
4471 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4472 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4473 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4474 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4475 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4476 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4477 |
] |
1124 | 4478 |
] |
4479 |
]. |
|
4480 |
! |
|
4481 |
||
1930 | 4482 |
reduceNumberOfColors2 |
1938 | 4483 |
|s rndR rndG rndB usedColors image newImage| |
4484 |
||
4485 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 4486 |
s size == 0 ifTrue:[^ self]. |
1938 | 4487 |
rndR := Integer readFrom:s onError:0. |
1939 | 4488 |
|
1938 | 4489 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
4490 |
s size == 0 ifTrue:[^ self]. |
|
4491 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 4492 |
|
1938 | 4493 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
4494 |
s size == 0 ifTrue:[^ self]. |
|
4495 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 4496 |
|
4497 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 4498 |
Dialog warn:'Image unchanged'. |
4499 |
^ self |
|
4500 |
]. |
|
4501 |
||
4502 |
self withExecuteCursorDo:[ |
|
1934 | 4503 |
image := self image. |
4504 |
usedColors := image usedColors. |
|
4505 |
imageEditView makeUndo. |
|
4506 |
||
4507 |
newImage := image copy. |
|
4508 |
image |
|
4509 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
4510 |
do:[:x :y :clr | |
|
4511 |
|r g b nr ng nb newClr| |
|
4512 |
||
4513 |
r := clr redByte. |
|
4514 |
g := clr greenByte. |
|
4515 |
b := clr blueByte. |
|
1938 | 4516 |
nr := (r roundTo:rndR) min:255. |
4517 |
ng := (g roundTo:rndG) min:255. |
|
4518 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 4519 |
|
4520 |
newClr := Color redByte:nr greenByte:ng blueByte:nb. |
|
4521 |
newImage colorAtX:x y:y put:newClr |
|
4522 |
]. |
|
4523 |
||
4524 |
imageEditView image:newImage. |
|
4525 |
imageEditView setModified. |
|
4526 |
self updateImage. |
|
4527 |
self updateImagePreView. |
|
4528 |
||
4529 |
self fetchImageData. |
|
4530 |
usedColors := newImage usedColorsMax:10000. |
|
4531 |
usedColors size == 10000 ifTrue:[ |
|
4532 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
4533 |
] ifFalse:[ |
|
4534 |
Dialog information:(usedColors size printString , ' colors used.') |
|
4535 |
] |
|
1930 | 4536 |
]. |
4537 |
! |
|
4538 |
||
1682 | 4539 |
selectedColorIndexOrNil |
4540 |
| img clrIndex| |
|
4541 |
||
4542 |
img := self image. |
|
4543 |
img isNil ifTrue:[ |
|
4544 |
self warn:'No Image.'. |
|
4545 |
^ nil |
|
4546 |
]. |
|
4547 |
clrIndex := self selectionOfColor value. |
|
1896 | 4548 |
self hasMask "img mask notNil" ifTrue: [ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4549 |
clrIndex == 1 ifTrue:[^ nil]. |
1904 | 4550 |
clrIndex == 0 ifTrue:[^ nil]. |
1896 | 4551 |
^ clrIndex - 1 |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4552 |
]. |
1682 | 4553 |
^ clrIndex |
4554 |
! |
|
4555 |
||
1852 | 4556 |
selectedColorOrNil |
1896 | 4557 |
|cmapIndex img cMap| |
4558 |
||
4559 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 4560 |
cmapIndex isNil ifTrue:[^ nil]. |
1852 | 4561 |
|
4562 |
img := self image. |
|
4563 |
cMap := img colorMap. |
|
4564 |
cMap isNil ifTrue:[ |
|
1916 | 4565 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1900 | 4566 |
^ nil |
1852 | 4567 |
]. |
1896 | 4568 |
^ cMap at:cmapIndex. |
1852 | 4569 |
! |
4570 |
||
1008 | 4571 |
sortColorMap |
4572 |
"calculates a new color map for the image, sorting colors" |
|
4573 |
||
1939 | 4574 |
self |
4575 |
sortColorMapWith:self sortBlockForColors |
|
4576 |
! |
|
4577 |
||
4578 |
sortColorMapWith:sortBlock |
|
4579 |
"calculates a new color map for the image, sorting colors" |
|
4580 |
||
1008 | 4581 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
4582 |
||
4583 |
oldImage := self image. |
|
4584 |
depth := oldImage depth. |
|
4585 |
||
4586 |
oldImage photometric ~~ #palette ifTrue:[ |
|
4587 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
4588 |
^ self |
|
4589 |
]. |
|
4590 |
||
4591 |
usedColors := oldImage realColorMap. |
|
4592 |
||
4593 |
imageEditView makeUndo. |
|
4594 |
||
4595 |
self withExecuteCursorDo:[ |
|
4596 |
"/ newColorMap := Array new:usedColors size. |
|
4597 |
||
4598 |
"/ translation table |
|
4599 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
4600 |
newColorMap := usedColors asArray. |
|
1939 | 4601 |
newColorMap sort:sortBlock. |
1008 | 4602 |
|
4603 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
4604 |
|newPixel| |
|
4605 |
||
4606 |
(usedColors includes:clr) ifTrue:[ |
|
4607 |
newPixel := newColorMap indexOf:clr. |
|
4608 |
oldToNew at:oldIdx put:newPixel-1. |
|
4609 |
] |
|
4610 |
]. |
|
4611 |
||
4612 |
oldBits := oldImage bits. |
|
4613 |
newBits := ByteArray new:(oldBits size). |
|
4614 |
depth ~~ 8 ifTrue:[ |
|
4615 |
"/ expand/compress can only handle 8bits |
|
4616 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4617 |
oldBits |
|
4618 |
expandPixels:depth |
|
4619 |
width:oldImage width |
|
4620 |
height:oldImage height |
|
4621 |
into:tmpBits |
|
4622 |
mapping:oldToNew. |
|
4623 |
tmpBits |
|
4624 |
compressPixels:depth |
|
4625 |
width:oldImage width |
|
4626 |
height:oldImage height |
|
4627 |
into:newBits |
|
4628 |
mapping:nil |
|
4629 |
] ifFalse:[ |
|
4630 |
oldBits |
|
4631 |
expandPixels:depth |
|
4632 |
width:oldImage width |
|
4633 |
height:oldImage height |
|
4634 |
into:newBits |
|
4635 |
mapping:oldToNew. |
|
4636 |
]. |
|
4637 |
||
4638 |
newImage := oldImage species new |
|
4639 |
width:oldImage width |
|
4640 |
height:oldImage height |
|
4641 |
depth:depth |
|
4642 |
fromArray:newBits. |
|
4643 |
||
4644 |
newImage colorMap:newColorMap. |
|
4645 |
newImage fileName:oldImage fileName. |
|
4646 |
newImage mask:(oldImage mask copy). |
|
4647 |
||
1054 | 4648 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 4649 |
self fetchImageData. |
1008 | 4650 |
] |
4651 |
] |
|
4652 |
||
4653 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
4654 |
"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
|
4655 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4656 |
|
1715 | 4657 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 4658 |
|
1882 | 4659 |
doBrightenImage |
4660 |
imageEditView brightenImage. |
|
4661 |
self listOfColors removeAll. |
|
4662 |
self findColorMapMode. |
|
1975 | 4663 |
imageEditView removelastUndo |
1882 | 4664 |
! |
4665 |
||
767 | 4666 |
doBrowseClass |
4667 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 4668 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4669 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4670 |
|
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
4671 |
cls := imageEditView resourceClass. |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4672 |
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
|
4673 |
|
1488 | 4674 |
UserPreferences systemBrowserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4675 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4676 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4677 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4678 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 4679 |
! |
4680 |
||
1703 | 4681 |
doCopyImageToClipboard |
4682 |
imageEditView copyImageToClipboard. |
|
4683 |
! |
|
4684 |
||
1045 | 4685 |
doCropAll |
986 | 4686 |
"find all borders and cut them off" |
4687 |
||
1045 | 4688 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 4689 |
self updateInfoLabel |
4690 |
||
4691 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4692 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
4693 |
! |
|
4694 |
||
1045 | 4695 |
doCropBottom |
986 | 4696 |
"find a bottom border and cut it off" |
4697 |
||
1045 | 4698 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 4699 |
self updateInfoLabel |
4700 |
||
4701 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
4702 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4703 |
! |
|
4704 |
||
1045 | 4705 |
doCropLeft |
986 | 4706 |
"find a left border and cut it off" |
4707 |
||
1045 | 4708 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 4709 |
self updateInfoLabel |
4710 |
||
4711 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4712 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
4713 |
! |
|
4714 |
||
1045 | 4715 |
doCropManual |
986 | 4716 |
"let user specify borders and cut them off" |
4717 |
||
1502 | 4718 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
4719 |
||
4720 |
acceptChannel := TriggerValue new. |
|
1490 | 4721 |
|
4722 |
firstChange := true. |
|
4723 |
||
1502 | 4724 |
gropAction := |
4725 |
[:lV :rV :tV :bV | |l r t b| |
|
4726 |
acceptChannel value:true. |
|
4727 |
||
4728 |
l := lV value. |
|
4729 |
r := rV value. |
|
4730 |
t := tV value. |
|
4731 |
b := bV value. |
|
4732 |
(l + r + t + b) == 0 ifTrue:[ |
|
1879
03581b0d7c8f
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
1873
diff
changeset
|
4733 |
self window beep |
1502 | 4734 |
] ifFalse:[ |
4735 |
img := imageEditView image. |
|
4736 |
firstChange ifTrue:[ |
|
4737 |
imageEditView makeUndo. |
|
4738 |
firstChange := false. |
|
4739 |
]. |
|
4740 |
imageEditView |
|
4741 |
makeSubImageX:l y:t |
|
4742 |
width:(img width - l - r) |
|
4743 |
height:(img height - t - b). |
|
4744 |
self updateInfoLabel |
|
4745 |
]. |
|
1490 | 4746 |
]. |
986 | 4747 |
|
4748 |
bindings := IdentityDictionary new. |
|
1507 | 4749 |
bindings at:#left put:(left := 1 asValue). |
4750 |
bindings at:#right put:(right := 1 asValue). |
|
4751 |
bindings at:#top put:(top := 1 asValue). |
|
4752 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 4753 |
bindings at:#acceptChannel put:acceptChannel. |
4754 |
||
4755 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
4756 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
4757 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
4758 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
4759 |
||
4760 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 4761 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4762 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 4763 |
ifFalse:[ |
4764 |
firstChange ~~ true ifTrue:[ |
|
1558 | 4765 |
imageEditView undo. |
4766 |
self updateImagePreView. |
|
1507 | 4767 |
] |
4768 |
]. |
|
986 | 4769 |
|
4770 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4771 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4772 |
! |
|
4773 |
||
1045 | 4774 |
doCropRight |
986 | 4775 |
"find a right border and cut it off" |
4776 |
||
1045 | 4777 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 4778 |
self updateInfoLabel |
4779 |
||
4780 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4781 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
4782 |
! |
|
4783 |
||
1045 | 4784 |
doCropTop |
986 | 4785 |
"find a top border and cut it off" |
4786 |
||
1045 | 4787 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 4788 |
self updateInfoLabel |
4789 |
||
4790 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
4791 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
4792 |
! |
|
4793 |
||
1882 | 4794 |
doDarkenImage |
4795 |
imageEditView darkenImage. |
|
4796 |
self listOfColors removeAll. |
|
4797 |
self findColorMapMode. |
|
1975 | 4798 |
imageEditView removelastUndo |
1882 | 4799 |
! |
4800 |
||
1433 | 4801 |
doEditMask |
4802 |
"" |
|
4803 |
||
4804 |
self image mask edit |
|
4805 |
! |
|
4806 |
||
767 | 4807 |
doFlipHorizontal |
4808 |
"flips horizontally current image" |
|
400 | 4809 |
|
911 | 4810 |
imageEditView flipHorizontal |
400 | 4811 |
! |
4812 |
||
767 | 4813 |
doFlipVertical |
4814 |
"flips vertically current image" |
|
400 | 4815 |
|
911 | 4816 |
imageEditView flipVertical |
400 | 4817 |
! |
4818 |
||
1896 | 4819 |
doInspectImage |
4820 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
4821 |
||
4822 |
self image inspect |
|
4823 |
! |
|
4824 |
||
767 | 4825 |
doMagnifyDown |
4826 |
"magnifies current image one step down" |
|
400 | 4827 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4828 |
|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
|
4829 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4830 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4831 |
(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
|
4832 |
magHolder value: mag - 1 |
400 | 4833 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4834 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4835 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 4836 |
! |
4837 |
||
767 | 4838 |
doMagnifyImage |
1479 | 4839 |
"magnifies the current image to a new size" |
400 | 4840 |
|
1353 | 4841 |
|box newSize image| |
4842 |
||
4843 |
image := imageEditView image. |
|
4844 |
||
4845 |
box := EnterBox new. |
|
4846 |
box title:(resources string:'Images new size:'). |
|
4847 |
box okText:(resources string:'OK'). |
|
4848 |
box abortText:(resources string:'Cancel'). |
|
4849 |
box initialText:image extent printString. |
|
4850 |
box showAtPointer. |
|
4851 |
(box accepted |
|
1960 | 4852 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 4853 |
ifTrue:[ |
1479 | 4854 |
newSize isPoint ifFalse:[ |
4855 |
self warn:'please enter the new size as ''x @ y''.'. |
|
4856 |
^ self. |
|
4857 |
]. |
|
4858 |
imageEditView magnifyImageTo:newSize. |
|
4859 |
]. |
|
4860 |
||
4861 |
self updateInfoLabel |
|
4862 |
! |
|
4863 |
||
4864 |
doMagnifyImageBy |
|
4865 |
"magnifies the current image (by a scale)" |
|
4866 |
||
4867 |
|box oldSize newSize scale image| |
|
4868 |
||
4869 |
image := imageEditView image. |
|
4870 |
oldSize := image extent. |
|
4871 |
||
4872 |
box := EnterBox new. |
|
4873 |
box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
4874 |
box okText:(resources string:'OK'). |
|
4875 |
box abortText:(resources string:'Cancel'). |
|
4876 |
box initialText:1 printString. |
|
4877 |
box showAtPointer. |
|
4878 |
||
4879 |
(box accepted |
|
4880 |
and: [(scale := Object readFromString:(box contents) onError:nil) notNil]) |
|
4881 |
ifTrue:[ |
|
4882 |
scale isNumber ifFalse:[ |
|
4883 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
4884 |
^ self. |
|
4885 |
]. |
|
4886 |
newSize := oldSize * scale. |
|
1353 | 4887 |
imageEditView magnifyImageTo:newSize. |
4888 |
]. |
|
4889 |
||
400 | 4890 |
self updateInfoLabel |
4891 |
! |
|
4892 |
||
767 | 4893 |
doMagnifyUp |
4894 |
"magnifies current image one step up" |
|
400 | 4895 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4896 |
|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
|
4897 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4898 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4899 |
(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
|
4900 |
magHolder value: mag + 1 |
400 | 4901 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4902 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4903 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 4904 |
! |
4905 |
||
767 | 4906 |
doNegativeImage |
4907 |
"negates current image by negating the color map" |
|
400 | 4908 |
|
1598 | 4909 |
self image depth ~~ 1 ifTrue:[ |
4910 |
Dialog warn:'Only useful for depth 1 images'. |
|
4911 |
^ self |
|
4912 |
]. |
|
911 | 4913 |
imageEditView negativeImage. |
400 | 4914 |
self listOfColors removeAll. |
901 | 4915 |
self findColorMapMode. |
1975 | 4916 |
imageEditView removelastUndo |
400 | 4917 |
! |
4918 |
||
767 | 4919 |
doResizeImage |
1353 | 4920 |
"resizes the current image" |
4921 |
||
4922 |
|box newSize image| |
|
4923 |
||
4924 |
image := imageEditView image. |
|
4925 |
||
4926 |
box := EnterBox new. |
|
4927 |
box title:(resources string:'Images new size:'). |
|
4928 |
box okText:(resources string:'OK'). |
|
4929 |
box abortText:(resources string:'Cancel'). |
|
4930 |
box initialText:image extent printString. |
|
4931 |
box showAtPointer. |
|
4932 |
(box accepted |
|
1960 | 4933 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 4934 |
ifTrue:[ |
4935 |
imageEditView resizeImageTo:newSize. |
|
4936 |
]. |
|
400 | 4937 |
! |
4938 |
||
767 | 4939 |
doRotateImage |
4940 |
"rotates current image" |
|
400 | 4941 |
|
1353 | 4942 |
|box rotation| |
4943 |
||
4944 |
box := EnterBox new. |
|
4945 |
box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
4946 |
box okText:(resources string:'OK'). |
|
4947 |
box abortText:(resources string:'Cancel'). |
|
4948 |
box initialText: '0'. |
|
4949 |
box showAtPointer. |
|
4950 |
(box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil]) |
|
4951 |
ifTrue:[ |
|
4952 |
imageEditView rotateImageBy:rotation. |
|
1558 | 4953 |
self updateInfoLabel. |
1353 | 4954 |
]. |
400 | 4955 |
! |
4956 |
||
1557 | 4957 |
doShiftManual |
4958 |
"let user specify amount and shift" |
|
4959 |
||
1713 | 4960 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 4961 |
|
4962 |
acceptChannel := TriggerValue new. |
|
1960 | 4963 |
wrapHolder := (lastShiftUsedWrap ? true) asValue. |
1557 | 4964 |
|
4965 |
firstChange := true. |
|
4966 |
||
4967 |
shiftAction := |
|
4968 |
[:shiftH :shiftV | |
|
4969 |
acceptChannel value:true. |
|
4970 |
||
4971 |
img := imageEditView image. |
|
4972 |
firstChange ifTrue:[ |
|
4973 |
imageEditView makeUndo. |
|
4974 |
firstChange := false. |
|
4975 |
]. |
|
1713 | 4976 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 4977 |
self updateInfoLabel |
4978 |
]. |
|
4979 |
||
4980 |
bindings := IdentityDictionary new. |
|
4981 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 4982 |
bindings at:#wrap put:wrapHolder. |
1557 | 4983 |
bindings at:#acceptChannel put:acceptChannel. |
4984 |
||
4985 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
4986 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
4987 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
4988 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
4989 |
||
4990 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
4991 |
ifFalse:[ |
|
4992 |
firstChange ~~ true ifTrue:[ |
|
4993 |
imageEditView undo |
|
4994 |
] |
|
4995 |
]. |
|
1960 | 4996 |
lastShiftUsedWrap := wrapHolder value. |
1557 | 4997 |
|
4998 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4999 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
5000 |
! |
|
5001 |
||
1480 | 5002 |
doUnCropManual |
5003 |
"let user specify borders and add them" |
|
5004 |
||
5005 |
|bindings left top right bottom img| |
|
5006 |
||
5007 |
bindings := IdentityDictionary new. |
|
1704 | 5008 |
bindings at:#left put:(left := 1 asValue). |
5009 |
bindings at:#right put:(right := 1 asValue). |
|
5010 |
bindings at:#top put:(top := 1 asValue). |
|
5011 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
5012 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 5013 |
ifTrue:[ |
5014 |
left := left value. |
|
5015 |
right := right value. |
|
5016 |
top := top value. |
|
5017 |
bottom := bottom value. |
|
5018 |
img := imageEditView image. |
|
5019 |
||
5020 |
imageEditView |
|
5021 |
makeBorderedImageX:left y:top |
|
5022 |
width:(img width + left + right) |
|
5023 |
height:(img height + top + bottom). |
|
5024 |
self updateInfoLabel |
|
5025 |
]. |
|
5026 |
||
5027 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
5028 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
5029 |
! |
|
5030 |
||
767 | 5031 |
doUndo |
5032 |
"reverses last edit action" |
|
400 | 5033 |
|
1436 | 5034 |
imageEditView undo. |
400 | 5035 |
! ! |
5036 |
||
1715 | 5037 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 5038 |
|
767 | 5039 |
doLoadFromClass |
5040 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 5041 |
|
1122 | 5042 |
|img| |
5043 |
||
1975 | 5044 |
self checkModified ifFalse:[ ^ self ]. |
5045 |
||
1054 | 5046 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5047 |
imageSeqNr := nil. |
1122 | 5048 |
(img := self image) notNil ifTrue: [ |
1900 | 5049 |
self updateColorsFromImage:img. |
574 | 5050 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5051 |
self updateLabelsAndHistory. |
1054 | 5052 |
] ifFalse: [ |
5053 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5054 |
]. |
449 | 5055 |
] |
400 | 5056 |
! |
5057 |
||
767 | 5058 |
doLoadFromFile |
5059 |
"opens a dialog for loading an image from a file" |
|
400 | 5060 |
|
1922 | 5061 |
|img file filters| |
1353 | 5062 |
|
1975 | 5063 |
self checkModified ifFalse:[ ^ self ]. |
5064 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5065 |
imageSeqNr := nil. |
1353 | 5066 |
img := self image. |
5067 |
img notNil ifTrue: [ |
|
5068 |
file := img fileName |
|
5069 |
]. |
|
5070 |
||
5071 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
5072 |
||
5073 |
file notNil ifTrue:[ |
|
5074 |
file := FileSelectionBrowser |
|
5075 |
request:'Load Image From' |
|
5076 |
fileName:file |
|
5077 |
withFileFilters:filters. |
|
5078 |
] ifFalse:[ |
|
5079 |
file := FileSelectionBrowser |
|
5080 |
request:'Load Image From' |
|
1922 | 5081 |
inDirectory:LastDirectory |
1353 | 5082 |
withFileFilters:filters. |
5083 |
]. |
|
5084 |
file notNil ifTrue:[ |
|
5085 |
LastDirectory := file asFilename directoryName. |
|
5086 |
self loadFromFile:file |
|
5087 |
] |
|
400 | 5088 |
! |
5089 |
||
767 | 5090 |
doNewImage |
5091 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 5092 |
|
1975 | 5093 |
|dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext| |
5094 |
||
5095 |
self checkModified ifFalse:[ ^ self ]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5096 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5097 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5098 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5099 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 5100 |
|
1975 | 5101 |
dialogAspects := IdentityDictionary new |
767 | 5102 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5103 |
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
|
5104 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5105 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 5106 |
yourself. |
5107 |
||
1975 | 5108 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects) |
1383 | 5109 |
ifTrue:[ |
1975 | 5110 |
szString := (dialogAspects at:#selectionOfSize) value. |
1960 | 5111 |
ext := self pointFromString:szString. |
1962 | 5112 |
ext isNil ifTrue:[ |
5113 |
width := height := 32 |
|
5114 |
] ifFalse:[ |
|
5115 |
width := ext x. |
|
5116 |
height := ext y. |
|
5117 |
]. |
|
1960 | 5118 |
"/ width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
5119 |
"/ height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 5120 |
|
1975 | 5121 |
cMapString := (dialogAspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5122 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5123 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5124 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5125 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5126 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 5127 |
|
1637 | 5128 |
LastSizeString := szString. |
5129 |
LastColormapMode := cMapString. |
|
5130 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5131 |
(cMapMode startsWith: 'mask') ifTrue:[ |
767 | 5132 |
image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
400 | 5133 |
]. |
5134 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5135 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5136 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5137 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5138 |
]. |
400 | 5139 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 5140 |
] |
929 | 5141 |
! |
5142 |
||
1682 | 5143 |
doNewImageFromClipboard |
5144 |
|image| |
|
5145 |
||
1975 | 5146 |
self checkModified ifFalse:[ ^ self ]. |
5147 |
||
1682 | 5148 |
image := imageEditView clipBoard. |
1975 | 5149 |
imageEditView image:image. |
5150 |
||
5151 |
image notNil ifTrue:[ |
|
1900 | 5152 |
self updateColorsFromImage:image. |
1682 | 5153 |
self findColorMapMode. |
5154 |
self updateLabelsAndHistory. |
|
5155 |
] |
|
5156 |
! |
|
5157 |
||
929 | 5158 |
grabScreenImage |
5159 |
"let user choose an area and grab that are for editing" |
|
5160 |
||
1975 | 5161 |
self checkModified ifFalse:[ ^ self ]. |
5162 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5163 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5164 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5165 |
|image d8image img| |
929 | 5166 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5167 |
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
|
5168 |
image := Image fromUser. |
1121 | 5169 |
image isNil ifFalse:[ |
5170 |
image depth > 8 ifTrue:[ |
|
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
5171 |
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
|
5172 |
(sig := ex signal) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 5173 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 5174 |
|
5175 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
5176 |
d8image := nil. |
|
5177 |
] do:[ |
|
5178 |
d8image := Depth8Image new. |
|
5179 |
d8image fromImage:image. |
|
5180 |
]. |
|
5181 |
d8image notNil ifTrue:[ |
|
5182 |
image := d8image |
|
5183 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5184 |
]. |
1121 | 5185 |
(imageEditView image:image) notNil ifTrue:[ |
5186 |
self listOfColors contents:(image colorMap). |
|
5187 |
self findColorMapMode. |
|
5188 |
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
|
5189 |
] |
1121 | 5190 |
] |
5191 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5192 |
afterSeconds:1 |
929 | 5193 |
|
5194 |
"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
|
5195 |
"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
|
5196 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5197 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5198 |
nextImageInSequence |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5199 |
"display the next image in the image sequence" |
1383 | 5200 |
|img seq frame listOfColors| |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5201 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5202 |
imageEditView releaseUndos. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5203 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5204 |
seq := self image imageSequence. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5205 |
imageSeqNr isNil ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5206 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5207 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5208 |
imageSeqNr := imageSeqNr + 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5209 |
imageSeqNr > seq size ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5210 |
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
|
5211 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5212 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5213 |
frame := seq at:imageSeqNr. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5214 |
imageEditView image:(frame image). |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5215 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5216 |
(img := self image) notNil ifTrue:[ |
1383 | 5217 |
listOfColors := self listOfColors. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5218 |
img colorMap notNil ifTrue:[ |
1383 | 5219 |
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
|
5220 |
] ifFalse:[ |
1383 | 5221 |
listOfColors removeAll. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5222 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5223 |
self findColorMapMode. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5224 |
self updateLabelsAndHistory. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5225 |
img := img onDevice:device. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5226 |
imageEditView image:img. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5227 |
] ifFalse:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5228 |
self updateForNoImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5229 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5230 |
|
400 | 5231 |
! ! |
5232 |
||
1715 | 5233 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 5234 |
|
767 | 5235 |
doPrint |
5236 |
"prints current image on the current printer" |
|
400 | 5237 |
|
1734 | 5238 |
self withWaitCursorDo:[ |
5239 |
imageEditView print |
|
5240 |
] |
|
400 | 5241 |
! |
5242 |
||
1613 | 5243 |
doSaveButtonImageToFileAs |
5244 |
"opens a dialog for saving current image to a file" |
|
5245 |
||
5246 |
imageEditView saveButtonImageToFileAs. |
|
5247 |
self updateLabelsAndHistory. |
|
5248 |
! |
|
5249 |
||
767 | 5250 |
doSaveImageFile |
5251 |
"saves current image to current file" |
|
400 | 5252 |
|
1481 | 5253 |
imageEditView save. |
400 | 5254 |
! |
5255 |
||
767 | 5256 |
doSaveImageFileAs |
1922 | 5257 |
"opens a dialog for saving an image to a file" |
5258 |
||
5259 |
|img file filters| |
|
5260 |
||
5261 |
img := self image. |
|
5262 |
img notNil ifTrue: [ |
|
5263 |
file := img fileName |
|
5264 |
]. |
|
5265 |
||
5266 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
5267 |
||
5268 |
file notNil ifTrue:[ |
|
5269 |
file := FileSelectionBrowser |
|
5270 |
request:'Save Image To' |
|
5271 |
fileName:file |
|
5272 |
withFileFilters:filters. |
|
5273 |
] ifFalse:[ |
|
5274 |
file := FileSelectionBrowser |
|
5275 |
request:'Save Image To' |
|
5276 |
inDirectory:LastDirectory |
|
5277 |
withFileFilters:filters. |
|
5278 |
]. |
|
5279 |
file notNil ifTrue:[ |
|
5280 |
imageEditView saveImageFileAs:file. |
|
5281 |
LastDirectory := file asFilename directoryName. |
|
5282 |
self updateLabelsAndHistory. |
|
5283 |
] |
|
400 | 5284 |
! |
5285 |
||
767 | 5286 |
doSaveImageMaskFileAs |
5287 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 5288 |
|
1481 | 5289 |
imageEditView saveImageMaskFileAs. |
400 | 5290 |
! |
5291 |
||
767 | 5292 |
doSaveMethod |
1975 | 5293 |
"saves the image in current class and selector" |
5294 |
||
5295 |
imageEditView saveMethod ifTrue:[ |
|
694 | 5296 |
self updateLabelsAndHistory |
400 | 5297 |
] |
5298 |
! |
|
5299 |
||
767 | 5300 |
doSaveMethodAs |
5301 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 5302 |
|
1975 | 5303 |
imageEditView saveMethodAs ifTrue:[ |
694 | 5304 |
self updateLabelsAndHistory |
400 | 5305 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5306 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5307 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5308 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5309 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5310 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5311 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5312 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5313 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5314 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5315 |
TextBox openOn:img storeString |
1975 | 5316 |
! |
5317 |
||
5318 |
save |
|
5319 |
"saves current image on current class and selector" |
|
5320 |
||
5321 |
self doSaveMethod |
|
400 | 5322 |
! ! |
5323 |
||
1715 | 5324 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 5325 |
|
5326 |
doChangeGridMagnification |
|
5327 |
"change grid magnification" |
|
5328 |
||
5329 |
|box oldGridLimit newGridLimit| |
|
5330 |
||
5331 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
5332 |
||
5333 |
box := EnterBox new. |
|
5334 |
box title:(resources string:'Grid Magnification Limit:'). |
|
5335 |
box okText:(resources string:'OK'). |
|
5336 |
box abortText:(resources string:'Cancel'). |
|
5337 |
box initialText:(oldGridLimit x printString). |
|
5338 |
box showAtPointer. |
|
5339 |
||
5340 |
(box accepted |
|
5341 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
5342 |
) ifTrue:[ |
|
5343 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
5344 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
5345 |
imageEditView invalidate |
|
5346 |
] |
|
5347 |
||
5348 |
! ! |
|
5349 |
||
400 | 5350 |
!ImageEditor class methodsFor:'documentation'! |
5351 |
||
5352 |
version |
|
5353 |
^ '$Header$' |
|
5354 |
! ! |