author | Stefan Vogel <sv@exept.de> |
Wed, 05 Jun 2013 15:24:03 +0200 | |
changeset 3016 | 6aff65697c4f |
parent 2996 | a1090695cfbc |
child 3020 | 7ee98e6a7aab |
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 |
" |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
12 |
"{ Package: 'stx:libtool2' }" |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
13 |
|
1975 | 14 |
ResourceSpecEditor subclass:#ImageEditor |
975 | 15 |
instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
1960 | 16 |
selectedColorIndex postOpenAction imageSeqNr drawingColormap |
2767 | 17 |
lastShiftUsedWrap lastGrabbedScreenArea |
18 |
allowedToChangeImageDimensionAndDepth' |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
19 |
classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
2796 | 20 |
DefaultRelativeSizes LastURL' |
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. |
|
2764 | 68 |
editor openWindow. |
69 |
^ editor |
|
1975 | 70 |
! |
71 |
||
400 | 72 |
openModalOnClass: aClass andSelector: aSelector |
1975 | 73 |
"opens a modal Image Editor on aClass and aSelector. |
74 |
Returns the real name of the edited resource method (in case, user changed it)." |
|
75 |
||
76 |
|imageEditor imageEditView className resourceClass resourceSelector| |
|
767 | 77 |
|
400 | 78 |
imageEditor := self new. |
767 | 79 |
|
900 | 80 |
aClass isClass ifTrue: [className := aClass name]. |
81 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 82 |
aClass isNil ifTrue: [className := '']. |
400 | 83 |
|
2764 | 84 |
imageEditor postOpenAction: [ |
85 |
imageEditView := imageEditor imageEditView. |
|
86 |
imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector |
|
87 |
]. |
|
400 | 88 |
imageEditor openModal. |
89 |
||
1975 | 90 |
resourceClass := imageEditView resourceClass. |
91 |
resourceSelector := imageEditView resourceSelector. |
|
92 |
||
93 |
(resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil]. |
|
94 |
^ Array with:resourceClass with:resourceSelector |
|
1966 | 95 |
|
96 |
" |
|
97 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
98 |
" |
|
400 | 99 |
! |
100 |
||
2764 | 101 |
openModalOnImage:anImage |
102 |
"opens a modal Image Editor on an image. |
|
103 |
Returns the modified image or nil if unsaved/unchanged" |
|
104 |
||
105 |
|imageEditor imageEditView newImage| |
|
106 |
||
107 |
imageEditor := self new. |
|
2767 | 108 |
imageEditor allowedToChangeImageDimensionAndDepth:false. |
2764 | 109 |
imageEditor postOpenAction: [ |
110 |
imageEditView := imageEditor imageEditView. |
|
111 |
imageEditor loadFromImage: anImage |
|
112 |
]. |
|
113 |
imageEditor openModal. |
|
114 |
||
2766 | 115 |
newImage := imageEditor savedImage. |
2764 | 116 |
^ newImage |
117 |
! |
|
118 |
||
1966 | 119 |
openOnClass:aClass andSelector:aSelector |
120 |
"opens an Image Editor on aClass and aSelector" |
|
400 | 121 |
|
2764 | 122 |
self openLoadingImageWith:[:editor | |
123 |
editor loadFromClass:aClass theNonMetaclass andSelector:aSelector. |
|
124 |
] |
|
1057 | 125 |
|
1966 | 126 |
" |
127 |
self openOnClass:self andSelector:#leftMouseKeyIcon |
|
128 |
self openOnClass:self andSelector:nil |
|
129 |
" |
|
130 |
||
1057 | 131 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
400 | 132 |
! |
133 |
||
1966 | 134 |
openOnFile:aFileName |
135 |
"opens an Image Editor on aFileName" |
|
400 | 136 |
|
2764 | 137 |
self openLoadingImageWith:[:editor | |
138 |
editor loadFromFile:aFileName. |
|
139 |
] |
|
1057 | 140 |
|
1966 | 141 |
" |
1975 | 142 |
self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' |
1966 | 143 |
" |
144 |
||
1057 | 145 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
400 | 146 |
! |
147 |
||
1966 | 148 |
openOnImage:anImage |
149 |
"opens an Image Editor on anImage" |
|
400 | 150 |
|
2764 | 151 |
self openLoadingImageWith:[:editor | |
152 |
editor loadFromImage: anImage. |
|
153 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
154 |
|
1966 | 155 |
" |
156 |
self openOnImage: Icon startIcon |
|
157 |
" |
|
158 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
159 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 160 |
! ! |
161 |
||
162 |
!ImageEditor class methodsFor:'accessing'! |
|
163 |
||
164 |
listOfColorMaps |
|
767 | 165 |
"returns the list of default color maps for a new image" |
400 | 166 |
|
167 |
|colorMap| |
|
898 | 168 |
|
400 | 169 |
(colorMap := OrderedCollection new) |
170 |
add: Color black; |
|
171 |
add: Color white; |
|
172 |
add: Color red; |
|
173 |
add: Color green; |
|
174 |
add: Color blue; |
|
175 |
add: Color cyan; |
|
176 |
add: Color yellow; |
|
177 |
add: Color magenta; |
|
898 | 178 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
179 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
180 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
181 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
182 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
183 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
184 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
185 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
186 |
||
400 | 187 |
0 to: 5 do: |
188 |
[:r| |
|
189 |
0 to: 5 do: |
|
190 |
[:g| |
|
191 |
0 to: 5 do: |
|
192 |
[:b| |
|
898 | 193 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 194 |
] |
195 |
] |
|
196 |
]. |
|
197 |
||
198 |
1 to: 25 do: |
|
199 |
[:g| |
|
898 | 200 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 201 |
]. |
202 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
203 |
^ Dictionary new |
2571 | 204 |
at: #depth32 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF); |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
205 |
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
|
206 |
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
|
207 |
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
|
208 |
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
|
209 |
at: #depth8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
210 |
at: #masked8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
211 |
at: #depth4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
212 |
at: #masked4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
213 |
at: #depth2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
214 |
at: #masked2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
215 |
at: #depth1 put: (colorMap copyFrom: 1 to: 2); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
216 |
at: #masked1 put: (colorMap copyFrom: 1 to: 2); |
400 | 217 |
yourself |
218 |
! |
|
219 |
||
220 |
listOfDefaultSizes |
|
767 | 221 |
"returns the list of default sizes for a new image" |
400 | 222 |
|
1960 | 223 |
^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
224 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
225 |
"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
|
226 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
227 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
228 |
namesOfColorMaps |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
229 |
^ Dictionary new |
2571 | 230 |
at: #depth32 put: '32-plane (rgba)'; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
231 |
at: #depth24 put: '24-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
232 |
at: #masked24 put: '24-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
233 |
at: #depth16 put: '16-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
234 |
at: #masked16 put: '16-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
235 |
at: #depth8 put: ' 8-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
236 |
at: #masked8 put: ' 8-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
237 |
at: #depth4 put: ' 4-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
238 |
at: #masked4 put: ' 4-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
239 |
at: #depth2 put: ' 2-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
240 |
at: #masked2 put: ' 2-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
241 |
at: #depth1 put: ' 1-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
242 |
at: #masked1 put: ' 1-plane + mask' ; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
243 |
yourself |
400 | 244 |
! ! |
245 |
||
460 | 246 |
!ImageEditor class methodsFor:'help specs'! |
247 |
||
1545 | 248 |
flyByHelpSpec |
249 |
<resource: #help> |
|
250 |
||
2871 | 251 |
^super flyByHelpSpec addPairsFrom:(self localHelpTexts) |
252 |
||
253 |
"Modified: / 19-01-2012 / 13:29:48 / cg" |
|
1545 | 254 |
! |
255 |
||
460 | 256 |
helpSpec |
737 | 257 |
"This resource specification was automatically generated |
258 |
by the UIHelpTool of ST/X." |
|
259 |
||
260 |
"Do not manually edit this!! If it is corrupted, |
|
261 |
the UIHelpTool may not be able to read the specification." |
|
460 | 262 |
|
263 |
" |
|
737 | 264 |
UIHelpTool openOnClass:ImageEditor |
460 | 265 |
" |
266 |
||
737 | 267 |
<resource: #help> |
268 |
||
2871 | 269 |
^ super helpSpec addPairsFrom:(self localHelpTexts) |
270 |
||
271 |
"Modified: / 19-01-2012 / 13:29:42 / cg" |
|
272 |
! |
|
273 |
||
274 |
localHelpTexts |
|
275 |
"This resource specification was automatically generated |
|
276 |
by the UIHelpTool of ST/X." |
|
277 |
||
278 |
"Do not manually edit this!! If it is corrupted, |
|
279 |
the UIHelpTool may not be able to read the specification." |
|
280 |
||
281 |
" |
|
282 |
UIHelpTool openOnClass:ImageEditor |
|
283 |
" |
|
284 |
||
285 |
<resource: #help> |
|
286 |
||
287 |
^ #( |
|
288 |
||
289 |
#xdrawModeBox |
|
290 |
'Rectangle' |
|
291 |
||
292 |
#xdrawModeCopy |
|
293 |
'Copy' |
|
294 |
||
295 |
#xdrawModeFill |
|
296 |
'Flood-fill' |
|
297 |
||
298 |
#xdrawModeFilledBox |
|
299 |
'Filled rectangle' |
|
300 |
||
301 |
#xdrawModePaste |
|
302 |
'Paste' |
|
303 |
||
304 |
#xdrawModePasteUnder |
|
305 |
'Paste under' |
|
306 |
||
307 |
#xdrawModePasteWithMask |
|
308 |
'Paste with Mask' |
|
309 |
||
310 |
#xdrawModePoint |
|
311 |
'Point' |
|
312 |
||
313 |
#xfileGrabImage |
|
314 |
'Pick from screen' |
|
315 |
||
316 |
#xfileLoadFromClass |
|
317 |
'Load from method...' |
|
318 |
||
319 |
#xfileLoadFromFile |
|
320 |
'Load from file...' |
|
321 |
||
322 |
#xfileNewImage |
|
323 |
'New image' |
|
324 |
||
325 |
#filePrint |
|
326 |
'Print' |
|
327 |
||
328 |
#xfileSaveAs |
|
329 |
'Save to file...' |
|
330 |
||
331 |
#xfileSaveMaskAs |
|
332 |
'Save mask to file...' |
|
333 |
||
334 |
#xfileSaveMethod |
|
335 |
'Save as method' |
|
336 |
||
337 |
#xfileSaveMethodAs |
|
338 |
'Save as Method...' |
|
339 |
||
340 |
#nextImageInSequence |
|
341 |
'Go to the next image in the animated gif image sequence.' |
|
342 |
||
343 |
#previousImageInSequence |
|
344 |
'Go to the previous image in the animated gif image sequence.' |
|
460 | 345 |
|
346 |
#colorMap |
|
2765 | 347 |
'ColorMap functions' |
929 | 348 |
|
349 |
#colorMap1 |
|
2765 | 350 |
'Convert to depth-1 image' |
929 | 351 |
|
986 | 352 |
#colorMap1M |
2765 | 353 |
'Convert to depth-1 image plus mask' |
986 | 354 |
|
929 | 355 |
#colorMap2 |
2765 | 356 |
'Convert to depth-2 image' |
357 |
||
358 |
#colorMap24 |
|
359 |
'Convert to depth-24 image (rgb)' |
|
929 | 360 |
|
986 | 361 |
#colorMap2M |
2765 | 362 |
'Convert to depth-2 image plus mask' |
363 |
||
364 |
#colorMap32 |
|
365 |
'Convert to depth-32 image (rgba)' |
|
986 | 366 |
|
929 | 367 |
#colorMap4 |
2765 | 368 |
'Convert to depth-4 image' |
929 | 369 |
|
986 | 370 |
#colorMap4M |
2765 | 371 |
'Convert to depth-4 image plus mask' |
986 | 372 |
|
929 | 373 |
#colorMap8 |
2765 | 374 |
'Convert to depth-8 image' |
929 | 375 |
|
376 |
#colorMap8M |
|
2765 | 377 |
'Convert to depth-8 image plus mask' |
2571 | 378 |
|
986 | 379 |
#colorMapTable |
2765 | 380 |
'Shows a list of used colors of the image' |
986 | 381 |
|
929 | 382 |
#compressColormap |
2765 | 383 |
'Remove unneeded entries from the colorMap' |
460 | 384 |
|
1045 | 385 |
#cropAll |
2765 | 386 |
'Find and remove all borders' |
986 | 387 |
|
1045 | 388 |
#cropBottom |
2765 | 389 |
'Find and remove bottom border' |
986 | 390 |
|
1045 | 391 |
#cropLeft |
2765 | 392 |
'Find and remove left border' |
986 | 393 |
|
1045 | 394 |
#cropManual |
986 | 395 |
'Specify border(s) to remove.' |
396 |
||
1045 | 397 |
#cropRight |
2765 | 398 |
'Find and remove right border' |
986 | 399 |
|
1045 | 400 |
#cropTop |
2765 | 401 |
'Find and remove top border' |
487 | 402 |
|
460 | 403 |
#drawModeBox |
2765 | 404 |
'Rectangle Drawing Mode' |
460 | 405 |
|
2375 | 406 |
#drawModeCircle |
2765 | 407 |
'Circle Drawing Mode' |
2375 | 408 |
|
460 | 409 |
#drawModeCopy |
2765 | 410 |
'Area Copy Mode' |
460 | 411 |
|
412 |
#drawModeFill |
|
2765 | 413 |
'Flood Fill Mode' |
460 | 414 |
|
415 |
#drawModeFilledBox |
|
2765 | 416 |
'Filled Rectangle Drawing Mode' |
460 | 417 |
|
418 |
#drawModePaste |
|
2765 | 419 |
'Paste Mode' |
914 | 420 |
|
421 |
#drawModePasteUnder |
|
2765 | 422 |
'Paste-Under Mode' |
1637 | 423 |
|
424 |
#drawModePasteWithMask |
|
2765 | 425 |
'Paste-with-Mask Mode' |
460 | 426 |
|
427 |
#drawModePoint |
|
2765 | 428 |
'Point Drawing Mode' |
2375 | 429 |
|
1639 | 430 |
#drawModeSpecial |
2871 | 431 |
'Special operations (select rectangle, then choose operation)' |
1639 | 432 |
|
2765 | 433 |
#drawModeSpray |
434 |
'Spray Drawing Mode' |
|
435 |
||
460 | 436 |
#editFlipHorizontal |
2765 | 437 |
'Flip the image horizontally' |
460 | 438 |
|
439 |
#editFlipVertical |
|
2765 | 440 |
'Flip the image vertically' |
460 | 441 |
|
442 |
#editMagnifyImage |
|
2765 | 443 |
'Magnify the image' |
460 | 444 |
|
445 |
#editNegate |
|
2765 | 446 |
'Invert the images colors' |
460 | 447 |
|
448 |
#editResize |
|
2765 | 449 |
'Resize the image (preserving the old image)' |
460 | 450 |
|
451 |
#editRotate |
|
2765 | 452 |
'Rotate the image' |
460 | 453 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
454 |
#fileGrabImageFromScreen |
2765 | 455 |
'Pick an image from the screen (specify area)' |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
456 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
457 |
#fileGrabImageFromWindow |
2765 | 458 |
'Pick an image from a window on the screen (click on window)' |
929 | 459 |
|
460 | 460 |
#fileLoadFromClass |
2765 | 461 |
'Select and load an image from a resource method' |
460 | 462 |
|
463 |
#fileLoadFromFile |
|
2765 | 464 |
'Select and load an image from a file' |
460 | 465 |
|
2796 | 466 |
#fileLoadFromURL |
467 |
'Load an image from the net, given its URL' |
|
468 |
||
460 | 469 |
#fileNewImage |
914 | 470 |
'Create a new image' |
460 | 471 |
|
472 |
#filePrint |
|
2765 | 473 |
'Print the image on a postscript printer' |
474 |
||
475 |
#fileSave |
|
476 |
'Save the image' |
|
460 | 477 |
|
478 |
#fileSaveAs |
|
2765 | 479 |
'Save the image to a file' |
480 |
||
481 |
#fileSaveButtonImageAs |
|
482 |
'Save an image of a button with the image to a file (for html use)' |
|
460 | 483 |
|
484 |
#fileSaveMaskAs |
|
2765 | 485 |
'Save the mask of the image to a file' |
1613 | 486 |
|
460 | 487 |
#fileSaveMethod |
2765 | 488 |
'Save the image as resource method in the current class and selector' |
460 | 489 |
|
490 |
#fileSaveMethodAs |
|
2765 | 491 |
'Save the image as resource method in a class' |
460 | 492 |
|
487 | 493 |
#magnificationNumber |
2765 | 494 |
'Shows the current magnification' |
487 | 495 |
|
496 |
#magnifyImageDown |
|
2765 | 497 |
'Decrease magnification' |
487 | 498 |
|
499 |
#magnifyImageUp |
|
2765 | 500 |
'Increase magnification' |
487 | 501 |
|
502 |
#mouseKeyColorMode |
|
2765 | 503 |
'Toggle between left and right mouse button color' |
487 | 504 |
|
505 |
#previewView |
|
2765 | 506 |
'Shows a preview of the image' |
487 | 507 |
|
905 | 508 |
#settingsGridMagnification |
2765 | 509 |
'Change the grid magnification of the edit view' |
905 | 510 |
|
460 | 511 |
) |
2871 | 512 |
|
513 |
"Created: / 19-01-2012 / 13:29:31 / cg" |
|
460 | 514 |
! ! |
515 |
||
737 | 516 |
!ImageEditor class methodsFor:'image specs'! |
517 |
||
2272 | 518 |
circleIcon |
519 |
"This resource specification was automatically generated |
|
520 |
by the ImageEditor of ST/X." |
|
521 |
||
522 |
"Do not manually edit this!! If it is corrupted, |
|
523 |
the ImageEditor may not be able to read the specification." |
|
524 |
||
525 |
" |
|
526 |
self circleIcon inspect |
|
527 |
ImageEditor openOnClass:self andSelector:#circleIcon |
|
528 |
Icon flushCachedIcons |
|
529 |
" |
|
530 |
||
531 |
<resource: #image> |
|
532 |
||
533 |
^Icon |
|
534 |
constantNamed:'ImageEditor class circleIcon' |
|
535 |
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:'@@@@@@N@CF@PDA@PH@ BB@HDA@PD@1 @8@@@@@a') ; yourself); yourself] |
|
536 |
! |
|
537 |
||
1637 | 538 |
copyIcon |
539 |
"This resource specification was automatically generated |
|
540 |
by the ImageEditor of ST/X." |
|
541 |
||
542 |
"Do not manually edit this!! If it is corrupted, |
|
543 |
the ImageEditor may not be able to read the specification." |
|
544 |
||
545 |
" |
|
546 |
self copyIcon inspect |
|
547 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
548 |
Icon flushCachedIcons |
|
549 |
" |
|
550 |
||
551 |
<resource: #image> |
|
552 |
||
553 |
^Icon |
|
2272 | 554 |
constantNamed:'ImageEditor class copyIcon' |
1975 | 555 |
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 | 556 |
! |
557 |
||
2155 | 558 |
defaultIcon |
559 |
<resource: #programImage> |
|
560 |
||
561 |
^ ToolbarIconLibrary startImageEditorIcon |
|
562 |
! |
|
563 |
||
2871 | 564 |
fillGradientRectIcon |
565 |
"This resource specification was automatically generated |
|
566 |
by the ImageEditor of ST/X." |
|
567 |
||
568 |
"Do not manually edit this!! If it is corrupted, |
|
569 |
the ImageEditor may not be able to read the specification." |
|
570 |
||
571 |
" |
|
572 |
self fillGradientRectIcon inspect |
|
573 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
574 |
Icon flushCachedIcons |
|
575 |
" |
|
576 |
||
577 |
<resource: #image> |
|
578 |
||
579 |
^Icon |
|
580 |
constantNamed:'ImageEditor class fillGradientRectIcon' |
|
581 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@ |
|
582 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 63 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] |
|
583 |
! |
|
584 |
||
585 |
fillHorizontalGradientRectIcon |
|
586 |
"This resource specification was automatically generated |
|
587 |
by the ImageEditor of ST/X." |
|
588 |
||
589 |
"Do not manually edit this!! If it is corrupted, |
|
590 |
the ImageEditor may not be able to read the specification." |
|
591 |
||
592 |
" |
|
593 |
self fillHorizontalGradientRectIcon inspect |
|
594 |
ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon |
|
595 |
Icon flushCachedIcons |
|
596 |
" |
|
597 |
||
598 |
<resource: #image> |
|
599 |
||
600 |
^Icon |
|
601 |
constantNamed:'ImageEditor class fillHorizontalGradientRectIcon' |
|
602 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@@@@@@@ |
|
603 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 63 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] |
|
604 |
! |
|
605 |
||
1637 | 606 |
fillIcon |
607 |
"This resource specification was automatically generated |
|
608 |
by the ImageEditor of ST/X." |
|
609 |
||
610 |
"Do not manually edit this!! If it is corrupted, |
|
611 |
the ImageEditor may not be able to read the specification." |
|
612 |
||
613 |
" |
|
614 |
self fillIcon inspect |
|
615 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
616 |
Icon flushCachedIcons |
|
617 |
" |
|
618 |
||
619 |
<resource: #image> |
|
620 |
||
621 |
^Icon |
|
2272 | 622 |
constantNamed:'ImageEditor class fillIcon' |
1975 | 623 |
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 | 624 |
! |
625 |
||
626 |
fillRectIcon |
|
627 |
"This resource specification was automatically generated |
|
628 |
by the ImageEditor of ST/X." |
|
629 |
||
630 |
"Do not manually edit this!! If it is corrupted, |
|
631 |
the ImageEditor may not be able to read the specification." |
|
632 |
||
633 |
" |
|
634 |
self fillRectIcon inspect |
|
635 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
636 |
Icon flushCachedIcons |
|
637 |
" |
|
638 |
||
639 |
<resource: #image> |
|
640 |
||
641 |
^Icon |
|
2272 | 642 |
constantNamed:'ImageEditor class fillRectIcon' |
643 |
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] |
|
1637 | 644 |
! |
645 |
||
2871 | 646 |
fillVerticalGradientRectIcon |
647 |
"This resource specification was automatically generated |
|
648 |
by the ImageEditor of ST/X." |
|
649 |
||
650 |
"Do not manually edit this!! If it is corrupted, |
|
651 |
the ImageEditor may not be able to read the specification." |
|
652 |
||
653 |
" |
|
654 |
self fillGradientRectIcon inspect |
|
655 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
656 |
Icon flushCachedIcons |
|
657 |
" |
|
658 |
||
659 |
<resource: #image> |
|
660 |
||
661 |
^Icon |
|
662 |
constantNamed:'ImageEditor class fillGradientRectIcon' |
|
663 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@ |
|
664 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 63 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] |
|
665 |
||
666 |
"Created: / 19-01-2012 / 13:44:51 / cg" |
|
667 |
! |
|
668 |
||
2837 | 669 |
flipHorizontalIcon |
670 |
"This resource specification was automatically generated |
|
671 |
by the ImageEditor of ST/X." |
|
672 |
||
673 |
"Do not manually edit this!! If it is corrupted, |
|
674 |
the ImageEditor may not be able to read the specification." |
|
675 |
||
676 |
" |
|
677 |
self flipHorizontalIcon inspect |
|
678 |
ImageEditor openOnClass:self andSelector:#flipHorizontalIcon |
|
679 |
Icon flushCachedIcons |
|
680 |
" |
|
681 |
||
682 |
<resource: #image> |
|
683 |
||
684 |
^Icon |
|
685 |
constantNamed:'ImageEditor class flipHorizontalIcon' |
|
686 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@A@C?8HP )JC$8_?1??C$8JR !!BC?8@P@@@@@a') ; yourself); yourself] |
|
687 |
! |
|
688 |
||
689 |
flipVerticalIcon |
|
690 |
"This resource specification was automatically generated |
|
691 |
by the ImageEditor of ST/X." |
|
692 |
||
693 |
"Do not manually edit this!! If it is corrupted, |
|
694 |
the ImageEditor may not be able to read the specification." |
|
695 |
||
696 |
" |
|
697 |
self flipVerticalIcon inspect |
|
698 |
ImageEditor openOnClass:self andSelector:#flipVerticalIcon |
|
699 |
Icon flushCachedIcons |
|
700 |
" |
|
701 |
||
702 |
<resource: #image> |
|
703 |
||
704 |
^Icon |
|
705 |
constantNamed:'ImageEditor class flipVerticalIcon' |
|
706 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@C?0I9@/4BLPH1A?>BLPH1@/4B^PO?@C@@@a') ; yourself); yourself] |
|
707 |
! |
|
708 |
||
737 | 709 |
leftMouseKeyIcon |
710 |
"This resource specification was automatically generated |
|
711 |
by the ImageEditor of ST/X." |
|
712 |
||
713 |
"Do not manually edit this!! If it is corrupted, |
|
714 |
the ImageEditor may not be able to read the specification." |
|
715 |
||
716 |
" |
|
1405 | 717 |
self leftMouseKeyIcon inspect |
737 | 718 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
2272 | 719 |
Icon flushCachedIcons |
737 | 720 |
" |
721 |
||
722 |
<resource: #image> |
|
723 |
||
724 |
^Icon |
|
2272 | 725 |
constantNamed:'ImageEditor class leftMouseKeyIcon' |
726 |
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] |
|
1433 | 727 |
! |
737 | 728 |
|
1637 | 729 |
pasteIcon |
730 |
"This resource specification was automatically generated |
|
731 |
by the ImageEditor of ST/X." |
|
732 |
||
733 |
"Do not manually edit this!! If it is corrupted, |
|
734 |
the ImageEditor may not be able to read the specification." |
|
735 |
||
736 |
" |
|
737 |
self pasteIcon inspect |
|
738 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
739 |
Icon flushCachedIcons |
|
740 |
" |
|
741 |
||
742 |
<resource: #image> |
|
743 |
||
744 |
^Icon |
|
2272 | 745 |
constantNamed:'ImageEditor class pasteIcon' |
1975 | 746 |
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& |
747 |
@@@@@@@@@@@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 | 748 |
! |
749 |
||
750 |
pasteUnderIcon |
|
751 |
"This resource specification was automatically generated |
|
752 |
by the ImageEditor of ST/X." |
|
753 |
||
754 |
"Do not manually edit this!! If it is corrupted, |
|
755 |
the ImageEditor may not be able to read the specification." |
|
756 |
||
757 |
" |
|
758 |
self pasteUnderIcon inspect |
|
759 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
760 |
Icon flushCachedIcons |
|
761 |
" |
|
762 |
||
763 |
<resource: #image> |
|
764 |
||
765 |
^Icon |
|
2272 | 766 |
constantNamed:'ImageEditor class pasteUnderIcon' |
1975 | 767 |
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& |
768 |
@@@@@@@@@@@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 | 769 |
! |
770 |
||
771 |
pasteWithMaskIcon |
|
772 |
"This resource specification was automatically generated |
|
773 |
by the ImageEditor of ST/X." |
|
774 |
||
775 |
"Do not manually edit this!! If it is corrupted, |
|
776 |
the ImageEditor may not be able to read the specification." |
|
777 |
||
778 |
" |
|
779 |
self pasteWithMaskIcon inspect |
|
780 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
781 |
Icon flushCachedIcons |
|
782 |
" |
|
783 |
||
784 |
<resource: #image> |
|
785 |
||
786 |
^Icon |
|
2272 | 787 |
constantNamed:'ImageEditor class pasteWithMaskIcon' |
788 |
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& |
|
789 |
@@@@@@@@@@@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 | 790 |
! |
791 |
||
792 |
pointIcon |
|
793 |
"This resource specification was automatically generated |
|
794 |
by the ImageEditor of ST/X." |
|
795 |
||
796 |
"Do not manually edit this!! If it is corrupted, |
|
797 |
the ImageEditor may not be able to read the specification." |
|
798 |
||
799 |
" |
|
800 |
self pointIcon inspect |
|
801 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
802 |
Icon flushCachedIcons |
|
803 |
" |
|
804 |
||
805 |
<resource: #image> |
|
806 |
||
807 |
^Icon |
|
2272 | 808 |
constantNamed:'ImageEditor class pointIcon' |
1975 | 809 |
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 | 810 |
! |
811 |
||
812 |
rectIcon |
|
813 |
"This resource specification was automatically generated |
|
814 |
by the ImageEditor of ST/X." |
|
815 |
||
816 |
"Do not manually edit this!! If it is corrupted, |
|
817 |
the ImageEditor may not be able to read the specification." |
|
818 |
||
819 |
" |
|
820 |
self rectIcon inspect |
|
821 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
822 |
Icon flushCachedIcons |
|
823 |
" |
|
824 |
||
825 |
<resource: #image> |
|
826 |
||
827 |
^Icon |
|
2272 | 828 |
constantNamed:'ImageEditor class rectIcon' |
829 |
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] |
|
1637 | 830 |
! |
831 |
||
737 | 832 |
rightMouseKeyIcon |
833 |
"This resource specification was automatically generated |
|
834 |
by the ImageEditor of ST/X." |
|
835 |
||
836 |
"Do not manually edit this!! If it is corrupted, |
|
837 |
the ImageEditor may not be able to read the specification." |
|
838 |
||
839 |
" |
|
1405 | 840 |
self rightMouseKeyIcon inspect |
737 | 841 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
2272 | 842 |
Icon flushCachedIcons |
737 | 843 |
" |
844 |
||
845 |
<resource: #image> |
|
846 |
||
847 |
^Icon |
|
2272 | 848 |
constantNamed:'ImageEditor class rightMouseKeyIcon' |
849 |
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 | 850 |
! |
851 |
||
2881 | 852 |
specialCircleIcon |
853 |
"This resource specification was automatically generated |
|
854 |
by the ImageEditor of ST/X." |
|
855 |
||
856 |
"Do not manually edit this!! If it is corrupted, |
|
857 |
the ImageEditor may not be able to read the specification." |
|
858 |
||
859 |
" |
|
860 |
self specialCircleIcon inspect |
|
861 |
ImageEditor openOnClass:self andSelector:#specialCircleIcon |
|
862 |
Icon flushCachedIcons |
|
863 |
" |
|
864 |
||
865 |
<resource: #image> |
|
866 |
||
867 |
^Icon |
|
868 |
constantNamed:'ImageEditor class specialCircleIcon' |
|
869 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@!!BDB@ D4@HP@!!@BD@HHA@PHP!!@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@-@D2@''$D^HQ8!!G"DLHH1@PH@-@@0@@@@@a') ; yourself); yourself] |
|
870 |
! |
|
871 |
||
1637 | 872 |
specialIcon |
873 |
"This resource specification was automatically generated |
|
874 |
by the ImageEditor of ST/X." |
|
875 |
||
876 |
"Do not manually edit this!! If it is corrupted, |
|
877 |
the ImageEditor may not be able to read the specification." |
|
878 |
||
879 |
" |
|
880 |
self specialIcon inspect |
|
881 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
882 |
Icon flushCachedIcons |
|
883 |
" |
|
884 |
||
885 |
<resource: #image> |
|
886 |
||
887 |
^Icon |
|
2272 | 888 |
constantNamed:'ImageEditor class specialIcon' |
2881 | 889 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@G!!:P@!!@B4@HP@!!@BD@HP@!!@BW!!8@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@G-8P0!!G"D^HQ8!!G"DLHP0!!@BG-8@0@@@@@a') ; yourself); yourself] |
2375 | 890 |
! |
891 |
||
892 |
sprayIcon |
|
893 |
"This resource specification was automatically generated |
|
894 |
by the ImageEditor of ST/X." |
|
895 |
||
896 |
"Do not manually edit this!! If it is corrupted, |
|
897 |
the ImageEditor may not be able to read the specification." |
|
898 |
||
899 |
" |
|
900 |
self sprayIcon inspect |
|
901 |
ImageEditor openOnClass:self andSelector:#sprayIcon |
|
902 |
Icon flushCachedIcons |
|
903 |
" |
|
904 |
||
905 |
<resource: #image> |
|
906 |
||
907 |
^Icon |
|
908 |
constantNamed:'ImageEditor class sprayIcon' |
|
909 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@D@@@@@@@DA@@@@@@D@D@@@@@@A@PD@@@@@@A@P@@@@@@@A@P@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
910 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 84 84 84 170 170 170 255 255 255 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@B@@(A)@F*@IPA2 H$@"@BH@H @"@BH@O @@a') ; yourself); yourself] |
|
1433 | 911 |
! ! |
737 | 912 |
|
400 | 913 |
!ImageEditor class methodsFor:'interface specs'! |
914 |
||
1650 | 915 |
changeHLSDialogSpec |
916 |
"This resource specification was automatically generated |
|
917 |
by the UIPainter of ST/X." |
|
918 |
||
919 |
"Do not manually edit this!! If it is corrupted, |
|
920 |
the UIPainter may not be able to read the specification." |
|
921 |
||
922 |
" |
|
923 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
924 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
925 |
" |
|
926 |
||
927 |
<resource: #canvas> |
|
928 |
||
929 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
930 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
931 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
932 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
933 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
934 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
935 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
936 |
min: (Point 10 10) |
2438 | 937 |
bounds: (Rectangle 0 0 312 258) |
1650 | 938 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
939 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
940 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
941 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
942 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
943 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
944 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
945 |
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
|
946 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
947 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
948 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
949 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
950 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
951 |
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
|
952 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
953 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
954 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
955 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
956 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
957 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
958 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
959 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
960 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
961 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
962 |
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
|
963 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
964 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
965 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
966 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
967 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
968 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
969 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
970 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
971 |
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
|
972 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
973 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
974 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
975 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
976 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
977 |
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
|
978 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
979 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
980 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
981 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
982 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
983 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
984 |
acceptOnPointerLeave: false |
1650 | 985 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
986 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
987 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
988 |
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
|
989 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
990 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
991 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
992 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
993 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
994 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
995 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
996 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
997 |
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
|
998 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
999 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1000 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1001 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1002 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1003 |
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
|
1004 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1005 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1006 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1007 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1008 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1009 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1010 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1011 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1012 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1013 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1014 |
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
|
1015 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1016 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1017 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1018 |
step: 1 |
1650 | 1019 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1020 |
(LabelSpec |
2438 | 1021 |
label: 'Color Shift' |
1022 |
name: 'Label2' |
|
1023 |
layout: (LayoutFrame 5 0 110 0 -15 0.5 132 0) |
|
1024 |
translateLabel: true |
|
1025 |
) |
|
1026 |
(LabelSpec |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1027 |
name: 'HueColorLabel' |
2438 | 1028 |
layout: (LayoutFrame 18 0.0 133 0 -41 0.5 217 0) |
1029 |
level: -1 |
|
1975 | 1030 |
backgroundChannel: hlsColor |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1031 |
translateLabel: true |
1650 | 1032 |
) |
2438 | 1033 |
(LabelSpec |
1034 |
label: 'Preview' |
|
1035 |
name: 'Label3' |
|
1036 |
layout: (LayoutFrame 5 0.5 110 0 -5 1 132 0) |
|
1037 |
translateLabel: true |
|
1038 |
) |
|
1039 |
(LabelSpec |
|
1040 |
name: 'PreviewLabel' |
|
1041 |
layout: (LayoutFrame 36 0.5 133 0 -23 1.0 217 0) |
|
1042 |
level: -1 |
|
1043 |
translateLabel: true |
|
1044 |
labelChannel: previewImageHolder |
|
1045 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1046 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1047 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1048 |
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
|
1049 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1050 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1051 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1052 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1053 |
reverseOrderIfOKAtLeft: true |
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 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1058 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1059 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1060 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1061 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1062 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1063 |
extent: (Point 151 22) |
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 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1066 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1067 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1068 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1069 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1070 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1071 |
extent: (Point 152 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1072 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1073 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1074 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1075 |
) |
1650 | 1076 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1077 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1078 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1079 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1080 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1081 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1082 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1083 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1084 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1085 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1086 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1087 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1088 |
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
|
1089 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1090 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1091 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1092 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1093 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1094 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1095 |
<resource: #canvas> |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1096 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1097 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1098 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1099 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1100 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1101 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1102 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1103 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1104 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1105 |
bounds: (Rectangle 14 46 259 229) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1106 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1107 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1108 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1109 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1110 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1111 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1112 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1113 |
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
|
1114 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1115 |
adjust: right |
1650 | 1116 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1117 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1118 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1119 |
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
|
1120 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1121 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1122 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1123 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1124 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1125 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1126 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1127 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1128 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1129 |
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
|
1130 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1131 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1132 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1133 |
autoRepeat: true |
1650 | 1134 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1135 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1136 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1137 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1138 |
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
|
1139 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1140 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1141 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1142 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1143 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1144 |
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
|
1145 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1146 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1147 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1148 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1149 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1150 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1151 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1152 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1153 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1154 |
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
|
1155 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1156 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1157 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1158 |
autoRepeat: true |
1650 | 1159 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1160 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1161 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1162 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1163 |
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
|
1164 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1165 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1166 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1167 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1168 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1169 |
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
|
1170 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1171 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1172 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1173 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1174 |
acceptOnPointerLeave: false |
1650 | 1175 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1176 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1177 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1178 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1179 |
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
|
1180 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1181 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1182 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1183 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1184 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1185 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1186 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1187 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1188 |
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
|
1189 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1190 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1191 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1192 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1193 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1194 |
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
|
1195 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1196 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1197 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1198 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1199 |
acceptOnPointerLeave: false |
1650 | 1200 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1201 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1202 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1203 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1204 |
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
|
1205 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1206 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1207 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1208 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1209 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1210 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1211 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1212 |
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
|
1213 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1214 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1215 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1216 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1217 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1218 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1219 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1220 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1221 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1222 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1223 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1224 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1225 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1226 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1227 |
extent: (Point 77 22) |
1650 | 1228 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1229 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1230 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1231 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1232 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1233 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1234 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1235 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1236 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1237 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1238 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1239 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1240 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1241 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1242 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1243 |
extent: (Point 78 22) |
1650 | 1244 |
) |
1245 |
) |
|
1246 |
||
1247 |
) |
|
1248 |
) |
|
1249 |
) |
|
1250 |
||
1251 |
) |
|
1252 |
) |
|
1253 |
! |
|
1254 |
||
767 | 1255 |
dialogSpecForNewImage |
737 | 1256 |
"This resource specification was automatically generated |
1257 |
by the UIPainter of ST/X." |
|
519 | 1258 |
|
737 | 1259 |
"Do not manually edit this!! If it is corrupted, |
1260 |
the UIPainter may not be able to read the specification." |
|
519 | 1261 |
|
1262 |
" |
|
767 | 1263 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
1264 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 1265 |
" |
1266 |
||
1267 |
<resource: #canvas> |
|
1268 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1269 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1270 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1271 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1272 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1273 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1274 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1275 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1276 |
min: (Point 10 10) |
1806 | 1277 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1278 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1279 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1280 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1281 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1282 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1283 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1284 |
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
|
1285 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1286 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1287 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1288 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1289 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1290 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1291 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1292 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1293 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1294 |
labelPosition: topLeft |
1806 | 1295 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1296 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1297 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1298 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1299 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1300 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1301 |
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
|
1302 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1303 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1304 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1305 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1306 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1307 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1308 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1309 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1310 |
) |
1490 | 1311 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1312 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1313 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1314 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1315 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1316 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1317 |
labelPosition: topLeft |
1806 | 1318 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1319 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1320 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1321 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1322 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1323 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1324 |
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
|
1325 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1326 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1327 |
useIndex: false |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1328 |
hidePullDownMenuButton: false |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1329 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1330 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1331 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1332 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1333 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1334 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1335 |
|
986 | 1336 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1337 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1338 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1339 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1340 |
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
|
1341 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1342 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1343 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1344 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1345 |
) |
986 | 1346 |
) |
1347 |
! |
|
1348 |
||
1557 | 1349 |
shiftDialogSpec |
1350 |
"This resource specification was automatically generated |
|
1351 |
by the UIPainter of ST/X." |
|
1352 |
||
1353 |
"Do not manually edit this!! If it is corrupted, |
|
1354 |
the UIPainter may not be able to read the specification." |
|
1355 |
||
1356 |
" |
|
1357 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1358 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1359 |
" |
|
1360 |
||
1361 |
<resource: #canvas> |
|
1362 |
||
1363 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1364 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1365 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1366 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1367 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1368 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1369 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1370 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1371 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1372 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1373 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1374 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1375 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1376 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1377 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1378 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1379 |
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
|
1380 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1381 |
adjust: right |
1557 | 1382 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1383 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1384 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1385 |
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
|
1386 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1387 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1388 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1389 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1390 |
acceptOnPointerLeave: false |
1557 | 1391 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1392 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1393 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1394 |
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
|
1395 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1396 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1397 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1398 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1399 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1400 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1401 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1402 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1403 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1404 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1405 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1406 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1407 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1408 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1409 |
extent: (Point 118 22) |
1557 | 1410 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1411 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1412 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1413 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1414 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1415 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1416 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1417 |
extent: (Point 118 22) |
1557 | 1418 |
) |
1419 |
) |
|
1420 |
||
1421 |
) |
|
1422 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1423 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1424 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1425 |
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
|
1426 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1427 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1428 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1429 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1430 |
direction: up |
1557 | 1431 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1432 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1433 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1434 |
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
|
1435 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1436 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1437 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1438 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1439 |
direction: left |
1557 | 1440 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1441 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1442 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1443 |
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
|
1444 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1445 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1446 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1447 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1448 |
direction: right |
1557 | 1449 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1450 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1451 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1452 |
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
|
1453 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1454 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1455 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1456 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1457 |
direction: down |
1557 | 1458 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1459 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1460 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1461 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1462 |
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
|
1463 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1464 |
translateLabel: true |
1713 | 1465 |
) |
1557 | 1466 |
) |
1467 |
||
1468 |
) |
|
1469 |
) |
|
1470 |
! |
|
1471 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1472 |
uncropDialogSpec |
1480 | 1473 |
"This resource specification was automatically generated |
1474 |
by the UIPainter of ST/X." |
|
1796 | 1475 |
|
1480 | 1476 |
"Do not manually edit this!! If it is corrupted, |
1477 |
the UIPainter may not be able to read the specification." |
|
1796 | 1478 |
|
1480 | 1479 |
" |
1796 | 1480 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1481 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1482 |
" |
1796 | 1483 |
|
1484 |
<resource: #canvas> |
|
1485 |
||
1486 |
^ |
|
1487 |
#(FullSpec |
|
1488 |
name: uncropDialogSpec |
|
1489 |
window: |
|
1490 |
(WindowSpec |
|
1491 |
label: 'Add Border(s)' |
|
1492 |
name: 'Add Border(s)' |
|
1493 |
min: (Point 10 10) |
|
1494 |
max: (Point 800 478) |
|
1495 |
bounds: (Rectangle 0 0 261 228) |
|
1496 |
) |
|
1497 |
component: |
|
1498 |
(SpecCollection |
|
1499 |
collection: ( |
|
1500 |
(LabelSpec |
|
1501 |
label: 'Left:' |
|
1502 |
name: 'Label1' |
|
1503 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1504 |
translateLabel: true |
|
1505 |
adjust: right |
|
1506 |
) |
|
1507 |
(InputFieldSpec |
|
1508 |
name: 'EntryField1' |
|
1509 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
1510 |
model: left |
|
1511 |
type: number |
|
1512 |
acceptOnPointerLeave: false |
|
1513 |
) |
|
1514 |
(LabelSpec |
|
1515 |
label: 'Right:' |
|
1516 |
name: 'Label2' |
|
1517 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
1518 |
translateLabel: true |
|
1519 |
adjust: right |
|
1520 |
) |
|
1521 |
(InputFieldSpec |
|
1522 |
name: 'EntryField2' |
|
1523 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
1524 |
model: right |
|
1525 |
type: number |
|
1526 |
acceptOnPointerLeave: false |
|
1527 |
) |
|
1528 |
(LabelSpec |
|
1529 |
label: 'Top:' |
|
1530 |
name: 'Label3' |
|
1531 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
1532 |
translateLabel: true |
|
1533 |
adjust: right |
|
1534 |
) |
|
1535 |
(InputFieldSpec |
|
1536 |
name: 'EntryField3' |
|
1537 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
1538 |
model: top |
|
1539 |
type: number |
|
1540 |
acceptOnPointerLeave: false |
|
1541 |
) |
|
1542 |
(LabelSpec |
|
1543 |
label: 'Bottom:' |
|
1544 |
name: 'Label4' |
|
1545 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
1546 |
translateLabel: true |
|
1547 |
adjust: right |
|
1548 |
) |
|
1549 |
(InputFieldSpec |
|
1550 |
name: 'EntryField4' |
|
1551 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
1552 |
model: bottom |
|
1553 |
type: number |
|
1554 |
acceptOnPointerLeave: false |
|
1555 |
) |
|
1556 |
(HorizontalPanelViewSpec |
|
1557 |
name: 'HorizontalPanel1' |
|
1558 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1559 |
horizontalLayout: fitSpace |
|
1560 |
verticalLayout: center |
|
1561 |
horizontalSpace: 3 |
|
1562 |
verticalSpace: 3 |
|
1563 |
reverseOrderIfOKAtLeft: true |
|
1564 |
component: |
|
1565 |
(SpecCollection |
|
1566 |
collection: ( |
|
1567 |
(ActionButtonSpec |
|
1568 |
label: 'Cancel' |
|
1569 |
name: 'Button1' |
|
1570 |
translateLabel: true |
|
1571 |
model: cancel |
|
1572 |
extent: (Point 118 22) |
|
1573 |
) |
|
1574 |
(ActionButtonSpec |
|
1575 |
label: 'OK' |
|
1576 |
name: 'Button2' |
|
1577 |
translateLabel: true |
|
1578 |
model: accept |
|
1579 |
extent: (Point 118 22) |
|
1580 |
) |
|
1581 |
) |
|
1582 |
||
1583 |
) |
|
1584 |
) |
|
1585 |
) |
|
1586 |
||
1587 |
) |
|
1588 |
) |
|
1480 | 1589 |
! |
1590 |
||
767 | 1591 |
windowSpec |
1592 |
"This resource specification was automatically generated |
|
1593 |
by the UIPainter of ST/X." |
|
1594 |
||
1595 |
"Do not manually edit this!! If it is corrupted, |
|
1596 |
the UIPainter may not be able to read the specification." |
|
1597 |
||
1598 |
" |
|
1599 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
1600 |
ImageEditor new openInterface:#windowSpec |
|
1601 |
ImageEditor open |
|
1602 |
" |
|
1603 |
||
1604 |
<resource: #canvas> |
|
1605 |
||
1558 | 1606 |
^ |
1820 | 1607 |
#(FullSpec |
1608 |
name: windowSpec |
|
1609 |
window: |
|
1610 |
(WindowSpec |
|
1611 |
label: 'Image Editor' |
|
1612 |
name: 'Image Editor' |
|
1613 |
min: (Point 400 320) |
|
1614 |
bounds: (Rectangle 0 0 450 350) |
|
1615 |
menu: menu |
|
2155 | 1616 |
icon: defaultIcon |
1558 | 1617 |
) |
1820 | 1618 |
component: |
1619 |
(SpecCollection |
|
1620 |
collection: ( |
|
1621 |
(MenuPanelSpec |
|
1622 |
name: 'menuToolbarView' |
|
1623 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1624 |
style: (FontDescription helvetica medium roman 10) |
|
1625 |
menu: menuToolbar |
|
1626 |
showSeparatingLines: true |
|
1558 | 1627 |
) |
1820 | 1628 |
(VariableHorizontalPanelSpec |
1998 | 1629 |
name: 'mainPanel' |
1820 | 1630 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
1631 |
snapMode: both |
|
1843 | 1632 |
barLevel: 0 |
1820 | 1633 |
component: |
1634 |
(SpecCollection |
|
1635 |
collection: ( |
|
1636 |
(ViewSpec |
|
1637 |
name: 'leftView' |
|
1638 |
level: 1 |
|
1639 |
component: |
|
1640 |
(SpecCollection |
|
1641 |
collection: ( |
|
1642 |
(VariableVerticalPanelSpec |
|
1643 |
name: 'verticalPanel' |
|
1644 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1645 |
level: 0 |
|
1646 |
snapMode: both |
|
1647 |
component: |
|
1648 |
(SpecCollection |
|
1649 |
collection: ( |
|
1650 |
(ViewSpec |
|
1651 |
name: 'View1' |
|
1652 |
component: |
|
1653 |
(SpecCollection |
|
1654 |
collection: ( |
|
1655 |
(MenuPanelSpec |
|
1656 |
name: 'MouseButtonColorToolBar' |
|
1657 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
1658 |
level: 0 |
|
1659 |
menu: menuMouseButtonColors |
|
1558 | 1660 |
) |
1820 | 1661 |
(DataSetSpec |
1662 |
name: 'colorDataSetView' |
|
1663 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
1664 |
activeHelpKey: colorMapTable |
|
1665 |
style: (FontDescription helvetica medium roman 10) |
|
1666 |
model: selectionOfColor |
|
1667 |
menu: colorMapMenu |
|
1668 |
hasHorizontalScrollBar: true |
|
1669 |
hasVerticalScrollBar: true |
|
1670 |
miniScrollerHorizontal: true |
|
1671 |
miniScrollerVertical: true |
|
1672 |
dataList: listOfColors |
|
1673 |
has3Dseparators: true |
|
2174 | 1674 |
doubleClickSelector: doubleClickOnColor: |
1900 | 1675 |
columnHolder: colorTableColumns |
1820 | 1676 |
verticalSpacing: 1 |
1677 |
columnAdaptor: colorColumnAdaptor |
|
767 | 1678 |
) |
1558 | 1679 |
) |
1680 |
||
1681 |
) |
|
1682 |
) |
|
1820 | 1683 |
(ArbitraryComponentSpec |
1684 |
name: 'imagePreView' |
|
1685 |
activeHelpKey: previewView |
|
1686 |
menu: previewMenu |
|
1687 |
hasHorizontalScrollBar: true |
|
1688 |
hasVerticalScrollBar: true |
|
2728 | 1689 |
miniScrollerHorizontal: false |
1690 |
miniScrollerVertical: false |
|
1820 | 1691 |
hasBorder: false |
1692 |
component: ImageView |
|
767 | 1693 |
) |
1558 | 1694 |
) |
1695 |
||
767 | 1696 |
) |
1820 | 1697 |
handles: (Any 0.5 1.0) |
767 | 1698 |
) |
1558 | 1699 |
) |
1700 |
||
767 | 1701 |
) |
1558 | 1702 |
) |
1820 | 1703 |
(ViewSpec |
1704 |
name: 'rightView' |
|
1705 |
component: |
|
1706 |
(SpecCollection |
|
1707 |
collection: ( |
|
1708 |
(MenuPanelSpec |
|
1709 |
name: 'ToolBar1' |
|
1710 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
1711 |
level: 1 |
|
1712 |
menu: toolsMenuToolbar |
|
1713 |
verticalLayout: true |
|
1714 |
centerItems: true |
|
1715 |
textDefault: true |
|
1558 | 1716 |
) |
1820 | 1717 |
(ViewSpec |
1718 |
name: 'editingView' |
|
1719 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
1720 |
level: 1 |
|
1721 |
component: |
|
1722 |
(SpecCollection |
|
1723 |
collection: ( |
|
1724 |
(ArbitraryComponentSpec |
|
1725 |
name: 'imageEditView' |
|
1726 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
1727 |
hasHorizontalScrollBar: true |
|
1728 |
hasVerticalScrollBar: true |
|
1729 |
hasBorder: false |
|
1730 |
component: ImageEditView |
|
1637 | 1731 |
) |
1820 | 1732 |
(LabelSpec |
1733 |
name: 'coordLabel' |
|
1734 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1735 |
level: -1 |
|
1736 |
labelChannel: imageInfoHolder |
|
1737 |
resizeForLabel: false |
|
1738 |
adjust: left |
|
1637 | 1739 |
) |
1820 | 1740 |
(ArrowButtonSpec |
1741 |
name: 'magnifyDownButton' |
|
1742 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
1743 |
activeHelpKey: magnifyImageDown |
|
1744 |
model: doMagnifyDown |
|
2792 | 1745 |
enableChannel: imageIsLoadedHolder |
1820 | 1746 |
isTriggerOnDown: true |
1747 |
direction: left |
|
1637 | 1748 |
) |
1820 | 1749 |
(ArrowButtonSpec |
1750 |
name: 'magnifyUpButton' |
|
1751 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
1752 |
activeHelpKey: magnifyImageUp |
|
1753 |
model: doMagnifyUp |
|
2792 | 1754 |
enableChannel: imageIsLoadedHolder |
1820 | 1755 |
isTriggerOnDown: true |
1756 |
direction: right |
|
1637 | 1757 |
) |
1820 | 1758 |
(InputFieldSpec |
1759 |
name: 'magnificationInputField' |
|
1760 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
1761 |
activeHelpKey: magnificationNumber |
|
2792 | 1762 |
enableChannel: imageIsLoadedHolder |
1987 | 1763 |
model: magnificationHolder |
1820 | 1764 |
type: numberInRange |
1975 | 1765 |
acceptOnReturn: true |
1766 |
acceptOnTab: true |
|
1820 | 1767 |
numChars: 2 |
1768 |
minValue: 1 |
|
1769 |
maxValue: 99 |
|
1975 | 1770 |
acceptOnPointerLeave: true |
1637 | 1771 |
) |
1772 |
) |
|
1773 |
||
1774 |
) |
|
1558 | 1775 |
) |
1776 |
) |
|
1777 |
||
1778 |
) |
|
1779 |
) |
|
1780 |
) |
|
1781 |
||
767 | 1782 |
) |
1843 | 1783 |
handles: (Any 0.288889 1.0) |
1558 | 1784 |
) |
1820 | 1785 |
(UISubSpecification |
1786 |
name: 'infoBarSubSpec' |
|
1787 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1788 |
majorKey: ToolApplicationModel |
|
1789 |
minorKey: windowSpecForInfoBar |
|
1558 | 1790 |
) |
1791 |
) |
|
1792 |
||
1793 |
) |
|
767 | 1794 |
) |
2792 | 1795 |
|
1796 |
"Modified: / 04-07-2010 / 10:18:33 / cg" |
|
519 | 1797 |
! ! |
1798 |
||
1799 |
!ImageEditor class methodsFor:'menu specs'! |
|
1800 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1801 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1802 |
"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
|
1803 |
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
|
1804 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1805 |
"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
|
1806 |
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
|
1807 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1808 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1809 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1810 |
(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
|
1811 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1812 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1813 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1814 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1815 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1816 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1817 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1818 |
(MenuItem |
2792 | 1819 |
enabled: hasColormapHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1820 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1821 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1822 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1823 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1824 |
(MenuItem |
2792 | 1825 |
enabled: hasColormapHolder |
2539 | 1826 |
label: 'Pick and Add Color...' |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1827 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1828 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1829 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1830 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1831 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1832 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1833 |
(MenuItem |
2651 | 1834 |
enabled: hasColormapAndColorSelected |
1852 | 1835 |
label: 'Cut Color' |
1836 |
itemValue: cutColorFromColormap |
|
1837 |
translateLabel: true |
|
1838 |
isVisible: false |
|
1839 |
) |
|
1840 |
(MenuItem |
|
2792 | 1841 |
enabled: hasColorSelectedHolder |
1852 | 1842 |
label: 'Copy Color' |
1843 |
itemValue: copyColorFromColormap |
|
1844 |
translateLabel: true |
|
2841 | 1845 |
shortcutKey: Copy |
1852 | 1846 |
) |
1847 |
(MenuItem |
|
2651 | 1848 |
enabled: hasColormapAndColorSelected |
2539 | 1849 |
label: 'Pick and Paste Color...' |
1933 | 1850 |
itemValue: pickAndPasteColor |
1852 | 1851 |
translateLabel: true |
1852 |
) |
|
1853 |
(MenuItem |
|
1854 |
label: 'Paste Color' |
|
1855 |
itemValue: pasteColorIntoColormap |
|
1856 |
translateLabel: true |
|
2841 | 1857 |
shortcutKey: Paste |
1852 | 1858 |
) |
1859 |
(MenuItem |
|
1860 |
label: '-' |
|
1861 |
) |
|
1862 |
(MenuItem |
|
2651 | 1863 |
enabled: hasColormapAndColorSelected |
2539 | 1864 |
label: 'Edit Color...' |
1931 | 1865 |
itemValue: editSelectedColor |
1866 |
translateLabel: true |
|
1867 |
) |
|
1868 |
(MenuItem |
|
2651 | 1869 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1870 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1871 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1872 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1873 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1874 |
(MenuItem |
2651 | 1875 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1876 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1877 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1878 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1879 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1880 |
(MenuItem |
2651 | 1881 |
enabled: hasColormapAndColorSelected |
1884 | 1882 |
label: 'Make Gray' |
1883 |
itemValue: makeSelectedColorGray |
|
1884 |
translateLabel: true |
|
1885 |
) |
|
1886 |
(MenuItem |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1887 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1888 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1889 |
(MenuItem |
2841 | 1890 |
enabled: hasColorSelectedHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1891 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1892 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1893 |
translateLabel: true |
2651 | 1894 |
) |
1895 |
(MenuItem |
|
2792 | 1896 |
enabled: hasColormapHolder |
2651 | 1897 |
label: 'Inspect Colormap' |
1898 |
itemValue: inspectColormap |
|
1899 |
translateLabel: true |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1900 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1901 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1902 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1903 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1904 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1905 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1906 |
|
400 | 1907 |
menu |
737 | 1908 |
"This resource specification was automatically generated |
1909 |
by the MenuEditor of ST/X." |
|
400 | 1910 |
|
737 | 1911 |
"Do not manually edit this!! If it is corrupted, |
1912 |
the MenuEditor may not be able to read the specification." |
|
400 | 1913 |
|
1914 |
" |
|
1915 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
1916 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
1917 |
" |
|
1918 |
||
1919 |
<resource: #menu> |
|
1920 |
||
1124 | 1921 |
^ |
1882 | 1922 |
#(Menu |
1923 |
( |
|
1924 |
(MenuItem |
|
1925 |
label: '&File' |
|
1926 |
translateLabel: true |
|
2196 | 1927 |
submenuChannel: menuFile |
2585 | 1928 |
"/ keepLinkedMenu: true |
1124 | 1929 |
) |
1882 | 1930 |
(MenuItem |
1931 |
label: 'Edit' |
|
1932 |
translateLabel: true |
|
2196 | 1933 |
submenuChannel: menuEdit |
2585 | 1934 |
"/ keepLinkedMenu: true |
1124 | 1935 |
) |
1882 | 1936 |
(MenuItem |
1937 |
label: 'Mode' |
|
1938 |
translateLabel: true |
|
1939 |
submenuChannel: modeMenu |
|
1637 | 1940 |
) |
1882 | 1941 |
(MenuItem |
1924 | 1942 |
label: 'Colors' |
1882 | 1943 |
translateLabel: true |
2585 | 1944 |
submenuChannel: menuColors |
1124 | 1945 |
) |
1882 | 1946 |
(MenuItem |
1947 |
label: 'Settings' |
|
1948 |
translateLabel: true |
|
2585 | 1949 |
submenuChannel: menuSettings |
1124 | 1950 |
) |
1882 | 1951 |
(MenuItem |
1952 |
label: 'History' |
|
1953 |
translateLabel: true |
|
1975 | 1954 |
isVisible: isStandAlone |
1882 | 1955 |
submenuChannel: menuHistory |
1124 | 1956 |
) |
1882 | 1957 |
(MenuItem |
2136
bb10485fa455
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
2125
diff
changeset
|
1958 |
label: 'MENU_Help' |
1882 | 1959 |
translateLabel: true |
2125 | 1960 |
startGroup: conditionalRight |
1882 | 1961 |
submenuChannel: menuHelp |
1124 | 1962 |
) |
1963 |
) |
|
1964 |
nil |
|
1965 |
nil |
|
400 | 1966 |
) |
1967 |
! |
|
1968 |
||
2585 | 1969 |
menuColors |
1970 |
"This resource specification was automatically generated |
|
1971 |
by the MenuEditor of ST/X." |
|
1972 |
||
1973 |
"Do not manually edit this!! If it is corrupted, |
|
1974 |
the MenuEditor may not be able to read the specification." |
|
1975 |
||
1976 |
" |
|
1977 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuColors |
|
1978 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp |
|
1979 |
" |
|
1980 |
||
1981 |
<resource: #menu> |
|
1982 |
||
1983 |
^ |
|
1984 |
#(Menu |
|
1985 |
( |
|
1986 |
(MenuItem |
|
2767 | 1987 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2585 | 1988 |
label: 'Depth' |
1989 |
translateLabel: true |
|
1990 |
submenu: |
|
1991 |
(Menu |
|
1992 |
( |
|
1993 |
(MenuItem |
|
1994 |
activeHelpKey: colorMap1 |
|
1995 |
label: '1-Plane' |
|
1996 |
itemValue: colorMapMode: |
|
1997 |
translateLabel: true |
|
1998 |
argument: depth1 |
|
1999 |
choice: colorMapMode |
|
2000 |
choiceValue: depth1 |
|
2001 |
) |
|
2002 |
(MenuItem |
|
2003 |
activeHelpKey: colorMap1M |
|
2004 |
label: '1-Plane + Mask' |
|
2005 |
itemValue: colorMapMode: |
|
2006 |
translateLabel: true |
|
2007 |
argument: masked1 |
|
2008 |
choice: colorMapMode |
|
2009 |
choiceValue: masked1 |
|
2010 |
) |
|
2011 |
(MenuItem |
|
2012 |
label: '-' |
|
2013 |
) |
|
2014 |
(MenuItem |
|
2015 |
activeHelpKey: colorMap2 |
|
2016 |
label: '2-Plane' |
|
2017 |
itemValue: colorMapMode: |
|
2018 |
translateLabel: true |
|
2019 |
argument: depth2 |
|
2020 |
choice: colorMapMode |
|
2021 |
choiceValue: depth2 |
|
2022 |
) |
|
2023 |
(MenuItem |
|
2024 |
activeHelpKey: colorMap2M |
|
2025 |
label: '2-Plane + Mask' |
|
2026 |
itemValue: colorMapMode: |
|
2027 |
translateLabel: true |
|
2028 |
argument: masked2 |
|
2029 |
choice: colorMapMode |
|
2030 |
choiceValue: masked2 |
|
2031 |
) |
|
2032 |
(MenuItem |
|
2033 |
label: '-' |
|
2034 |
) |
|
2035 |
(MenuItem |
|
2036 |
activeHelpKey: colorMap4 |
|
2037 |
label: '4-Plane' |
|
2038 |
itemValue: colorMapMode: |
|
2039 |
translateLabel: true |
|
2040 |
argument: depth4 |
|
2041 |
choice: colorMapMode |
|
2042 |
choiceValue: depth4 |
|
2043 |
) |
|
2044 |
(MenuItem |
|
2045 |
activeHelpKey: colorMap4M |
|
2046 |
label: '4-Plane + Mask' |
|
2047 |
itemValue: colorMapMode: |
|
2048 |
translateLabel: true |
|
2049 |
argument: masked4 |
|
2050 |
choice: colorMapMode |
|
2051 |
choiceValue: masked4 |
|
2052 |
) |
|
2053 |
(MenuItem |
|
2054 |
label: '-' |
|
2055 |
) |
|
2056 |
(MenuItem |
|
2057 |
activeHelpKey: colorMap8 |
|
2058 |
label: '8-Plane' |
|
2059 |
itemValue: colorMapMode: |
|
2060 |
translateLabel: true |
|
2061 |
argument: depth8 |
|
2062 |
choice: colorMapMode |
|
2063 |
choiceValue: depth8 |
|
2064 |
) |
|
2065 |
(MenuItem |
|
2066 |
activeHelpKey: colorMap8M |
|
2067 |
label: '8-Plane + Mask' |
|
2068 |
itemValue: colorMapMode: |
|
2069 |
translateLabel: true |
|
2070 |
argument: masked8 |
|
2071 |
choice: colorMapMode |
|
2072 |
choiceValue: masked8 |
|
2073 |
) |
|
2074 |
(MenuItem |
|
2075 |
label: '-' |
|
2076 |
) |
|
2077 |
(MenuItem |
|
2078 |
activeHelpKey: colorMap16 |
|
2079 |
label: '16-Plane' |
|
2080 |
itemValue: colorMapMode: |
|
2081 |
translateLabel: true |
|
2082 |
argument: depth16 |
|
2083 |
choice: colorMapMode |
|
2084 |
choiceValue: depth16 |
|
2085 |
) |
|
2086 |
(MenuItem |
|
2087 |
activeHelpKey: colorMap16M |
|
2088 |
label: '16-Plane + Mask' |
|
2089 |
itemValue: colorMapMode: |
|
2090 |
translateLabel: true |
|
2091 |
argument: masked16 |
|
2092 |
choice: colorMapMode |
|
2093 |
choiceValue: masked16 |
|
2094 |
) |
|
2095 |
(MenuItem |
|
2096 |
label: '-' |
|
2097 |
) |
|
2098 |
(MenuItem |
|
2099 |
activeHelpKey: colorMap24 |
|
2100 |
label: '24-Plane' |
|
2101 |
itemValue: colorMapMode: |
|
2102 |
translateLabel: true |
|
2103 |
argument: depth24 |
|
2104 |
choice: colorMapMode |
|
2105 |
choiceValue: depth24 |
|
2106 |
) |
|
2107 |
(MenuItem |
|
2108 |
activeHelpKey: colorMap24M |
|
2109 |
label: '24-Plane + Mask' |
|
2110 |
itemValue: colorMapMode: |
|
2111 |
translateLabel: true |
|
2112 |
argument: masked24 |
|
2113 |
choice: colorMapMode |
|
2114 |
choiceValue: masked24 |
|
2115 |
) |
|
2116 |
(MenuItem |
|
2117 |
label: '-' |
|
2118 |
) |
|
2119 |
(MenuItem |
|
2120 |
activeHelpKey: colorMap32 |
|
2121 |
label: '32-Plane (rgba)' |
|
2122 |
itemValue: colorMapMode: |
|
2123 |
translateLabel: true |
|
2124 |
argument: depth32 |
|
2125 |
choice: colorMapMode |
|
2126 |
choiceValue: depth32 |
|
2127 |
) |
|
2128 |
) |
|
2129 |
nil |
|
2130 |
nil |
|
2131 |
) |
|
2132 |
) |
|
2133 |
(MenuItem |
|
2792 | 2134 |
enabled: imageIsLoadedHolder |
2585 | 2135 |
label: 'ColorMap' |
2136 |
translateLabel: true |
|
2137 |
submenu: |
|
2138 |
(Menu |
|
2139 |
( |
|
2140 |
(MenuItem |
|
2141 |
activeHelpKey: compressColormap |
|
2792 | 2142 |
enabled: hasColormapHolder |
2585 | 2143 |
label: 'Compress Colormap' |
2826 | 2144 |
itemValue: #'menu_compressColorMap' |
2585 | 2145 |
translateLabel: true |
2146 |
) |
|
2147 |
(MenuItem |
|
2792 | 2148 |
enabled: hasColormapHolder |
2585 | 2149 |
label: 'Sort Colormap' |
2826 | 2150 |
itemValue: #'menu_sortColorMap' |
2585 | 2151 |
translateLabel: true |
2152 |
) |
|
2153 |
(MenuItem |
|
2154 |
label: 'Reduce Number of Colors by Rounding...' |
|
2155 |
itemValue: reduceNumberOfColors2 |
|
2156 |
translateLabel: true |
|
2157 |
) |
|
2158 |
(MenuItem |
|
2159 |
label: 'Reduce Number of Colors by Masking Bits...' |
|
2160 |
itemValue: reduceNumberOfColors |
|
2161 |
translateLabel: true |
|
2162 |
) |
|
2163 |
(MenuItem |
|
2164 |
label: 'Dither to Depth...' |
|
2165 |
itemValue: ditherToDepth |
|
2166 |
translateLabel: true |
|
2167 |
) |
|
2168 |
(MenuItem |
|
2169 |
label: '-' |
|
2170 |
) |
|
2171 |
(MenuItem |
|
2792 | 2172 |
enabled: imageIsLoadedHolder |
2585 | 2173 |
label: 'Brighten' |
2174 |
itemValue: doBrightenImage |
|
2175 |
translateLabel: true |
|
2176 |
) |
|
2177 |
(MenuItem |
|
2792 | 2178 |
enabled: imageIsLoadedHolder |
2585 | 2179 |
label: 'Darken' |
2180 |
itemValue: doDarkenImage |
|
2181 |
translateLabel: true |
|
2182 |
) |
|
2652 | 2183 |
(MenuItem |
2792 | 2184 |
enabled: imageIsLoadedHolder |
2652 | 2185 |
label: 'Invert' |
2186 |
itemValue: doNegativeImage |
|
2187 |
translateLabel: true |
|
2188 |
) |
|
2585 | 2189 |
) |
2190 |
nil |
|
2191 |
nil |
|
2192 |
) |
|
2193 |
) |
|
2194 |
(MenuItem |
|
2792 | 2195 |
enabled: imageIsLoadedHolder |
2585 | 2196 |
label: 'Process' |
2197 |
translateLabel: true |
|
2198 |
submenu: |
|
2199 |
(Menu |
|
2200 |
( |
|
2201 |
(MenuItem |
|
2202 |
label: 'Make GrayScale' |
|
2203 |
itemValue: makeGrayScaleImage |
|
2204 |
translateLabel: true |
|
2205 |
) |
|
2206 |
(MenuItem |
|
2826 | 2207 |
enabled: allowedToChangeImageDimensionAndDepth |
2585 | 2208 |
label: 'Make dithered 8Bit Palette' |
2209 |
itemValue: makeDitheredPaletteImage |
|
2210 |
translateLabel: true |
|
2211 |
isVisible: false |
|
2212 |
) |
|
2213 |
(MenuItem |
|
2826 | 2214 |
label: 'Make Inverse' |
2215 |
itemValue: makeInverse |
|
2216 |
translateLabel: true |
|
2217 |
) |
|
2218 |
(MenuItem |
|
2219 |
label: '-' |
|
2220 |
) |
|
2221 |
(MenuItem |
|
2222 |
label: 'Make Slightly Brighter' |
|
2223 |
itemValue: makeSlightlyBrighter |
|
2224 |
translateLabel: true |
|
2225 |
) |
|
2226 |
(MenuItem |
|
2227 |
label: 'Make Slightly Darker' |
|
2228 |
itemValue: makeSlightlyDarker |
|
2229 |
translateLabel: true |
|
2230 |
) |
|
2231 |
(MenuItem |
|
2232 |
label: '-' |
|
2233 |
) |
|
2234 |
(MenuItem |
|
2585 | 2235 |
label: 'Make Brighter' |
2236 |
itemValue: makeBrighter |
|
2237 |
translateLabel: true |
|
2238 |
) |
|
2239 |
(MenuItem |
|
2240 |
label: 'Make Darker' |
|
2241 |
itemValue: makeDarker |
|
2242 |
translateLabel: true |
|
2243 |
) |
|
2244 |
(MenuItem |
|
2245 |
label: '-' |
|
2246 |
) |
|
2247 |
(MenuItem |
|
2248 |
label: 'Change HLS...' |
|
2249 |
itemValue: changeHLS |
|
2250 |
translateLabel: true |
|
2251 |
) |
|
2252 |
(MenuItem |
|
2253 |
label: 'Colorize...' |
|
2254 |
itemValue: colorize |
|
2255 |
translateLabel: true |
|
2256 |
) |
|
2257 |
) |
|
2258 |
nil |
|
2259 |
nil |
|
2260 |
) |
|
2261 |
) |
|
2262 |
(MenuItem |
|
2792 | 2263 |
enabled: imageIsLoadedHolder |
2585 | 2264 |
label: 'Mask' |
2265 |
translateLabel: true |
|
2266 |
submenu: |
|
2267 |
(Menu |
|
2268 |
( |
|
2269 |
(MenuItem |
|
2270 |
activeHelpKey: copyMask |
|
2271 |
enabled: hasMask |
|
2272 |
label: 'Copy Mask' |
|
2826 | 2273 |
itemValue: #'menu_copyMask' |
2585 | 2274 |
translateLabel: true |
2275 |
) |
|
2276 |
(MenuItem |
|
2277 |
activeHelpKey: pasteMask |
|
2278 |
enabled: hasMask |
|
2279 |
label: 'Paste Mask' |
|
2826 | 2280 |
itemValue: #'menu_pasteMask' |
2585 | 2281 |
translateLabel: true |
2282 |
) |
|
2283 |
(MenuItem |
|
2284 |
enabled: hasMask |
|
2285 |
label: 'Clear Masked Pixels' |
|
2826 | 2286 |
itemValue: #'menu_clearMaskedPixels' |
2652 | 2287 |
translateLabel: true |
2288 |
) |
|
2289 |
(MenuItem |
|
2290 |
enabled: hasMask |
|
2653 | 2291 |
label: 'Clear Colormap Entry for Masked Pixels' |
2826 | 2292 |
itemValue: #'menu_clearColormapEntry0AndMaskedPixels' |
2585 | 2293 |
translateLabel: true |
2294 |
) |
|
2295 |
) |
|
2296 |
nil |
|
2297 |
nil |
|
2298 |
) |
|
2299 |
) |
|
2300 |
) |
|
2301 |
nil |
|
2302 |
nil |
|
2303 |
) |
|
2304 |
! |
|
2305 |
||
2196 | 2306 |
menuEdit |
2307 |
"This resource specification was automatically generated |
|
2308 |
by the MenuEditor of ST/X." |
|
2309 |
||
2310 |
"Do not manually edit this!! If it is corrupted, |
|
2311 |
the MenuEditor may not be able to read the specification." |
|
2312 |
||
2313 |
" |
|
2314 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit |
|
2315 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp |
|
2316 |
" |
|
2317 |
||
2318 |
<resource: #menu> |
|
2319 |
||
2320 |
^ |
|
2321 |
#(Menu |
|
2322 |
( |
|
2323 |
(MenuItem |
|
2324 |
activeHelpKey: editUndo |
|
2325 |
enabled: canUndoHolder |
|
2326 |
label: 'Undo' |
|
2327 |
itemValue: doUndo |
|
2328 |
translateLabel: true |
|
2329 |
) |
|
2330 |
(MenuItem |
|
2331 |
label: '-' |
|
2332 |
) |
|
2333 |
(MenuItem |
|
2812 | 2334 |
enabled: imageIsLoadedHolder |
2335 |
label: 'Copy to Clipboard' |
|
2336 |
itemValue: doCopyImageToClipboard |
|
2337 |
translateLabel: true |
|
2338 |
) |
|
2339 |
(MenuItem |
|
2340 |
label: '-' |
|
2341 |
) |
|
2342 |
(MenuItem |
|
2343 |
activeHelpKey: editResize |
|
2767 | 2344 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2345 |
label: 'Resize...' |
2346 |
itemValue: doResizeImage |
|
2347 |
translateLabel: true |
|
2348 |
) |
|
2349 |
(MenuItem |
|
2812 | 2350 |
activeHelpKey: editMagnifyImage |
2767 | 2351 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2352 |
label: 'Magnify...' |
2353 |
itemValue: doMagnifyImage |
|
2354 |
translateLabel: true |
|
2355 |
) |
|
2356 |
(MenuItem |
|
2812 | 2357 |
activeHelpKey: editMagnifyImage |
2767 | 2358 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2359 |
label: 'Magnify By...' |
2360 |
itemValue: doMagnifyImageBy |
|
2361 |
translateLabel: true |
|
2362 |
) |
|
2363 |
(MenuItem |
|
2812 | 2364 |
activeHelpKey: editRotate |
2767 | 2365 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2366 |
label: 'Rotate...' |
2367 |
itemValue: doRotateImage |
|
2368 |
translateLabel: true |
|
2369 |
) |
|
2370 |
(MenuItem |
|
2812 | 2371 |
activeHelpKey: edit3DProjection |
2767 | 2372 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2373 |
label: '3D Projection...' |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2374 |
itemValue: do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2375 |
translateLabel: true |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2376 |
) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2377 |
(MenuItem |
2792 | 2378 |
enabled: imageIsLoadedHolder |
2196 | 2379 |
label: 'Flip' |
2380 |
translateLabel: true |
|
2381 |
submenu: |
|
2382 |
(Menu |
|
2383 |
( |
|
2384 |
(MenuItem |
|
2385 |
activeHelpKey: editFlipVertical |
|
2812 | 2386 |
enabled: imageIsLoadedHolder |
2196 | 2387 |
label: 'Flip - Vertical' |
2388 |
itemValue: doFlipVertical |
|
2389 |
translateLabel: true |
|
2837 | 2390 |
labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical') |
2196 | 2391 |
) |
2392 |
(MenuItem |
|
2393 |
activeHelpKey: editFlipHorizontal |
|
2812 | 2394 |
enabled: imageIsLoadedHolder |
2196 | 2395 |
label: 'Flip - Horizontal' |
2396 |
itemValue: doFlipHorizontal |
|
2397 |
translateLabel: true |
|
2837 | 2398 |
labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal') |
2196 | 2399 |
) |
2400 |
) |
|
2401 |
nil |
|
2402 |
nil |
|
2403 |
) |
|
2404 |
) |
|
2405 |
(MenuItem |
|
2406 |
label: '-' |
|
2407 |
) |
|
2408 |
(MenuItem |
|
2767 | 2409 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2410 |
label: 'Crop' |
2411 |
translateLabel: true |
|
2412 |
submenu: |
|
2413 |
(Menu |
|
2414 |
( |
|
2415 |
(MenuItem |
|
2416 |
activeHelpKey: cropManual |
|
2417 |
label: 'Manual...' |
|
2418 |
itemValue: doCropManual |
|
2419 |
translateLabel: true |
|
2420 |
) |
|
2421 |
(MenuItem |
|
2422 |
label: '-' |
|
2423 |
) |
|
2424 |
(MenuItem |
|
2425 |
activeHelpKey: cropAll |
|
2426 |
label: 'All' |
|
2427 |
itemValue: doCropAll |
|
2428 |
translateLabel: true |
|
2429 |
) |
|
2430 |
(MenuItem |
|
2431 |
label: '-' |
|
2432 |
) |
|
2433 |
(MenuItem |
|
2434 |
activeHelpKey: cropLeft |
|
2435 |
label: 'Left' |
|
2436 |
itemValue: doCropLeft |
|
2437 |
translateLabel: true |
|
2438 |
) |
|
2439 |
(MenuItem |
|
2440 |
activeHelpKey: cropRight |
|
2441 |
label: 'Right' |
|
2442 |
itemValue: doCropRight |
|
2443 |
translateLabel: true |
|
2444 |
) |
|
2445 |
(MenuItem |
|
2446 |
activeHelpKey: cropTop |
|
2447 |
label: 'Top' |
|
2448 |
itemValue: doCropTop |
|
2449 |
translateLabel: true |
|
2450 |
) |
|
2451 |
(MenuItem |
|
2452 |
activeHelpKey: cropBottom |
|
2453 |
label: 'Bottom' |
|
2454 |
itemValue: doCropBottom |
|
2455 |
translateLabel: true |
|
2456 |
) |
|
2457 |
) |
|
2458 |
nil |
|
2459 |
nil |
|
2460 |
) |
|
2461 |
) |
|
2462 |
(MenuItem |
|
2812 | 2463 |
activeHelpKey: uncropManual |
2767 | 2464 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2465 |
label: 'Uncrop (Add Border)...' |
2466 |
itemValue: doUnCropManual |
|
2467 |
translateLabel: true |
|
2468 |
) |
|
2469 |
(MenuItem |
|
2812 | 2470 |
activeHelpKey: shiftManual |
2792 | 2471 |
enabled: imageIsLoadedHolder |
2196 | 2472 |
label: 'Shift...' |
2473 |
itemValue: doShiftManual |
|
2474 |
translateLabel: true |
|
2475 |
) |
|
2476 |
(MenuItem |
|
2477 |
label: '-' |
|
2478 |
) |
|
2479 |
(MenuItem |
|
2585 | 2480 |
activeHelpKey: fileEditMask |
2792 | 2481 |
enabled: imageIsLoadedHolder |
2585 | 2482 |
label: 'Edit Mask' |
2483 |
itemValue: doEditMask |
|
2484 |
translateLabel: true |
|
2485 |
) |
|
2486 |
(MenuItem |
|
2792 | 2487 |
enabled: imageIsLoadedHolder |
2196 | 2488 |
label: 'Text...' |
2489 |
itemValue: doInsertTextFromUser |
|
2490 |
translateLabel: true |
|
2491 |
) |
|
2812 | 2492 |
(MenuItem |
2493 |
label: '-' |
|
2494 |
) |
|
2495 |
(MenuItem |
|
2814 | 2496 |
label: 'Animation Sequence' |
2812 | 2497 |
translateLabel: true |
2498 |
submenu: |
|
2499 |
(Menu |
|
2500 |
( |
|
2501 |
(MenuItem |
|
2502 |
enabled: imageHasNextImageHolder |
|
2503 |
label: 'Next in Sequence' |
|
2504 |
itemValue: nextImageInSequence |
|
2505 |
translateLabel: true |
|
2506 |
) |
|
2507 |
(MenuItem |
|
2508 |
enabled: imageHasPreviousImageHolder |
|
2813 | 2509 |
label: 'Previous in Sequence' |
2812 | 2510 |
itemValue: previousImageInSequence |
2511 |
translateLabel: true |
|
2512 |
) |
|
2513 |
(MenuItem |
|
2514 |
label: '-' |
|
2515 |
) |
|
2516 |
(MenuItem |
|
2517 |
enabled: imageHasImageSequenceHolder |
|
2518 |
label: 'Edit each from Sequence' |
|
2519 |
itemValue: editEachImageFromSequence |
|
2520 |
translateLabel: true |
|
2521 |
) |
|
2522 |
) |
|
2523 |
nil |
|
2524 |
nil |
|
2525 |
) |
|
2526 |
) |
|
2196 | 2527 |
) |
2528 |
nil |
|
2529 |
nil |
|
2530 |
) |
|
2531 |
! |
|
2532 |
||
2533 |
menuFile |
|
2534 |
"This resource specification was automatically generated |
|
2535 |
by the MenuEditor of ST/X." |
|
2536 |
||
2537 |
"Do not manually edit this!! If it is corrupted, |
|
2538 |
the MenuEditor may not be able to read the specification." |
|
2539 |
||
2540 |
" |
|
2541 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuFile |
|
2542 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp |
|
2543 |
" |
|
2544 |
||
2545 |
<resource: #menu> |
|
2546 |
||
2547 |
^ |
|
2548 |
#(Menu |
|
2549 |
( |
|
2550 |
(MenuItem |
|
2551 |
activeHelpKey: fileNewImageEditor |
|
2552 |
label: 'New ImageEditor' |
|
2553 |
itemValue: doNewImageEditor |
|
2554 |
translateLabel: true |
|
2555 |
) |
|
2556 |
(MenuItem |
|
2876 | 2557 |
label: '-' |
2558 |
) |
|
2559 |
(MenuItem |
|
2196 | 2560 |
activeHelpKey: fileNewImage |
2561 |
label: 'New...' |
|
2562 |
itemValue: doNewImage |
|
2563 |
translateLabel: true |
|
2564 |
) |
|
2565 |
(MenuItem |
|
2566 |
activeHelpKey: fileNewImage |
|
2567 |
label: 'New from ClipBoard' |
|
2568 |
itemValue: doNewImageFromClipboard |
|
2569 |
translateLabel: true |
|
2570 |
) |
|
2571 |
(MenuItem |
|
2572 |
label: '-' |
|
2573 |
) |
|
2574 |
(MenuItem |
|
2575 |
activeHelpKey: fileLoadFromClass |
|
2576 |
label: 'Load...' |
|
2577 |
itemValue: doLoadFromClass |
|
2578 |
translateLabel: true |
|
2579 |
) |
|
2580 |
(MenuItem |
|
2581 |
activeHelpKey: fileLoadFromFile |
|
2582 |
label: 'Load from File...' |
|
2583 |
itemValue: doLoadFromFile |
|
2584 |
translateLabel: true |
|
2585 |
) |
|
2586 |
(MenuItem |
|
2796 | 2587 |
activeHelpKey: fileLoadFromURL |
2588 |
label: 'Load from URL...' |
|
2589 |
itemValue: doLoadFromURL |
|
2590 |
translateLabel: true |
|
2591 |
) |
|
2592 |
(MenuItem |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2593 |
label: 'Grab' |
2196 | 2594 |
translateLabel: true |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2595 |
submenu: |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2596 |
(Menu |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2597 |
( |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2598 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2599 |
activeHelpKey: fileGrabImageFromScreen |
2717 | 2600 |
label: 'Grab from Screen Area...' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2601 |
itemValue: grabScreenImage |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2602 |
translateLabel: true |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2603 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2604 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2605 |
activeHelpKey: fileGrabImageFromScreen |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2606 |
enabled: hasLastGrabScreenArea |
2711 | 2607 |
label: 'Grab again from same Screen Area' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2608 |
itemValue: grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2609 |
translateLabel: true |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2610 |
) |
2771 | 2611 |
(MenuItem |
2612 |
label: '-' |
|
2613 |
) |
|
2614 |
(MenuItem |
|
2615 |
activeHelpKey: fileGrabImageFromWindow |
|
2616 |
label: 'Grab from Window...' |
|
2617 |
itemValue: grabWindowImage |
|
2618 |
translateLabel: true |
|
2619 |
) |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2620 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2621 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2622 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2623 |
) |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2624 |
) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2625 |
(MenuItem |
2196 | 2626 |
label: '-' |
2627 |
) |
|
2628 |
(MenuItem |
|
2629 |
activeHelpKey: fileSaveMethod |
|
2630 |
enabled: imageIsLoadedAndClassDefined |
|
2631 |
label: 'Save' |
|
2632 |
itemValue: doSaveMethod |
|
2633 |
translateLabel: true |
|
2634 |
) |
|
2635 |
(MenuItem |
|
2636 |
activeHelpKey: fileSaveMethodAs |
|
2792 | 2637 |
enabled: imageIsLoadedHolder |
2196 | 2638 |
label: 'Save As...' |
2639 |
itemValue: doSaveMethodAs |
|
2640 |
translateLabel: true |
|
2641 |
) |
|
2642 |
(MenuItem |
|
2643 |
activeHelpKey: fileSaveAs |
|
2792 | 2644 |
enabled: imageIsLoadedHolder |
2196 | 2645 |
label: 'Save to File...' |
2646 |
itemValue: doSaveImageFileAs |
|
2647 |
translateLabel: true |
|
2648 |
) |
|
2649 |
(MenuItem |
|
2650 |
activeHelpKey: fileSaveMaskAs |
|
2792 | 2651 |
enabled: imageIsLoadedHolder |
2196 | 2652 |
label: 'Save Mask to File...' |
2653 |
itemValue: doSaveImageMaskFileAs |
|
2654 |
translateLabel: true |
|
2655 |
) |
|
2656 |
(MenuItem |
|
2657 |
activeHelpKey: fileSaveButtonImageAs |
|
2792 | 2658 |
enabled: imageIsLoadedHolder |
2196 | 2659 |
label: 'Save as Button to File...' |
2660 |
itemValue: doSaveButtonImageToFileAs |
|
2661 |
translateLabel: true |
|
2662 |
) |
|
2663 |
(MenuItem |
|
2664 |
label: '-' |
|
2665 |
) |
|
2666 |
(MenuItem |
|
2667 |
activeHelpKey: filePrint |
|
2792 | 2668 |
enabled: imageIsLoadedHolder |
2196 | 2669 |
label: 'Print' |
2670 |
itemValue: doPrint |
|
2671 |
translateLabel: true |
|
2672 |
) |
|
2673 |
(MenuItem |
|
2674 |
label: '-' |
|
2675 |
isVisible: isStandAlone |
|
2676 |
) |
|
2677 |
(MenuItem |
|
2678 |
activeHelpKey: fileBrowseClass |
|
2792 | 2679 |
enabled: hasClassDefinedHolder |
2196 | 2680 |
label: 'Browse Class' |
2681 |
itemValue: doBrowseClass |
|
2682 |
translateLabel: true |
|
2683 |
isVisible: isStandAlone |
|
2684 |
) |
|
2685 |
(MenuItem |
|
2792 | 2686 |
enabled: imageIsLoadedHolder |
2196 | 2687 |
label: 'Inspect Image' |
2688 |
itemValue: doInspectImage |
|
2689 |
translateLabel: true |
|
2690 |
isVisible: isStandAlone |
|
2691 |
) |
|
2692 |
(MenuItem |
|
2585 | 2693 |
activeHelpKey: fileShowStoreString |
2792 | 2694 |
enabled: imageIsLoadedHolder |
2585 | 2695 |
label: 'Show storeString' |
2696 |
itemValue: doShowStoreString |
|
2697 |
translateLabel: true |
|
2698 |
) |
|
2699 |
(MenuItem |
|
2196 | 2700 |
label: '-' |
2701 |
isVisible: isStandAlone |
|
2702 |
) |
|
2703 |
(MenuItem |
|
2704 |
activeHelpKey: fileExit |
|
2705 |
label: 'Exit' |
|
2706 |
itemValue: closeRequest |
|
2707 |
translateLabel: true |
|
2708 |
isVisible: isStandAlone |
|
2709 |
) |
|
2710 |
) |
|
2711 |
nil |
|
2712 |
nil |
|
2713 |
) |
|
2812 | 2714 |
|
2876 | 2715 |
"Modified: / 01-02-2012 / 15:00:50 / cg" |
2196 | 2716 |
! |
2717 |
||
679 | 2718 |
menuMouseButtonColors |
737 | 2719 |
"This resource specification was automatically generated |
2720 |
by the MenuEditor of ST/X." |
|
679 | 2721 |
|
737 | 2722 |
"Do not manually edit this!! If it is corrupted, |
2723 |
the MenuEditor may not be able to read the specification." |
|
679 | 2724 |
|
2725 |
" |
|
2726 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2727 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2728 |
" |
|
2729 |
||
2730 |
<resource: #menu> |
|
2731 |
||
2732 |
^ |
|
2733 |
||
2734 |
#(#Menu |
|
2735 |
||
2736 |
#( |
|
2737 |
#(#MenuItem |
|
2738 |
#label: 'Left Mouse Button' |
|
2739 |
#nameKey: #leftMouseKeyButton |
|
2740 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2741 |
#enabled: #imageIsLoadedHolder |
679 | 2742 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2743 |
#choice: #mouseKeyColorMode |
2744 |
#choiceValue: 1 |
|
679 | 2745 |
) |
2746 |
#(#MenuItem |
|
2747 |
#label: 'Right Mouse Button' |
|
2748 |
#nameKey: #rightMouseKeyButton |
|
2749 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2750 |
#enabled: #imageIsLoadedHolder |
679 | 2751 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2752 |
#choice: #mouseKeyColorMode |
2753 |
#choiceValue: 2 |
|
679 | 2754 |
) |
2755 |
) nil |
|
2756 |
nil |
|
2757 |
) |
|
2792 | 2758 |
|
2759 |
"Modified: / 04-07-2010 / 10:17:37 / cg" |
|
679 | 2760 |
! |
2761 |
||
2585 | 2762 |
menuSettings |
2763 |
"This resource specification was automatically generated |
|
2764 |
by the MenuEditor of ST/X." |
|
2765 |
||
2766 |
"Do not manually edit this!! If it is corrupted, |
|
2767 |
the MenuEditor may not be able to read the specification." |
|
2768 |
||
2881 | 2769 |
|
2585 | 2770 |
" |
2771 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings |
|
2772 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp |
|
2773 |
" |
|
2774 |
||
2775 |
<resource: #menu> |
|
2776 |
||
2777 |
^ |
|
2778 |
#(Menu |
|
2779 |
( |
|
2780 |
(MenuItem |
|
2781 |
activeHelpKey: settingsGridMagnification |
|
2782 |
label: 'Grid Magnification Limit...' |
|
2783 |
itemValue: doChangeGridMagnification |
|
2784 |
translateLabel: true |
|
2785 |
) |
|
2786 |
(MenuItem |
|
2787 |
label: 'Pen' |
|
2788 |
translateLabel: true |
|
2789 |
submenu: |
|
2790 |
(Menu |
|
2791 |
( |
|
2792 |
(MenuItem |
|
2793 |
label: '1' |
|
2794 |
translateLabel: true |
|
2881 | 2795 |
choice: penWidthHolder |
2796 |
choiceValue: 1 |
|
2585 | 2797 |
) |
2798 |
(MenuItem |
|
2799 |
label: '5' |
|
2800 |
translateLabel: true |
|
2881 | 2801 |
choice: penWidthHolder |
2802 |
choiceValue: 5 |
|
2585 | 2803 |
) |
2804 |
(MenuItem |
|
2805 |
label: '10' |
|
2806 |
translateLabel: true |
|
2881 | 2807 |
choice: penWidthHolder |
2808 |
choiceValue: 10 |
|
2585 | 2809 |
) |
2810 |
) |
|
2811 |
nil |
|
2812 |
nil |
|
2813 |
) |
|
2814 |
) |
|
2815 |
(MenuItem |
|
2816 |
label: 'Spray' |
|
2817 |
translateLabel: true |
|
2818 |
submenu: |
|
2819 |
(Menu |
|
2820 |
( |
|
2821 |
(MenuItem |
|
2822 |
label: '4' |
|
2823 |
translateLabel: true |
|
2881 | 2824 |
choice: spraySpotHolder |
2825 |
choiceValue: 4 |
|
2585 | 2826 |
) |
2827 |
(MenuItem |
|
2828 |
label: '8' |
|
2829 |
translateLabel: true |
|
2881 | 2830 |
choice: spraySpotHolder |
2831 |
choiceValue: 8 |
|
2585 | 2832 |
) |
2833 |
(MenuItem |
|
2834 |
label: '16' |
|
2835 |
translateLabel: true |
|
2881 | 2836 |
choice: spraySpotHolder |
2837 |
choiceValue: 16 |
|
2585 | 2838 |
) |
2839 |
(MenuItem |
|
2840 |
label: '32' |
|
2841 |
translateLabel: true |
|
2881 | 2842 |
choice: spraySpotHolder |
2843 |
choiceValue: 32 |
|
2585 | 2844 |
) |
2845 |
) |
|
2846 |
nil |
|
2847 |
nil |
|
2848 |
) |
|
2849 |
) |
|
2850 |
) |
|
2851 |
nil |
|
2852 |
nil |
|
2853 |
) |
|
2854 |
! |
|
2855 |
||
400 | 2856 |
menuToolbar |
737 | 2857 |
"This resource specification was automatically generated |
2858 |
by the MenuEditor of ST/X." |
|
400 | 2859 |
|
737 | 2860 |
"Do not manually edit this!! If it is corrupted, |
2861 |
the MenuEditor may not be able to read the specification." |
|
400 | 2862 |
|
2876 | 2863 |
|
400 | 2864 |
" |
2865 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
2866 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
2867 |
" |
|
2868 |
||
2869 |
<resource: #menu> |
|
2870 |
||
1196 | 2871 |
^ |
1820 | 2872 |
#(Menu |
2873 |
( |
|
2874 |
(MenuItem |
|
2875 |
activeHelpKey: fileNewImage |
|
2876 |
label: 'newImage' |
|
2877 |
itemValue: doNewImage |
|
2878 |
translateLabel: true |
|
2879 |
isButton: true |
|
1883 | 2880 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 2881 |
) |
1820 | 2882 |
(MenuItem |
2876 | 2883 |
activeHelpKey: fileGrabImageFromScreen |
2884 |
label: 'grabScreenImage' |
|
2885 |
itemValue: grabScreenImage |
|
2886 |
translateLabel: true |
|
2887 |
isButton: true |
|
2877 | 2888 |
labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon) |
2876 | 2889 |
) |
2890 |
(MenuItem |
|
1949 | 2891 |
label: '-' |
2892 |
) |
|
2893 |
(MenuItem |
|
1970 | 2894 |
activeHelpKey: fileLoadFromClass |
2895 |
label: 'loadFromClass' |
|
2896 |
itemValue: doLoadFromClass |
|
2897 |
translateLabel: true |
|
2898 |
isButton: true |
|
1975 | 2899 |
isVisible: isStandAlone |
1970 | 2900 |
submenuChannel: menuHistory |
2901 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon) |
|
2902 |
keepLinkedMenu: true |
|
2903 |
) |
|
2904 |
(MenuItem |
|
2567 | 2905 |
activeHelpKey: fileSaveMethodAs |
2792 | 2906 |
enabled: imageIsLoadedHolder |
2567 | 2907 |
label: 'fileSaveMethodAs' |
1970 | 2908 |
itemValue: doSaveMethodAs |
2909 |
translateLabel: true |
|
2910 |
isButton: true |
|
1975 | 2911 |
isVisible: isStandAlone |
1970 | 2912 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
2913 |
) |
|
2914 |
(MenuItem |
|
2915 |
activeHelpKey: fileSaveMethod |
|
2792 | 2916 |
enabled: imageIsLoadedHolder |
1970 | 2917 |
label: 'saveAsMethod' |
2918 |
itemValue: doSaveMethod |
|
2919 |
translateLabel: true |
|
2920 |
isButton: true |
|
1975 | 2921 |
isVisible: isNotStandAlone |
2590 | 2922 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon) |
1970 | 2923 |
) |
2924 |
(MenuItem |
|
2925 |
label: '-' |
|
2926 |
) |
|
2927 |
(MenuItem |
|
1820 | 2928 |
activeHelpKey: fileLoadFromFile |
2929 |
label: 'loadFromFile' |
|
2930 |
itemValue: doLoadFromFile |
|
2931 |
translateLabel: true |
|
2932 |
isButton: true |
|
1884 | 2933 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 2934 |
) |
2935 |
(MenuItem |
|
2936 |
activeHelpKey: fileSaveAs |
|
2792 | 2937 |
enabled: imageIsLoadedHolder |
1820 | 2938 |
label: 'saveAsFile' |
2939 |
itemValue: doSaveImageFileAs |
|
2940 |
translateLabel: true |
|
2941 |
isButton: true |
|
1885 | 2942 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 2943 |
) |
2944 |
(MenuItem |
|
1949 | 2945 |
label: '-' |
1196 | 2946 |
) |
1820 | 2947 |
(MenuItem |
2948 |
activeHelpKey: editUndo |
|
1987 | 2949 |
enabled: canUndoHolder |
1820 | 2950 |
label: 'Undo' |
2951 |
itemValue: doUndo |
|
2952 |
translateLabel: true |
|
2953 |
isButton: true |
|
1883 | 2954 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 2955 |
) |
2812 | 2956 |
(MenuItem |
2957 |
label: '-' |
|
2958 |
isVisible: imageHasImageSequenceHolder |
|
2959 |
) |
|
2960 |
(MenuItem |
|
2961 |
activeHelpKey: previousImageInSequence |
|
2962 |
enabled: imageHasPreviousImageHolder |
|
2963 |
label: 'Previous Image' |
|
2964 |
itemValue: previousImageInSequence |
|
2965 |
translateLabel: true |
|
2966 |
isVisible: imageHasImageSequenceHolder |
|
2967 |
labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon) |
|
2968 |
) |
|
2969 |
(MenuItem |
|
2970 |
activeHelpKey: nextImageInSequence |
|
2971 |
enabled: imageHasNextImageHolder |
|
2972 |
label: 'Next Image' |
|
2973 |
itemValue: nextImageInSequence |
|
2974 |
translateLabel: true |
|
2975 |
isVisible: imageHasImageSequenceHolder |
|
2976 |
labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon) |
|
2977 |
) |
|
1637 | 2978 |
) |
2979 |
nil |
|
2980 |
nil |
|
2981 |
) |
|
2982 |
! |
|
2983 |
||
2984 |
modeMenu |
|
2985 |
"This resource specification was automatically generated |
|
2986 |
by the MenuEditor of ST/X." |
|
2987 |
||
2988 |
"Do not manually edit this!! If it is corrupted, |
|
2989 |
the MenuEditor may not be able to read the specification." |
|
2990 |
||
2991 |
" |
|
2992 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
2993 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
2994 |
" |
|
2995 |
||
2996 |
<resource: #menu> |
|
2997 |
||
2998 |
^ |
|
2592 | 2999 |
#(Menu |
3000 |
( |
|
3001 |
(MenuItem |
|
3002 |
activeHelpKey: drawModePoint |
|
2792 | 3003 |
enabled: imageIsLoadedHolder |
2592 | 3004 |
label: 'Point' |
3005 |
translateLabel: true |
|
3006 |
labelImage: (ResourceRetriever ImageEditor pointIcon 'Point') |
|
3007 |
choice: editMode |
|
3008 |
choiceValue: point |
|
3009 |
) |
|
3010 |
(MenuItem |
|
3011 |
activeHelpKey: drawModePoint |
|
2792 | 3012 |
enabled: imageIsLoadedHolder |
2592 | 3013 |
label: 'Spray' |
3014 |
translateLabel: true |
|
3015 |
labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray') |
|
3016 |
choice: editMode |
|
3017 |
choiceValue: spray |
|
1196 | 3018 |
) |
2592 | 3019 |
(MenuItem |
3020 |
activeHelpKey: drawModeBox |
|
2792 | 3021 |
enabled: imageIsLoadedHolder |
2592 | 3022 |
label: 'Rect' |
3023 |
translateLabel: true |
|
3024 |
labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect') |
|
3025 |
choice: editMode |
|
3026 |
choiceValue: box |
|
1196 | 3027 |
) |
2592 | 3028 |
(MenuItem |
3029 |
activeHelpKey: drawModeFilledBox |
|
2792 | 3030 |
enabled: imageIsLoadedHolder |
2592 | 3031 |
label: 'Filled Rectangle' |
3032 |
translateLabel: true |
|
3033 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle') |
|
3034 |
choice: editMode |
|
3035 |
choiceValue: filledBox |
|
1196 | 3036 |
) |
2592 | 3037 |
(MenuItem |
3038 |
activeHelpKey: drawModeBox |
|
2792 | 3039 |
enabled: imageIsLoadedHolder |
2592 | 3040 |
label: 'Circle' |
3041 |
translateLabel: true |
|
3042 |
labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle') |
|
3043 |
choice: editMode |
|
3044 |
choiceValue: circle |
|
1196 | 3045 |
) |
2592 | 3046 |
(MenuItem |
3047 |
activeHelpKey: drawModeFill |
|
2792 | 3048 |
enabled: imageIsLoadedHolder |
2592 | 3049 |
label: 'Fill' |
3050 |
translateLabel: true |
|
3051 |
labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill') |
|
3052 |
choice: editMode |
|
3053 |
choiceValue: fill |
|
1196 | 3054 |
) |
2592 | 3055 |
(MenuItem |
3056 |
activeHelpKey: drawModeCopy |
|
2792 | 3057 |
enabled: imageIsLoadedHolder |
2592 | 3058 |
label: 'Copy' |
3059 |
translateLabel: true |
|
3060 |
labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy') |
|
3061 |
choice: editMode |
|
3062 |
choiceValue: copy |
|
3063 |
) |
|
3064 |
(MenuItem |
|
3065 |
activeHelpKey: drawModePaste |
|
2792 | 3066 |
enabled: imageIsLoadedHolder |
2592 | 3067 |
label: 'Paste' |
3068 |
translateLabel: true |
|
3069 |
labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste') |
|
3070 |
choice: editMode |
|
3071 |
choiceValue: paste |
|
1196 | 3072 |
) |
2592 | 3073 |
(MenuItem |
3074 |
activeHelpKey: drawModePasteUnder |
|
2792 | 3075 |
enabled: imageIsLoadedHolder |
2592 | 3076 |
label: 'Paste Under' |
3077 |
translateLabel: true |
|
3078 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under') |
|
3079 |
choice: editMode |
|
3080 |
choiceValue: pasteUnder |
|
1196 | 3081 |
) |
2592 | 3082 |
(MenuItem |
3083 |
activeHelpKey: drawModePasteWithMask |
|
2792 | 3084 |
enabled: imageIsLoadedHolder |
2592 | 3085 |
label: 'Paste with Mask' |
3086 |
translateLabel: true |
|
3087 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask') |
|
3088 |
choice: editMode |
|
3089 |
choiceValue: pasteWithMask |
|
1579 | 3090 |
) |
2592 | 3091 |
(MenuItem |
3092 |
activeHelpKey: drawModeSpecial |
|
2792 | 3093 |
enabled: imageIsLoadedHolder |
2592 | 3094 |
label: 'Special' |
3095 |
translateLabel: true |
|
3096 |
labelImage: (ResourceRetriever ImageEditor specialIcon 'Special') |
|
3097 |
choice: editMode |
|
3098 |
choiceValue: specialOperation |
|
1411 | 3099 |
) |
1196 | 3100 |
) |
3101 |
nil |
|
3102 |
nil |
|
400 | 3103 |
) |
2792 | 3104 |
|
3105 |
"Modified: / 04-07-2010 / 10:18:08 / cg" |
|
1558 | 3106 |
! |
3107 |
||
3108 |
previewMenu |
|
3109 |
"This resource specification was automatically generated |
|
3110 |
by the MenuEditor of ST/X." |
|
3111 |
||
3112 |
"Do not manually edit this!! If it is corrupted, |
|
3113 |
the MenuEditor may not be able to read the specification." |
|
3114 |
||
3115 |
" |
|
3116 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
3117 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
3118 |
" |
|
3119 |
||
3120 |
<resource: #menu> |
|
3121 |
||
3122 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3123 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3124 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3125 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3126 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3127 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3128 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3129 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3130 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3131 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3132 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3133 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3134 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3135 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3136 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3137 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3138 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3139 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3140 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3141 |
translateLabel: true |
2792 | 3142 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3143 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3144 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3145 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3146 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3147 |
translateLabel: true |
2792 | 3148 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3149 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3150 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3151 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3152 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3153 |
translateLabel: true |
2792 | 3154 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3155 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3156 |
) |
1774 | 3157 |
(MenuItem |
3158 |
label: '-' |
|
3159 |
) |
|
3160 |
(MenuItem |
|
3161 |
label: 'Red' |
|
3162 |
translateLabel: true |
|
2792 | 3163 |
choice: previewBackgroundColorHolder |
1774 | 3164 |
choiceValue: red |
3165 |
) |
|
3166 |
(MenuItem |
|
3167 |
label: 'Green' |
|
3168 |
translateLabel: true |
|
2792 | 3169 |
choice: previewBackgroundColorHolder |
1774 | 3170 |
choiceValue: green |
3171 |
) |
|
3172 |
(MenuItem |
|
3173 |
label: 'Blue' |
|
3174 |
translateLabel: true |
|
2792 | 3175 |
choice: previewBackgroundColorHolder |
1774 | 3176 |
choiceValue: blue |
3177 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3178 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3179 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3180 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3181 |
) |
1558 | 3182 |
) |
3183 |
) |
|
3184 |
nil |
|
3185 |
nil |
|
3186 |
) |
|
2792 | 3187 |
|
3188 |
"Modified: / 04-07-2010 / 10:20:09 / cg" |
|
1637 | 3189 |
! |
3190 |
||
3191 |
toolsMenuToolbar |
|
3192 |
"This resource specification was automatically generated |
|
3193 |
by the MenuEditor of ST/X." |
|
3194 |
||
3195 |
"Do not manually edit this!! If it is corrupted, |
|
3196 |
the MenuEditor may not be able to read the specification." |
|
3197 |
||
2881 | 3198 |
|
1637 | 3199 |
" |
3200 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
3201 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
3202 |
" |
|
3203 |
||
3204 |
<resource: #menu> |
|
3205 |
||
3206 |
^ |
|
2881 | 3207 |
#(Menu |
3208 |
( |
|
3209 |
(MenuItem |
|
3210 |
activeHelpKey: drawModePoint |
|
3211 |
enabled: imageIsLoadedHolder |
|
3212 |
label: 'Point' |
|
3213 |
translateLabel: true |
|
3214 |
isButton: true |
|
3215 |
labelImage: (ResourceRetriever ImageEditor pointIcon) |
|
3216 |
choice: editMode |
|
3217 |
choiceValue: point |
|
1637 | 3218 |
) |
2881 | 3219 |
(MenuItem |
3220 |
activeHelpKey: drawModeSpray |
|
3221 |
enabled: imageIsLoadedHolder |
|
3222 |
label: 'Spray' |
|
3223 |
translateLabel: true |
|
3224 |
isButton: true |
|
3225 |
labelImage: (ResourceRetriever ImageEditor sprayIcon) |
|
3226 |
choice: editMode |
|
3227 |
choiceValue: spray |
|
2375 | 3228 |
) |
2881 | 3229 |
(MenuItem |
3230 |
activeHelpKey: drawModeBox |
|
3231 |
enabled: imageIsLoadedHolder |
|
3232 |
label: 'Rect' |
|
3233 |
translateLabel: true |
|
3234 |
isButton: true |
|
3235 |
labelImage: (ResourceRetriever ImageEditor rectIcon) |
|
3236 |
choice: editMode |
|
3237 |
choiceValue: box |
|
1637 | 3238 |
) |
2881 | 3239 |
(MenuItem |
3240 |
activeHelpKey: drawModeFilledBox |
|
3241 |
enabled: imageIsLoadedHolder |
|
3242 |
label: 'FillRect' |
|
3243 |
translateLabel: true |
|
3244 |
isButton: true |
|
3245 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon) |
|
3246 |
choice: editMode |
|
3247 |
choiceValue: filledBox |
|
1637 | 3248 |
) |
2881 | 3249 |
(MenuItem |
3250 |
activeHelpKey: drawModeCircle |
|
3251 |
enabled: imageIsLoadedHolder |
|
3252 |
label: 'Circle' |
|
3253 |
translateLabel: true |
|
3254 |
isButton: true |
|
3255 |
labelImage: (ResourceRetriever ImageEditor circleIcon) |
|
3256 |
choice: editMode |
|
3257 |
choiceValue: circle |
|
2375 | 3258 |
) |
2881 | 3259 |
(MenuItem |
3260 |
activeHelpKey: drawModeFill |
|
3261 |
enabled: imageIsLoadedHolder |
|
3262 |
label: 'Fill' |
|
3263 |
translateLabel: true |
|
3264 |
isButton: true |
|
3265 |
labelImage: (ResourceRetriever ImageEditor fillIcon) |
|
3266 |
choice: editMode |
|
3267 |
choiceValue: fill |
|
1637 | 3268 |
) |
2881 | 3269 |
(MenuItem |
3270 |
activeHelpKey: drawModeCopy |
|
3271 |
enabled: imageIsLoadedHolder |
|
3272 |
label: 'Copy' |
|
3273 |
translateLabel: true |
|
3274 |
isButton: true |
|
3275 |
labelImage: (ResourceRetriever ImageEditor copyIcon) |
|
3276 |
choice: editMode |
|
3277 |
choiceValue: copy |
|
1637 | 3278 |
) |
2881 | 3279 |
(MenuItem |
3280 |
activeHelpKey: drawModePasteWithMask |
|
3281 |
enabled: imageIsLoadedHolder |
|
3282 |
label: 'Paste With Mask' |
|
3283 |
translateLabel: true |
|
3284 |
isButton: true |
|
3285 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon) |
|
3286 |
choice: editMode |
|
3287 |
choiceValue: pasteWithMask |
|
1637 | 3288 |
) |
2881 | 3289 |
(MenuItem |
3290 |
activeHelpKey: drawModePaste |
|
3291 |
enabled: imageIsLoadedHolder |
|
3292 |
label: 'Paste' |
|
3293 |
translateLabel: true |
|
3294 |
isButton: true |
|
3295 |
labelImage: (ResourceRetriever ImageEditor pasteIcon) |
|
3296 |
choice: editMode |
|
3297 |
choiceValue: paste |
|
1637 | 3298 |
) |
2881 | 3299 |
(MenuItem |
3300 |
activeHelpKey: drawModePasteUnder |
|
3301 |
enabled: imageIsLoadedHolder |
|
3302 |
label: 'Paste Under' |
|
3303 |
translateLabel: true |
|
3304 |
isButton: true |
|
3305 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon) |
|
3306 |
choice: editMode |
|
3307 |
choiceValue: pasteUnder |
|
1637 | 3308 |
) |
2881 | 3309 |
(MenuItem |
3310 |
activeHelpKey: drawModeSpecial |
|
3311 |
enabled: imageIsLoadedHolder |
|
3312 |
label: 'Special' |
|
3313 |
translateLabel: true |
|
3314 |
isButton: true |
|
3315 |
labelImage: (ResourceRetriever ImageEditor specialIcon) |
|
3316 |
choice: editMode |
|
3317 |
choiceValue: specialOperation |
|
1637 | 3318 |
) |
3319 |
) |
|
3320 |
nil |
|
3321 |
nil |
|
3322 |
) |
|
400 | 3323 |
! ! |
3324 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3325 |
!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
|
3326 |
|
1900 | 3327 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3328 |
"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
|
3329 |
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
|
3330 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3331 |
"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
|
3332 |
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
|
3333 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3334 |
" |
1975 | 3335 |
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
|
3336 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3337 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3338 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3339 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3340 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3341 |
(DataSetColumnSpec |
2174 | 3342 |
activeHelpKey: '' |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3343 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3344 |
rendererType: rowSelector |
2712 | 3345 |
backgroundSelector: theColorItself: |
3346 |
selectedBackgroundSelector: theColorItself: |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3347 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3348 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3349 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3350 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3351 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3352 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3353 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3354 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3355 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3356 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3357 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3358 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3359 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3360 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3361 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3362 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3363 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3364 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3365 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3366 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3367 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3368 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3369 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3370 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3371 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3372 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3373 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3374 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3375 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3376 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3377 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3378 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3379 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3380 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3381 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3382 |
) |
2174 | 3383 |
|
3384 |
"Modified: / 22-07-2007 / 13:21:57 / cg" |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3385 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3386 |
|
400 | 3387 |
!ImageEditor methodsFor:'accessing'! |
3388 |
||
3389 |
image |
|
767 | 3390 |
"returns the current editing image" |
400 | 3391 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3392 |
^ imageEditView image |
400 | 3393 |
! |
3394 |
||
3395 |
postOpenAction: anAction |
|
767 | 3396 |
"sets an action which is evaluated after opening" |
400 | 3397 |
|
3398 |
postOpenAction := anAction |
|
1381 | 3399 |
! |
3400 |
||
3401 |
resourceClass:aClass |
|
3402 |
imageEditView resourceClass:aClass |
|
400 | 3403 |
! ! |
3404 |
||
2767 | 3405 |
!ImageEditor methodsFor:'accessing-behavior'! |
3406 |
||
3407 |
allowedToChangeImageDimensionAndDepth |
|
3408 |
"used to edit an existing image's contents only (Expecco)" |
|
3409 |
||
3410 |
^ allowedToChangeImageDimensionAndDepth ? true |
|
3411 |
! |
|
3412 |
||
3413 |
allowedToChangeImageDimensionAndDepth:aBoolean |
|
3414 |
"used to edit an existing image's contents only (Expecco)" |
|
3415 |
||
3416 |
allowedToChangeImageDimensionAndDepth := aBoolean |
|
3417 |
! ! |
|
3418 |
||
1398 | 3419 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 3420 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3421 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3422 |
"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
|
3423 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3424 |
^(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
|
3425 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3426 |
"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
|
3427 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3428 |
|
487 | 3429 |
coordLabel |
767 | 3430 |
"returns the view the coord label" |
487 | 3431 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3432 |
^self componentAt: #coordLabel |
487 | 3433 |
! |
3434 |
||
400 | 3435 |
imageEditView |
911 | 3436 |
"returns the view of the image" |
400 | 3437 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3438 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3439 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3440 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3441 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3442 |
^ imageEditView |
1345 | 3443 |
|
3444 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 3445 |
! |
3446 |
||
3447 |
imagePreView |
|
767 | 3448 |
"returns the preview of the image" |
400 | 3449 |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3450 |
|imagePreViewSubViews| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3451 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3452 |
imagePreViewSubViews := (self componentAt: #imagePreView) subViews. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3453 |
|
2043 | 3454 |
"subViews is an empty array at closing image Editor" |
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3455 |
imagePreViewSubViews isEmptyOrNil ifTrue:[ |
2043 | 3456 |
^ nil |
3457 |
]. |
|
3458 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3459 |
^ imagePreViewSubViews first |
475 | 3460 |
! ! |
3461 |
||
400 | 3462 |
!ImageEditor methodsFor:'aspects'! |
3463 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3464 |
activityInfoHolder |
1987 | 3465 |
^ self infoLabelHolder |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3466 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3467 |
"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
|
3468 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3469 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3470 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3471 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3472 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3473 |
"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
|
3474 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3475 |
|
2792 | 3476 |
hasClassAndSelectorDefinedHolder |
1054 | 3477 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3478 |
|cls| |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3479 |
|
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3480 |
(cls := imageEditView resourceClass) notNil |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3481 |
and:[imageEditView resourceSelector notNil] |
1054 | 3482 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3483 |
|
2792 | 3484 |
"Created: / 04-07-2010 / 10:11:10 / cg" |
3485 |
! |
|
3486 |
||
3487 |
hasClassDefinedHolder |
|
1054 | 3488 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3489 |
imageEditView resourceClass notNil |
1054 | 3490 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3491 |
|
2792 | 3492 |
"Created: / 04-07-2010 / 10:11:47 / cg" |
3493 |
! |
|
3494 |
||
3495 |
hasColorSelectedHolder |
|
3496 |
^ [ self selectedColorIndexOrNil notNil ] |
|
3497 |
||
3498 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
2651 | 3499 |
! |
3500 |
||
1008 | 3501 |
hasColormap |
2792 | 3502 |
^ self image notNil and:[self image colorMap notNil] |
3503 |
||
3504 |
"Created: / 30-09-1998 / 23:53:55 / cg" |
|
3505 |
"Modified: / 04-07-2010 / 10:13:26 / cg" |
|
1008 | 3506 |
! |
3507 |
||
2651 | 3508 |
hasColormapAndColorSelected |
2792 | 3509 |
^ [ self hasColormapHolder value and:[self hasColorSelectedHolder value]] |
3510 |
||
3511 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
3512 |
! |
|
3513 |
||
3514 |
hasColormapHolder |
|
3515 |
^ [self hasColormap] |
|
3516 |
||
3517 |
"Created: / 04-07-2010 / 10:13:05 / cg" |
|
3518 |
! |
|
3519 |
||
2812 | 3520 |
imageHasImageSequence |
3521 |
^ self image notNil and:[self image imageSequence notNil] |
|
3522 |
||
3523 |
"Created: / 21-10-2010 / 14:35:45 / cg" |
|
3524 |
! |
|
3525 |
||
3526 |
imageHasImageSequenceHolder |
|
3527 |
|holder| |
|
3528 |
||
3529 |
(holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[ |
|
3530 |
builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue). |
|
3531 |
holder value:(self imageHasImageSequence). |
|
3532 |
]. |
|
3533 |
^ holder |
|
3534 |
||
3535 |
"Modified: / 21-10-2010 / 14:36:57 / cg" |
|
3536 |
! |
|
3537 |
||
3538 |
imageHasNextImage |
|
3539 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ] |
|
3540 |
||
3541 |
"Created: / 21-10-2010 / 14:37:10 / cg" |
|
3542 |
! |
|
3543 |
||
2792 | 3544 |
imageHasNextImageHolder |
2812 | 3545 |
|holder| |
3546 |
||
3547 |
(holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[ |
|
3548 |
builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue). |
|
3549 |
holder value:(self imageHasNextImage). |
|
3550 |
]. |
|
3551 |
^ holder |
|
3552 |
||
3553 |
"Modified: / 21-10-2010 / 14:37:40 / cg" |
|
3554 |
! |
|
3555 |
||
3556 |
imageHasPreviousImage |
|
3557 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ] |
|
3558 |
||
3559 |
"Created: / 21-10-2010 / 14:37:21 / cg" |
|
3560 |
! |
|
3561 |
||
3562 |
imageHasPreviousImageHolder |
|
3563 |
|holder| |
|
3564 |
||
3565 |
(holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[ |
|
3566 |
builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue). |
|
3567 |
holder value:(self imageHasPreviousImage). |
|
3568 |
]. |
|
3569 |
^ holder |
|
3570 |
||
3571 |
"Modified: / 21-10-2010 / 14:37:48 / cg" |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
3572 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
3573 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3574 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3575 |
|holder| |
2792 | 3576 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3577 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3578 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3579 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3580 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3581 |
|
2792 | 3582 |
"Modified: / 04-07-2010 / 10:15:14 / cg" |
400 | 3583 |
! |
3584 |
||
2767 | 3585 |
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
3586 |
"returns whether an image is loaded as value holder" |
|
3587 |
||
3588 |
^ [ |
|
2792 | 3589 |
self imageIsLoadedHolder value |
2767 | 3590 |
and:[ self allowedToChangeImageDimensionAndDepth ] |
3591 |
] |
|
2792 | 3592 |
|
3593 |
"Modified: / 04-07-2010 / 10:15:43 / cg" |
|
2767 | 3594 |
! |
3595 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3596 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3597 |
"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
|
3598 |
|
2792 | 3599 |
^ [self hasClassAndSelectorDefinedHolder value |
3600 |
and:[self imageIsLoadedHolder value]] |
|
3601 |
||
3602 |
"Created: / 31-07-1998 / 02:04:18 / cg" |
|
3603 |
"Modified: / 04-07-2010 / 10:15:48 / cg" |
|
3604 |
! |
|
3605 |
||
3606 |
imageIsLoadedHolder |
|
3607 |
"returns whether an image is loaded as value holder" |
|
3608 |
||
3609 |
|holder| |
|
3610 |
||
3611 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
3612 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
3613 |
]. |
|
3614 |
^ holder |
|
3615 |
||
3616 |
"Created: / 04-07-2010 / 10:15:38 / cg" |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3617 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3618 |
|
400 | 3619 |
listOfColors |
1896 | 3620 |
"returns the list of colors" |
3621 |
||
3622 |
|list| |
|
3623 |
||
3624 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
3625 |
builder aspectAt:#listOfColors put:(list := List new). |
|
3626 |
list addDependent:self. |
|
400 | 3627 |
]. |
1896 | 3628 |
^ list |
400 | 3629 |
! |
3630 |
||
1987 | 3631 |
magnificationHolder |
3632 |
"returns current magnification of the image as an AspectAdaptor" |
|
3633 |
||
3634 |
|holder| |
|
3635 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
3636 |
builder aspectAt:#valueOfMagnification put:( |
|
3637 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
3638 |
]. |
|
3639 |
^ holder |
|
3640 |
! |
|
3641 |
||
2881 | 3642 |
penWidthHolder |
3643 |
|holder| |
|
3644 |
||
3645 |
(holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[ |
|
3646 |
builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue). |
|
3647 |
holder onChangeSend:#penWidthHolderChanged to:self. |
|
3648 |
]. |
|
3649 |
^ holder |
|
3650 |
||
3651 |
"Created: / 15-02-2012 / 22:30:58 / cg" |
|
3652 |
! |
|
3653 |
||
2792 | 3654 |
previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3655 |
|holder| |
2792 | 3656 |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3657 |
(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
|
3658 |
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
|
3659 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3660 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3661 |
^ holder |
2792 | 3662 |
|
3663 |
"Created: / 04-07-2010 / 10:19:34 / cg" |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3664 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3665 |
|
400 | 3666 |
selectionOfColor |
1682 | 3667 |
"returns a valueHolder for the current selection of the edit color. |
3668 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 3669 |
|
3670 |
|holder| |
|
1682 | 3671 |
|
400 | 3672 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
3673 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 3674 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 3675 |
]. |
3676 |
^ holder |
|
3677 |
! |
|
3678 |
||
2881 | 3679 |
spraySpotHolder |
3680 |
|holder| |
|
3681 |
||
3682 |
(holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[ |
|
3683 |
builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue). |
|
3684 |
holder onChangeSend:#spraySpotHolderChanged to:self. |
|
3685 |
]. |
|
3686 |
^ holder |
|
3687 |
||
3688 |
"Created: / 15-02-2012 / 22:36:38 / cg" |
|
3689 |
! |
|
3690 |
||
1558 | 3691 |
tileModeHolder |
3692 |
|holder| |
|
2812 | 3693 |
|
1558 | 3694 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
3695 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
3696 |
holder addDependent:self. |
|
3697 |
]. |
|
3698 |
^ holder |
|
2812 | 3699 |
|
3700 |
"Modified: / 21-10-2010 / 14:35:24 / cg" |
|
1558 | 3701 |
! |
3702 |
||
400 | 3703 |
valueOfMagnification |
2308 | 3704 |
<resource: #obsolete> |
767 | 3705 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 3706 |
|
1987 | 3707 |
self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'. |
3708 |
^ self magnificationHolder |
|
400 | 3709 |
! ! |
3710 |
||
767 | 3711 |
!ImageEditor methodsFor:'change & update'! |
3712 |
||
3713 |
findColorMapMode |
|
899 | 3714 |
"finds the colorMapMode for a new image" |
767 | 3715 |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3716 |
|image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 3717 |
|
3718 |
image := self image. |
|
1975 | 3719 |
image isNil ifTrue:[^ self ]. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3720 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3721 |
image mask notNil ifTrue: [ |
1896 | 3722 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3723 |
] ifFalse:[ |
1896 | 3724 |
colorMapModeKey := 'depth'. |
1054 | 3725 |
]. |
1896 | 3726 |
colorMapModeKey := colorMapModeKey , image depth printString. |
1967 | 3727 |
self colorMapMode setValue:colorMapModeKey. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3728 |
|
1928 | 3729 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3730 |
image depth > 12 ifTrue:[ |
2447 | 3731 |
newListOfColors := OrderedCollection new. |
2870 | 3732 |
(image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[ |
1927 | 3733 |
someOrAllUsedColors := image usedColorsMax:10000. |
2054 | 3734 |
someOrAllUsedColors notNil ifTrue:[ |
3735 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
|
3736 |
someOrAllUsedColors sort:self sortBlockForColors. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3737 |
newListOfColors addAll:someOrAllUsedColors. |
2054 | 3738 |
"/ listOfColors add:Color black; add:Color white. |
3739 |
] |
|
1904 | 3740 |
] ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3741 |
newListOfColors addAll:(image colorMap). |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3742 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3743 |
] ifFalse:[ |
2447 | 3744 |
newListOfColors := OrderedCollection withAll:(self listOfColors). |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3745 |
newListOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3746 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3747 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3748 |
]. |
2054 | 3749 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3750 |
newListOfColors notEmptyOrNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3751 |
drawColor1 := newListOfColors at:1. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3752 |
drawColor2 := newListOfColors at:2 ifAbsent:drawColor1. |
2054 | 3753 |
|
3754 |
self hasMask ifTrue: [ |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3755 |
(newListOfColors contains: [:clr| clr = (Color colorId:0)]) |
2054 | 3756 |
ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3757 |
newListOfColors addFirst:(Color colorId:0). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3758 |
drawColor1 := newListOfColors at:2. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3759 |
drawColor2 := newListOfColors at:3 ifAbsent:drawColor1. |
2054 | 3760 |
] |
3761 |
]. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3762 |
"/ imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3763 |
"/ self selectionOfColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3764 |
"/ setValue: 0; |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3765 |
"/ value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 3766 |
]. |
2447 | 3767 |
self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[ |
3768 |
self listOfColors contents:newListOfColors. |
|
3769 |
]. |
|
2870 | 3770 |
|
3771 |
"Modified: / 18-01-2012 / 13:58:38 / cg" |
|
767 | 3772 |
! |
3773 |
||
942 | 3774 |
update:something with:aParameter from:changedObject |
2042 | 3775 |
|clrIndex img imagePreView clr changedColor| |
1436 | 3776 |
|
3777 |
img := self image. |
|
2042 | 3778 |
imagePreView := self imagePreView. |
1558 | 3779 |
|
3780 |
changedObject == self tileModeHolder ifTrue:[ |
|
2042 | 3781 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3782 |
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
|
3783 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3784 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3785 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3786 |
]. |
2792 | 3787 |
changedObject == self previewBackgroundColorHolder ifTrue:[ |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3788 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3789 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3790 |
ifFalse:[Color perform:changedObject value]. |
2042 | 3791 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3792 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3793 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3794 |
invalidate. |
1558 | 3795 |
^ self |
3796 |
]. |
|
3797 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3798 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3799 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3800 |
"/ colormap entry changed at aParameter |
960 | 3801 |
|
3802 |
clrIndex := aParameter. |
|
3803 |
(self hasMask) ifTrue:[ |
|
3804 |
clrIndex := clrIndex - 1. |
|
3805 |
]. |
|
1928 | 3806 |
changedColor := changedObject at:aParameter. |
3807 |
img colorMap notNil ifTrue:[ |
|
3808 |
img colorMap at:clrIndex put:changedColor. |
|
3809 |
self colorMapChanged. |
|
3810 |
] ifFalse:[ |
|
3811 |
drawingColormap notNil ifTrue:[ |
|
3812 |
drawingColormap at:clrIndex put:changedColor. |
|
3813 |
]. |
|
3814 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3815 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3816 |
]. |
1896 | 3817 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3818 |
]. |
1124 | 3819 |
|
3820 |
changedObject == imageEditView undoImages ifTrue:[ |
|
1987 | 3821 |
self canUndoHolder value:(changedObject notEmpty). |
1124 | 3822 |
^ self. |
3823 |
]. |
|
3824 |
||
1345 | 3825 |
changedObject == imageEditView ifTrue:[ |
3826 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3827 |
self updateListOfColorsAndColormapMode. |
1345 | 3828 |
^ self. |
3829 |
]. |
|
3830 |
something == #image ifTrue:[ |
|
2812 | 3831 |
self updateAfterImageChange. |
2728 | 3832 |
imagePreView image:img scroll:false. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3833 |
self updateListOfColorsAndColormapMode. |
1558 | 3834 |
self tileModeHolder value ifTrue:[ |
2042 | 3835 |
imagePreView tileMode:true tileOffset:(img extent). |
1558 | 3836 |
]. |
1345 | 3837 |
^ self. |
3838 |
]. |
|
3839 |
something == #subImageIn ifTrue:[ |
|
2042 | 3840 |
imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3841 |
self error:'internal error' mayProceed:true. |
1406 | 3842 |
]. |
1558 | 3843 |
self tileModeHolder value ifTrue:[ |
2042 | 3844 |
imagePreView invalidate. |
1558 | 3845 |
] ifFalse:[ |
2042 | 3846 |
imagePreView invalidate:aParameter. |
1558 | 3847 |
]. |
1345 | 3848 |
^ self. |
3849 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3850 |
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
|
3851 |
(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
|
3852 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3853 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3854 |
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
|
3855 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3856 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3857 |
]. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3858 |
self selectionOfColor value:clrIndex. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3859 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3860 |
]. |
1345 | 3861 |
^ self. |
3862 |
]. |
|
3863 |
||
1880 | 3864 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
3865 |
"/ self halt:'to be implemented'. |
|
3866 |
^ self |
|
3867 |
]. |
|
3868 |
||
1345 | 3869 |
changedObject == imageEditView image ifTrue:[ |
2042 | 3870 |
"/ self halt:'to be implemented'. |
2812 | 3871 |
self updateAfterImageChange. |
1345 | 3872 |
^ self. |
3873 |
]. |
|
3874 |
||
942 | 3875 |
super update:something with:aParameter from:changedObject |
3876 |
||
2812 | 3877 |
"Modified: / 21-10-2010 / 14:34:31 / cg" |
3878 |
! |
|
3879 |
||
3880 |
updateAfterImageChange |
|
3881 |
|img| |
|
3882 |
||
3883 |
(img := self image) notNil ifTrue:[ |
|
3884 |
img := img onDevice:device. |
|
3885 |
self updateColorsFromImage:img. |
|
3886 |
self findColorMapMode. |
|
3887 |
self updateLabelsAndHistory. |
|
3888 |
||
3889 |
imageSeqNr isNil ifTrue:[ |
|
3890 |
imageSeqNr := 1 |
|
3891 |
]. |
|
3892 |
self imageHasImageSequenceHolder value:(self imageHasImageSequence). |
|
3893 |
self imageHasNextImageHolder value:(self imageHasNextImage). |
|
3894 |
self imageHasPreviousImageHolder value:(self imageHasPreviousImage). |
|
3895 |
] ifFalse:[ |
|
3896 |
self updateForNoImage |
|
3897 |
] |
|
3898 |
||
3899 |
"Modified: / 21-10-2010 / 14:40:45 / cg" |
|
942 | 3900 |
! |
3901 |
||
1900 | 3902 |
updateColorsFromImage:image |
3903 |
|colors| |
|
3904 |
||
2870 | 3905 |
image depth > 16 ifTrue:[ |
3906 |
self listOfColors contents:#(). |
|
3907 |
^ self. |
|
3908 |
]. |
|
3909 |
||
1904 | 3910 |
colors := image colorMap. |
3911 |
colors isNil ifTrue:[ |
|
1906 | 3912 |
Error handle:[:ex | |
3913 |
colors := OrderedCollection new. |
|
3914 |
] do:[ |
|
3915 |
colors := image usedColors asSet. |
|
2870 | 3916 |
]. |
1900 | 3917 |
]. |
1904 | 3918 |
self listOfColors contents:(colors asOrderedCollection). |
2870 | 3919 |
|
3920 |
"Modified: / 18-01-2012 / 13:57:43 / cg" |
|
1900 | 3921 |
! |
3922 |
||
1054 | 3923 |
updateForNoImage |
767 | 3924 |
"updates channels and view, if image is loaded" |
3925 |
||
2792 | 3926 |
self imageIsLoadedHolder value: false. |
767 | 3927 |
self listOfColors removeAll. |
2812 | 3928 |
self imagePreView image: nil. |
3929 |
self imageHasImageSequenceHolder value:false. |
|
3930 |
||
3931 |
"Modified: / 21-10-2010 / 14:39:13 / cg" |
|
767 | 3932 |
! |
3933 |
||
3934 |
updateLabelsAndHistory |
|
3935 |
"updates labels and history, if something has changed" |
|
3936 |
||
1910 | 3937 |
|image| |
3938 |
||
3939 |
image := self image. |
|
3940 |
||
2792 | 3941 |
self imageIsLoadedHolder value: image notNil. |
1910 | 3942 |
image isNil ifTrue: [^nil]. |
767 | 3943 |
|
3944 |
self updateInfoLabel. |
|
3945 |
||
1975 | 3946 |
imageEditView resourceClass notNil ifTrue:[ |
3947 |
imageEditView resourceSelector notNil ifTrue:[ |
|
3948 |
self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector. |
|
3949 |
] |
|
3950 |
]. |
|
3951 |
||
3952 |
image fileName notNil ifTrue: [ |
|
3953 |
self addHistoryEntryForFile:image fileName. |
|
3954 |
]. |
|
2792 | 3955 |
|
3956 |
"Modified: / 04-07-2010 / 10:16:02 / cg" |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3957 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3958 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3959 |
updateListOfColorsAndColormapMode |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3960 |
|selectedColor colorMap image| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3961 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3962 |
selectedColor := self selectedColorOrNil. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3963 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3964 |
image := self image. |
1975 | 3965 |
image isNil ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3966 |
self listOfColors removeAll. |
1975 | 3967 |
] ifFalse:[ |
3968 |
colorMap := image colorMap. |
|
2447 | 3969 |
colorMap notNil ifTrue:[ |
3970 |
(colorMap size <= 4096) ifTrue:[ |
|
3971 |
image mask notNil ifTrue:[ |
|
3972 |
colorMap := (Array with:(Color noColor)),colorMap. |
|
3973 |
]. |
|
3974 |
self listOfColors contents:colorMap. |
|
3975 |
] ifFalse:[ |
|
3976 |
self listOfColors removeAll. |
|
3977 |
colorMap isFixedPalette ifTrue:[ |
|
3978 |
image colorMap:nil. |
|
3979 |
image photometric:#rgb. |
|
3980 |
image samplesPerPixel:3. |
|
3981 |
||
3982 |
image bitsPerSample:(Array |
|
3983 |
with:(colorMap bitsRed) |
|
3984 |
with:(colorMap bitsGreen) |
|
3985 |
with:(colorMap bitsBlue)). |
|
3986 |
]. |
|
3987 |
] |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3988 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3989 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3990 |
self findColorMapMode. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3991 |
selectedColor notNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3992 |
self selectColor:selectedColor. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3993 |
]. |
767 | 3994 |
! ! |
3995 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3996 |
!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
|
3997 |
|
1951 | 3998 |
atColor:anOldColor put:newColor |
1952 | 3999 |
"a color changed to a new color" |
4000 |
||
1930 | 4001 |
|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
|
4002 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4003 |
list := self listOfColors. |
1951 | 4004 |
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
|
4005 |
|
1930 | 4006 |
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
|
4007 |
index ~~ 0 ifTrue:[ |
1928 | 4008 |
oldColor := list at:index. |
4009 |
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
|
4010 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4011 |
self error:'internal error' mayProceed:true. |
1928 | 4012 |
list add:newColor |
4013 |
]. |
|
4014 |
||
4015 |
image := self image. |
|
4016 |
(image colorMap isNil |
|
4017 |
and:[drawingColormap isNil]) ifTrue:[ |
|
4018 |
oldColor notNil ifTrue:[ |
|
4019 |
imageEditView makeUndo. |
|
4020 |
newImage := image copy. |
|
4021 |
newImage |
|
4022 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
4023 |
do:[:x :y :clr | |
|
4024 |
|newClr| |
|
4025 |
||
1951 | 4026 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 4027 |
newImage colorAtX:x y:y put:newClr |
4028 |
]. |
|
4029 |
imageEditView image:newImage. |
|
4030 |
imageEditView setModified. |
|
4031 |
self updateImage. |
|
4032 |
self updateImagePreView. |
|
1930 | 4033 |
|
4034 |
self selectionOfColor value:oldSel. |
|
4035 |
imageEditView selectedColorIndex:oldSel. |
|
4036 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 4037 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4038 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4039 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4040 |
|
942 | 4041 |
blueAtColor:aColor put:newBlue |
4042 |
"helper used to return a new row element, when blue is changed" |
|
4043 |
||
4044 |
|byte| |
|
4045 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4046 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4047 |
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
|
4048 |
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
|
4049 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4050 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4051 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 4052 |
! |
4053 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4054 |
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
|
4055 |
"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
|
4056 |
|
930 | 4057 |
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
|
4058 |
^ 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
|
4059 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4060 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 4061 |
"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
|
4062 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4063 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4064 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4065 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4066 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4067 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4068 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4069 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4070 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4071 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4072 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4073 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4074 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4075 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4076 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4077 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4078 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4079 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4080 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4081 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4082 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4083 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4084 |
|
942 | 4085 |
greenAtColor:aColor put:newGreen |
4086 |
"helper used to return a new row element, when green is changed" |
|
4087 |
||
4088 |
|byte| |
|
4089 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4090 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4091 |
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
|
4092 |
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
|
4093 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4094 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4095 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 4096 |
! |
4097 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4098 |
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
|
4099 |
"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
|
4100 |
|
930 | 4101 |
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
|
4102 |
^ 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
|
4103 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4104 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 4105 |
"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
|
4106 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4107 |
|
942 | 4108 |
redAtColor:aColor put:newRed |
4109 |
"helper used to return a new row element, when red is changed" |
|
4110 |
||
4111 |
|byte| |
|
4112 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4113 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4114 |
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
|
4115 |
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
|
4116 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4117 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4118 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 4119 |
! |
4120 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4121 |
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
|
4122 |
"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
|
4123 |
|
930 | 4124 |
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
|
4125 |
^ 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
|
4126 |
|
930 | 4127 |
"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
|
4128 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4129 |
|
2712 | 4130 |
theColorItself:aColor |
4131 |
"an accessor for the table-column" |
|
4132 |
||
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4133 |
^ 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
|
4134 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4135 |
|
2663 | 4136 |
!ImageEditor methodsFor:'defaults'! |
4137 |
||
4138 |
aboutIcon |
|
4139 |
^ self class defaultIcon |
|
4140 |
! ! |
|
4141 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4142 |
!ImageEditor methodsFor:'drag & drop'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4143 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4144 |
canDropObjects:aCollectionOfDropObjects in:aWidget |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4145 |
^ (aCollectionOfDropObjects size == 1) |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4146 |
and:[ aCollectionOfDropObjects |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4147 |
contains:[:dropObject | dropObject isFileObject]] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4148 |
! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4149 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4150 |
dropObjects:aCollectionOfDropObjects in:aWidget at:position |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4151 |
|dropObject| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4152 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4153 |
dropObject := aCollectionOfDropObjects first. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4154 |
dropObject isFileObject ifTrue:[ |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4155 |
self loadFromFile:dropObject asFilename. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4156 |
] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4157 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4158 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4159 |
!ImageEditor methodsFor:'event handling'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4160 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4161 |
processEvent:anEvent |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4162 |
"Return true, if I have eaten the event" |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4163 |
|
2945 | 4164 |
<resource: #keyboard (#Paste #Copy )> |
4165 |
||
2841 | 4166 |
|view focusView p transformation| |
4167 |
||
4168 |
view := anEvent view. |
|
4169 |
view notNil ifTrue:[ |
|
4170 |
view == self imagePreView ifTrue:[ |
|
4171 |
((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
|
4172 |
or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
|
4173 |
p := anEvent x @ anEvent y. |
|
4174 |
(transformation := view transformation) notNil ifTrue:[ |
|
4175 |
p := transformation applyInverseTo:p. |
|
4176 |
]. |
|
4177 |
self imageEditView scrollToMakeVisible:p. |
|
4178 |
^ true. |
|
2546 | 4179 |
]. |
2841 | 4180 |
]. |
4181 |
||
4182 |
anEvent isKeyPressEvent ifTrue:[ |
|
4183 |
focusView := view windowGroup focusView ? view. |
|
4184 |
(focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[ |
|
4185 |
anEvent key == #Paste ifTrue:[ |
|
4186 |
self pasteColorIntoColormap. |
|
4187 |
^ true. |
|
4188 |
]. |
|
4189 |
anEvent key == #Copy ifTrue:[ |
|
4190 |
self copyColorFromColormap. |
|
4191 |
^ true. |
|
4192 |
]. |
|
4193 |
]. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4194 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4195 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4196 |
^ false. |
2841 | 4197 |
|
4198 |
"Modified: / 04-04-2011 / 13:50:09 / cg" |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4199 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4200 |
|
672 | 4201 |
!ImageEditor methodsFor:'help'! |
4202 |
||
4203 |
defaultInfoLabel |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4204 |
"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
|
4205 |
some widget with a help text." |
672 | 4206 |
|
1966 | 4207 |
|resourceClass resourceSelector| |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4208 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4209 |
resourceClass := imageEditView resourceClass. |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
4210 |
resourceClass notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4211 |
resourceSelector := imageEditView resourceSelector. |
1966 | 4212 |
resourceSelector notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4213 |
^ resourceClass name, ' >> ', resourceSelector |
1966 | 4214 |
]. |
672 | 4215 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4216 |
^ 'No class and selector defined.' |
674 | 4217 |
! |
4218 |
||
702 | 4219 |
openDocumentation |
767 | 4220 |
"opens the documentation file of the Image Editor" |
674 | 4221 |
|
763 | 4222 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
4223 |
||
672 | 4224 |
! ! |
4225 |
||
767 | 4226 |
!ImageEditor methodsFor:'loading'! |
4227 |
||
1975 | 4228 |
loadFromClass:aClass andSelector:aSelector |
4229 |
"loads an image from the method specified by class and selector" |
|
4230 |
||
4231 |
self assert:(aClass isNil or:[aClass isClass]). |
|
4232 |
||
2932
7f305ee14e98
changed: #loadFromClass:andSelector:
Claus Gittinger <cg@exept.de>
parents:
2893
diff
changeset
|
4233 |
(aClass isNil or:[aSelector isNil]) ifTrue:[ |
1975 | 4234 |
imageEditView resourceClass:aClass. |
4235 |
imageEditView resourceSelector:aSelector. |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4236 |
imageEditView image:nil. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4237 |
self clearModified. |
1966 | 4238 |
^ self. |
4239 |
]. |
|
4240 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4241 |
"/ (imageEditView resourceClass == aClass |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4242 |
"/ and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4243 |
"/ imageEditView modified ifFalse:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4244 |
"/ ^ self. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4245 |
"/ ]. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4246 |
"/ ]. |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4247 |
|
1975 | 4248 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[ |
1966 | 4249 |
self updateAfterImageChange. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4250 |
self clearModified. |
1966 | 4251 |
] |
1975 | 4252 |
|
4253 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
|
1966 | 4254 |
! |
4255 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4256 |
loadFromFile:aFileName |
767 | 4257 |
"loads an image from aFileName and sets up color map list and other info labels" |
4258 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4259 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4260 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
1966 | 4261 |
self updateAfterImageChange |
767 | 4262 |
] |
4263 |
] |
|
960 | 4264 |
|
1057 | 4265 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 4266 |
! |
4267 |
||
960 | 4268 |
loadFromImage:anImage |
767 | 4269 |
"loads an image from anImage and sets up color map list and other info labels" |
4270 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4271 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4272 |
|
1057 | 4273 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4274 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4275 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4276 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4277 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
4278 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4279 |
|
1966 | 4280 |
self updateAfterImageChange. |
4281 |
"/ img notNil ifTrue:[ |
|
4282 |
"/ self updateColorsFromImage:img. |
|
4283 |
"/ self findColorMapMode. |
|
4284 |
"/ self updateLabelsAndHistory. |
|
4285 |
"/ ] ifFalse:[ |
|
4286 |
"/ self updateForNoImage |
|
4287 |
"/ ] |
|
960 | 4288 |
|
1057 | 4289 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 4290 |
! |
4291 |
||
1975 | 4292 |
loadFromOrPrepareForClass: aClass andSelector: aSelector |
767 | 4293 |
"loads an image by evaluating aMessage; |
4294 |
if no image could extract from aMessage; do set the class and the selector from |
|
4295 |
the aMessage for a saving at the end of editing" |
|
4296 |
||
1975 | 4297 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [ |
1900 | 4298 |
self updateColorsFromImage:self image. |
767 | 4299 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4300 |
] ifFalse: [ |
1975 | 4301 |
imageEditView resourceClass: aClass. |
4302 |
imageEditView resourceSelector:aSelector. |
|
767 | 4303 |
]. |
4304 |
self updateLabelsAndHistory. |
|
1057 | 4305 |
|
4306 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 4307 |
! ! |
4308 |
||
400 | 4309 |
!ImageEditor methodsFor:'menu modes'! |
4310 |
||
975 | 4311 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4312 |
"returns the colorMapMode" |
400 | 4313 |
|
975 | 4314 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 4315 |
|
975 | 4316 |
^colorMapMode |
400 | 4317 |
! |
4318 |
||
975 | 4319 |
editMode |
4320 |
"returns editMode" |
|
400 | 4321 |
|
1054 | 4322 |
editMode isNil ifTrue: [ |
975 | 4323 |
editMode := #point asValue. |
1329 | 4324 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 4325 |
]. |
4326 |
||
4327 |
^editMode |
|
400 | 4328 |
! |
4329 |
||
975 | 4330 |
mouseKeyColorMode |
4331 |
"returns mouseKeyColorMode" |
|
400 | 4332 |
|
1345 | 4333 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 4334 |
mouseKeyColorMode := 1 asValue. |
1345 | 4335 |
mouseKeyColorMode onChangeEvaluate: [ |
4336 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
4337 |
self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor). |
|
4338 |
] |
|
956 | 4339 |
]. |
400 | 4340 |
|
975 | 4341 |
^mouseKeyColorMode |
1345 | 4342 |
|
4343 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 4344 |
! ! |
4345 |
||
1558 | 4346 |
!ImageEditor methodsFor:'private'! |
4347 |
||
1975 | 4348 |
checkModified |
4349 |
imageEditView modified value ifTrue:[ |
|
4350 |
(Dialog |
|
4351 |
confirm:(resources string:'Image was not saved. Proceed anyway ?') |
|
4352 |
yesLabel:(resources string:'Proceed') |
|
4353 |
noLabel:(resources string:'Cancel') |
|
4354 |
initialAnswer:false |
|
4355 |
) ifFalse: [^false]. |
|
4356 |
||
4357 |
imageEditView clearModified. |
|
4358 |
]. |
|
4359 |
^ true |
|
4360 |
||
4361 |
"Modified: / 29.7.1998 / 18:55:24 / cg" |
|
4362 |
! |
|
4363 |
||
1960 | 4364 |
pointFromString:aString |
4365 |
|p s x y| |
|
4366 |
||
4367 |
p := Object readFromString:aString onError:nil. |
|
1962 | 4368 |
p isPoint ifTrue:[^ p]. |
1960 | 4369 |
|
4370 |
s := aString readStream. |
|
4371 |
x := Number readFrom:s onError:nil. |
|
4372 |
x notNil ifTrue:[ |
|
4373 |
s skipSeparators. |
|
1962 | 4374 |
[s atEnd not and:[s peek isDigit not]] whileTrue:[s next]. |
1960 | 4375 |
y := Number readFrom:s onError:nil. |
1961 | 4376 |
^ x @ (y ? x) |
1960 | 4377 |
]. |
1962 | 4378 |
^ nil |
1960 | 4379 |
! |
4380 |
||
1939 | 4381 |
sortBlockForColors |
4382 |
^ [:a :b | |
|
4383 |
a redByte == b redByte ifTrue:[ |
|
4384 |
a greenByte == b greenByte ifTrue:[ |
|
4385 |
a blueByte < b blueByte |
|
4386 |
] ifFalse:[ |
|
4387 |
a greenByte < b greenByte |
|
4388 |
] |
|
4389 |
] ifFalse:[ |
|
4390 |
a redByte < b redByte |
|
4391 |
] |
|
4392 |
] |
|
4393 |
! |
|
4394 |
||
1598 | 4395 |
updateImage |
4396 |
|img| |
|
4397 |
||
4398 |
img := imageEditView image. |
|
4399 |
imageEditView image:img. |
|
4400 |
self fetchImageData. |
|
4401 |
! |
|
4402 |
||
1558 | 4403 |
updateImagePreView |
4404 |
self tileModeHolder value ifTrue:[ |
|
4405 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4406 |
]. |
2546 | 4407 |
self imagePreView setImage:(self image) scroll:false invalidate:true. |
1558 | 4408 |
! ! |
4409 |
||
535 | 4410 |
!ImageEditor methodsFor:'queries'! |
4411 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4412 |
hasLastGrabScreenArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4413 |
^ [ lastGrabbedScreenArea notNil ] |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4414 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4415 |
|
960 | 4416 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4417 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 4418 |
|
4419 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
4420 |
! |
|
4421 |
||
1975 | 4422 |
modified |
4423 |
^ imageEditView modified |
|
4424 |
! |
|
4425 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4426 |
modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4427 |
super modified:aBoolean. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4428 |
imageEditView modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4429 |
! |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4430 |
|
535 | 4431 |
preferredExtent |
767 | 4432 |
"returns the preferred extent" |
535 | 4433 |
|
2423
0c5ac1daf0e4
changed #preferredExtent - formating
Stefan Vogel <sv@exept.de>
parents:
2420
diff
changeset
|
4434 |
^ super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
535 | 4435 |
! ! |
4436 |
||
400 | 4437 |
!ImageEditor methodsFor:'selection'! |
4438 |
||
4439 |
magnification |
|
767 | 4440 |
"returns the magnification of the image" |
400 | 4441 |
|
911 | 4442 |
self imageEditView isNil ifTrue: [^1]. |
4443 |
^imageEditView magnification x |
|
400 | 4444 |
! |
4445 |
||
4446 |
magnification: aValue |
|
767 | 4447 |
"sets the magnification of the image" |
400 | 4448 |
|
905 | 4449 |
|magnification| |
4450 |
magnification := (aValue ? 1) asPoint. |
|
911 | 4451 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
4452 |
imageEditView magnification: magnification |
|
400 | 4453 |
! |
4454 |
||
4455 |
selectedColorIndex |
|
767 | 4456 |
"returns the index of the selected color" |
400 | 4457 |
|
4458 |
^selectedColorIndex |
|
4459 |
! |
|
4460 |
||
4461 |
selectedColorIndex: anIndex |
|
767 | 4462 |
"sets the index of the selected color" |
400 | 4463 |
|
1054 | 4464 |
|clr pixel| |
4465 |
||
4466 |
selectedColorIndex := anIndex. |
|
2447 | 4467 |
anIndex isNil ifTrue:[^ self]. |
1054 | 4468 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
4469 |
clr isNil ifTrue:[^ self]. |
|
4470 |
||
1075 | 4471 |
pixel := anIndex - 1. |
1054 | 4472 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
4473 |
anIndex == 1 ifTrue:[ |
|
4474 |
pixel := nil. "/ mask |
|
4475 |
] ifFalse:[ |
|
1075 | 4476 |
pixel := pixel - 1 |
1054 | 4477 |
] |
4478 |
]. |
|
4479 |
imageEditView selectedColorIndex:pixel. |
|
4480 |
imageEditView selectedColor:clr. |
|
400 | 4481 |
! ! |
4482 |
||
1716 | 4483 |
!ImageEditor methodsFor:'startup & release'! |
400 | 4484 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4485 |
closeDownViews |
1644 | 4486 |
builder notNil ifTrue:[ |
4487 |
DefaultRelativeSizes := |
|
4488 |
Array |
|
1998 | 4489 |
with:(builder componentAt:#mainPanel) relativeCorners |
1644 | 4490 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
4491 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4492 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4493 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4494 |
|
400 | 4495 |
closeRequest |
2016 | 4496 |
"asks for permission before closing" |
4497 |
||
4498 |
imageEditView checkModified ifTrue:[ |
|
4499 |
super closeRequest |
|
4500 |
] |
|
400 | 4501 |
! |
4502 |
||
1980 | 4503 |
commonPostBuild |
1975 | 4504 |
imageEditView undoImages addDependent:self. |
4505 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
|
4506 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
|
4507 |
||
4508 |
imageEditView clickInfoCallBack:[:button :point | |
|
4509 |
|mouseButtonColorToolBar| |
|
4510 |
||
4511 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
|
4512 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
|
4513 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
4514 |
]. |
|
4515 |
||
4516 |
imageEditView addDependent:self. |
|
4517 |
imageEditView modifiedHolder addDependent:self. |
|
4518 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4519 |
DefaultRelativeSizes notNil ifTrue:[ |
1998 | 4520 |
(builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first. |
1980 | 4521 |
(builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4522 |
]. |
1995 | 4523 |
|
1996 | 4524 |
"/ using masters infoHolder ? |
4525 |
(builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ |
|
1998 | 4526 |
(builder componentAt:#mainPanel) layout bottomOffset:0. |
1995 | 4527 |
(builder componentAt:#infoBarSubSpec) beInvisible |
4528 |
] |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4529 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4530 |
|
1980 | 4531 |
open |
4532 |
"after opening, sets the masterApplication of the imageEditView to self" |
|
4533 |
||
4534 |
super open. |
|
4535 |
||
4536 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
|
4537 |
! |
|
4538 |
||
400 | 4539 |
postOpenWith:aBuilder |
767 | 4540 |
"after opening, sets the masterApplication of the imageEditView to self; |
4541 |
evaluate the postOpenAction" |
|
400 | 4542 |
|
1921 | 4543 |
postOpenAction value. |
400 | 4544 |
|
1250 | 4545 |
super postOpenWith:aBuilder. |
4546 |
||
4547 |
aBuilder keyboardProcessor menuBar:nil. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4548 |
self windowGroup addPreEventHook:self. |
400 | 4549 |
! ! |
4550 |
||
1715 | 4551 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4552 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4553 |
addColorToColormap |
1682 | 4554 |
self addColorToColormap:(Color black) |
4555 |
! |
|
4556 |
||
4557 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4558 |
|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
|
4559 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4560 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4561 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4562 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4563 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4564 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4565 |
|
1054 | 4566 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4567 |
cMap := img colorMap. |
1054 | 4568 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4569 |
drawingColormap isNil ifTrue:[ |
1916 | 4570 |
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
|
4571 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4572 |
]. |
1682 | 4573 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4574 |
self listOfColors contents:drawingColormap. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4575 |
self selectionOfColor value:(drawingColormap size). |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4576 |
|
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4577 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 4578 |
^ self |
4579 |
]. |
|
4580 |
||
1583 | 4581 |
("(depth == 1)" false |
1054 | 4582 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
4583 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4584 |
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
|
4585 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4586 |
]. |
1916 | 4587 |
(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
|
4588 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4589 |
^ self |
1057 | 4590 |
]. |
4591 |
||
4592 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4593 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4594 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4595 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4596 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4597 |
]. |
1057 | 4598 |
self colorMapMode:newMode. |
4599 |
] ifFalse:[ |
|
4600 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4601 |
]. |
1054 | 4602 |
|
4603 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4604 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4605 |
oldCListSize := listOfColors size. |
1054 | 4606 |
|
1682 | 4607 |
newColorMap := cMap copyWith:newColor. |
1054 | 4608 |
|
4609 |
newImage := img species new |
|
4610 |
width:img width |
|
4611 |
height:img height |
|
4612 |
depth:depth |
|
4613 |
fromArray:img bits. |
|
4614 |
||
4615 |
newImage colorMap:newColorMap. |
|
4616 |
newImage fileName:img fileName. |
|
4617 |
newImage mask:(img mask copy). |
|
4618 |
||
4619 |
(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
|
4620 |
listOfColors contents: newImage colorMap. |
1054 | 4621 |
self findColorMapMode. |
4622 |
"/ 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
|
4623 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4624 |
listOfColors removeLast |
1054 | 4625 |
]. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4626 |
self selectionOfColor value:(listOfColors size). |
1054 | 4627 |
self updateLabelsAndHistory. |
4628 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4629 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4630 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 4631 |
"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
|
4632 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4633 |
|
1650 | 4634 |
changeHLS |
4635 |
"interactive Hue/Light/Saturation editing" |
|
4636 |
||
4637 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4638 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
2438 | 4639 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
4640 |
anyChange | |
|
1652 | 4641 |
|
1741 | 4642 |
"/ compute the averageColor in the background (while asking user) |
2438 | 4643 |
avgColorHolder := nil asValue. |
4644 |
previewImageHolder := nil asValue. |
|
4645 |
||
1652 | 4646 |
readySema := Semaphore new. |
4647 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4648 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4649 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4650 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4651 |
originalColormap := image colorMap copy. |
2438 | 4652 |
originalPixels := image bits. |
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4653 |
avgColor := image averageColor. |
2438 | 4654 |
avgColorHolder value:avgColor. |
4655 |
||
4656 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
4657 |
previewImageHolder value: previewImage. |
|
4658 |
originalPreviewColormap := previewImage colorMap copy. |
|
4659 |
originalPreviewPixels := previewImage bits. |
|
4660 |
||
1652 | 4661 |
readySema signal. |
4662 |
] forkAt:7. |
|
1649 | 4663 |
|
4664 |
acceptChannel := TriggerValue new. |
|
4665 |
||
4666 |
firstChange := true. |
|
2438 | 4667 |
anyChange := false. |
1649 | 4668 |
|
1651 | 4669 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
4670 |
Color |
|
4671 |
hue:((clr hue) ? 0 + hShift) |
|
1925 | 4672 |
light:((clr light * lFactor / 100) "min:100") |
4673 |
saturation:((clr saturation * sFactor / 100) "min:100")]. |
|
1652 | 4674 |
|
1649 | 4675 |
shiftAction := |
4676 |
[ |
|
1650 | 4677 |
|hShift lFactor sFactor| |
4678 |
||
1649 | 4679 |
acceptChannel value:true. |
4680 |
||
4681 |
firstChange ifTrue:[ |
|
4682 |
imageEditView makeUndo. |
|
4683 |
firstChange := false. |
|
2438 | 4684 |
anyChange := true. |
1649 | 4685 |
]. |
1652 | 4686 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 4687 |
|
4688 |
hShift := hueShift value. |
|
4689 |
lFactor := lightValue value. |
|
4690 |
sFactor := saturationValue value. |
|
4691 |
||
1652 | 4692 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
4693 |
||
2438 | 4694 |
previewImage |
4695 |
colorMap:originalPreviewColormap copy; |
|
4696 |
bits:originalPreviewPixels copy; |
|
4697 |
release; |
|
4698 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
4699 |
previewImageHolder value:nil; value:previewImage. |
|
4700 |
||
1652 | 4701 |
shiftProcess notNil ifTrue:[ |
4702 |
shiftProcess terminate. |
|
4703 |
shiftProcess waitUntilTerminated. |
|
4704 |
shiftProcess := nil. |
|
4705 |
]. |
|
4706 |
shiftProcess := |
|
4707 |
[ |
|
4708 |
[ |
|
1656 | 4709 |
imageEditView image |
4710 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4711 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4712 |
release; |
1656 | 4713 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 4714 |
self updateImage. |
4715 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4716 |
self updateImagePreView. |
1652 | 4717 |
] ensure:[ shiftProcess := nil ]. |
4718 |
] forkAt:7. |
|
1649 | 4719 |
]. |
4720 |
||
4721 |
bindings := IdentityDictionary new. |
|
1650 | 4722 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 4723 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 4724 |
|
4725 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 4726 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 4727 |
|
4728 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 4729 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 4730 |
|
1649 | 4731 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 4732 |
bindings at:#hlsColor put:avgColorHolder. |
2438 | 4733 |
bindings at:#previewImageHolder put:previewImageHolder. |
1650 | 4734 |
|
4735 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 4736 |
ifFalse:[ |
2438 | 4737 |
anyChange ifTrue:[ |
1649 | 4738 |
imageEditView undo |
4739 |
] |
|
4740 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4741 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4742 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4743 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4744 |
]. |
2438 | 4745 |
|
4746 |
anyChange ifTrue:[ |
|
4747 |
self updateImage. |
|
4748 |
self updateImagePreView. |
|
4749 |
]. |
|
1649 | 4750 |
! |
4751 |
||
2652 | 4752 |
clearColormapEntry0AndMaskedPixels |
4753 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
4754 |
0 and then clear all masked pixels (to pixelValue 0). |
|
4755 |
This is required for windows icons to be really transparent" |
|
4756 |
||
4757 |
|index colorMap| |
|
4758 |
||
4759 |
self compressColorMap. |
|
4760 |
colorMap := self image colorMap. |
|
4761 |
(colorMap includes:(Color black)) ifFalse:[ |
|
4762 |
self addColorToColormap:(Color black). |
|
4763 |
colorMap := self image colorMap. |
|
4764 |
]. |
|
4765 |
index := colorMap indexOf:(Color black). |
|
4766 |
index == 1 ifFalse:[ |
|
4767 |
self sortColorMap. |
|
4768 |
colorMap := self image colorMap. |
|
4769 |
]. |
|
4770 |
self clearMaskedPixels |
|
4771 |
! |
|
4772 |
||
1403 | 4773 |
clearMaskedPixels |
4774 |
"clear all masked pixels (to pixelValue 0)" |
|
4775 |
||
2652 | 4776 |
|newImage| |
4777 |
||
4778 |
newImage := self image clearMaskedPixels. |
|
4779 |
0 to:newImage height - 1 do:[:y | |
|
4780 |
0 to:newImage width - 1 do:[:x | |
|
4781 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
4782 |
newImage pixelAtX:x y:y put:0 |
|
1460 | 4783 |
] |
1403 | 4784 |
] |
2652 | 4785 |
]. |
4786 |
||
4787 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
4788 |
self fetchImageData. |
|
1403 | 4789 |
] |
4790 |
! |
|
4791 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4792 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4793 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4794 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4795 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4796 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4797 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4798 |
self imageEditView invalidate. |
960 | 4799 |
self imagePreView invalidate. |
4800 |
||
4801 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
4802 |
"/ self updateLabelsAndHistory. |
|
4803 |
"/ self imagePreView image:img |
|
4804 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4805 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4806 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 4807 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4808 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4809 |
|
975 | 4810 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4811 |
"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
|
4812 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4813 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4814 |
oldImage image newColors realColorMap oldFileName |
1008 | 4815 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
4816 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4817 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4818 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4819 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4820 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4821 |
prevMode := colorMapMode value. |
1008 | 4822 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4823 |
newColorMap := self class listOfColorMaps at:aMode. |
2572 | 4824 |
aMode == #depth32 ifTrue:[ |
4825 |
depth := 32. |
|
4826 |
] ifFalse:[ |
|
4827 |
depth := (newColorMap size log:2) asInteger. |
|
4828 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4829 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4830 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4831 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4832 |
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
|
4833 |
] ifFalse:[ |
1008 | 4834 |
prevMode isNil ifTrue:[ |
4835 |
quest := 'Compute colormap (or use standard)' |
|
4836 |
] ifFalse:[ |
|
4837 |
quest := 'Keep colormap (or use standard)' |
|
4838 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4839 |
]. |
1008 | 4840 |
((prevMode = aMode) |
1057 | 4841 |
or:[depth > oldImage depth |
4842 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 4843 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4844 |
|
4845 |
"/ keep the colormap |
|
4846 |
newColorMap atAllPut:Color black. |
|
4847 |
depth > oldImage depth ifTrue:[ |
|
4848 |
"/ easy - simply copy the part |
|
4849 |
numColors := 1 bitShift:oldImage depth. |
|
4850 |
0 to:numColors-1 do:[:pixel | |
|
4851 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 4852 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4853 |
] ifFalse:[ |
1935 | 4854 |
"/ see if all used color fit the new colormap |
4855 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
4856 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
4857 |
usedColors := oldImage realUsedColors |
|
4858 |
]. |
|
4859 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
4860 |
"/ yea - just install them |
|
4861 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
4862 |
newColorMap at:idx put:clr |
|
4863 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4864 |
] ifFalse:[ |
1935 | 4865 |
"/ copy over those that are most often used. |
4866 |
oldImage depth < 8 ifTrue:[ |
|
4867 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4868 |
oldImage bits |
|
4869 |
expandPixels:(oldImage depth) |
|
4870 |
width:oldImage width |
|
4871 |
height:oldImage height |
|
4872 |
into:tmpBits |
|
4873 |
mapping:nil. |
|
986 | 4874 |
] ifFalse:[ |
1935 | 4875 |
oldImage depth == 8 ifTrue:[ |
4876 |
tmpBits := oldImage bits |
|
4877 |
] ifFalse:[ |
|
4878 |
colorMapMode value:prevMode. |
|
4879 |
self findColorMapMode. |
|
4880 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
4881 |
^ self |
|
4882 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
4883 |
"/ ifFalse:[. |
|
4884 |
"/ ^ self |
|
4885 |
"/ ]. |
|
4886 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
4887 |
"/ ^ self. |
|
4888 |
] |
|
4889 |
]. |
|
4890 |
usageCounts := tmpBits usageCounts. |
|
4891 |
tmpMap := Array new:usageCounts size. |
|
4892 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
4893 |
tmpMap at:i put:clr |
|
4894 |
]. |
|
4895 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
4896 |
||
4897 |
1 to:(1 bitShift:depth) do:[:idx | |
|
4898 |
newColorMap at:idx put:(tmpMap at:idx) |
|
4899 |
]. |
|
4900 |
||
4901 |
useNearest := Dialog |
|
4902 |
confirmWithCancel:(resources |
|
4903 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
4904 |
with:usedColors size |
|
4905 |
with:(1 bitShift:depth)) |
|
4906 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
4907 |
useNearest isNil ifTrue:[ |
|
1124 | 4908 |
colorMapMode value:prevMode. |
1935 | 4909 |
^ self "/ cancel |
4910 |
]. |
|
4911 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4912 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4913 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4914 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4915 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4916 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4917 |
(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
|
4918 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4919 |
confirmWithCancel:(resources |
1916 | 4920 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
4921 |
) |
|
1542 | 4922 |
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
|
4923 |
useNearest isNil ifTrue:[ |
1542 | 4924 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4925 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4926 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4927 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4928 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4929 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4930 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4931 |
|
2260 | 4932 |
newImage := Image newForDepth:depth. |
1424
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
4933 |
newImage depth:depth. |
2260 | 4934 |
newImage photometric:oldImage photometric. |
4935 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4936 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4937 |
|
1008 | 4938 |
Image imageErrorSignal handle:[:ex| |
4939 |
Color colorErrorSignal handle:[:ex| |
|
1542 | 4940 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4941 |
imageEditView undo. |
1008 | 4942 |
^ self warn:(resources string:'Conversion failed !!') |
4943 |
] do:[ |
|
1393 | 4944 |
newImage := Image newForDepth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4945 |
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
|
4946 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4947 |
newImage photometric:#palette. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4948 |
newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)). |
2260 | 4949 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4950 |
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
|
4951 |
[:x :y :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4952 |
|newColor| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4953 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4954 |
(newColorMap includes:clr) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4955 |
ifTrue: [newColor := clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4956 |
ifFalse: [ |
1008 | 4957 |
newColor := clr nearestIn:newColorMap. |
4958 |
useNearest ifFalse:[ |
|
4959 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
4960 |
newColor := oldImage colorFromValue:0 |
|
4961 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4962 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4963 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4964 |
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
|
4965 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4966 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4967 |
]. |
1008 | 4968 |
] do:[ |
2260 | 4969 |
image := newImage fromImage:oldImage. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4970 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4971 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4972 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 4973 |
image mask isNil ifTrue:[ |
1949 | 4974 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 4975 |
maskThreshold := 0.1. |
4976 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
4977 |
] ifFalse:[ |
|
4978 |
maskImage := Depth1Image extent:image extent. |
|
1770 | 4979 |
maskImage bits:(ByteArray |
1008 | 4980 |
new:(maskImage bytesPerRow * maskImage height) |
4981 |
withAll:16rFF). |
|
4982 |
||
4983 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
4984 |
]. |
|
4985 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4986 |
]. |
1008 | 4987 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4988 |
image mask: nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4989 |
]. |
1935 | 4990 |
|
1937 | 4991 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4992 |
realColorMap := OrderedCollection new. |
4993 |
image realColorMap do:[:clr| |
|
4994 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
4995 |
]. |
|
4996 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
4997 |
newColorMap do:[:clr| |
|
4998 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
4999 |
ifTrue:[ |
|
5000 |
newColors add: clr |
|
5001 |
] |
|
5002 |
]. |
|
5003 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5004 |
]. |
1446 | 5005 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5006 |
|
1054 | 5007 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 5008 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5009 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5010 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5011 |
|
2174 | 5012 |
"Modified: / 20-07-2007 / 09:18:59 / cg" |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5013 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5014 |
|
2192 | 5015 |
colorize |
5016 |
"interactive Hue editing" |
|
5017 |
||
5018 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
5019 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
5020 |
originalPixels p| |
|
5021 |
||
5022 |
"/ compute the averageColor in the background (while asking user) |
|
5023 |
readySema := Semaphore new. |
|
5024 |
[ |
|
5025 |
|image| |
|
5026 |
||
5027 |
image := imageEditView image. |
|
5028 |
originalColormap := image colorMap copy. |
|
5029 |
avgColor := image averageColor. |
|
5030 |
originalPixels := image bits. |
|
5031 |
readySema signal. |
|
5032 |
] forkAt:7. |
|
5033 |
||
5034 |
acceptChannel := TriggerValue new. |
|
5035 |
avgColorHolder := avgColor asValue. |
|
5036 |
||
5037 |
firstChange := true. |
|
5038 |
||
5039 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
5040 |
Color |
|
5041 |
hue:((clr hue) ? 0 + hShift) |
|
5042 |
light:((clr light * lFactor / 100) "min:100") |
|
5043 |
saturation:(((clr saturation max:20) * sFactor / 100) "min:100")]. |
|
5044 |
||
5045 |
||
5046 |
shiftAction := |
|
5047 |
[ |
|
5048 |
|hShift lFactor sFactor| |
|
5049 |
||
5050 |
acceptChannel value:true. |
|
5051 |
||
5052 |
firstChange ifTrue:[ |
|
5053 |
imageEditView makeUndo. |
|
5054 |
firstChange := false. |
|
5055 |
]. |
|
5056 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5057 |
||
5058 |
hShift := hueShift value. |
|
5059 |
lFactor := lightValue value. |
|
5060 |
sFactor := saturationValue value. |
|
5061 |
||
5062 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5063 |
||
5064 |
shiftProcess notNil ifTrue:[ |
|
5065 |
shiftProcess terminate. |
|
5066 |
shiftProcess waitUntilTerminated. |
|
5067 |
shiftProcess := nil. |
|
5068 |
]. |
|
5069 |
shiftProcess := |
|
5070 |
[ |
|
5071 |
[ |
|
5072 |
imageEditView image |
|
5073 |
colorMap:originalColormap copy; |
|
5074 |
bits:originalPixels copy; |
|
5075 |
release; |
|
5076 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5077 |
self updateImage. |
|
5078 |
self updateInfoLabel. |
|
5079 |
self updateImagePreView. |
|
5080 |
] ensure:[ shiftProcess := nil ]. |
|
5081 |
] forkAt:7. |
|
5082 |
]. |
|
5083 |
||
5084 |
bindings := IdentityDictionary new. |
|
5085 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5086 |
hueShift onChangeEvaluate:shiftAction. |
|
5087 |
||
5088 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5089 |
lightValue onChangeEvaluate:shiftAction. |
|
5090 |
||
5091 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5092 |
saturationValue onChangeEvaluate:shiftAction. |
|
5093 |
||
5094 |
bindings at:#acceptChannel put:acceptChannel. |
|
5095 |
bindings at:#hlsColor put:avgColorHolder. |
|
5096 |
||
5097 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5098 |
ifFalse:[ |
|
5099 |
firstChange ~~ true ifTrue:[ |
|
5100 |
imageEditView undo |
|
5101 |
] |
|
5102 |
]. |
|
5103 |
||
5104 |
(p := shiftProcess) notNil ifTrue:[ |
|
5105 |
p waitUntilTerminated. |
|
5106 |
]. |
|
5107 |
self updateImage. |
|
5108 |
self updateImagePreView. |
|
5109 |
||
5110 |
"Created: / 01-11-2007 / 23:27:37 / cg" |
|
5111 |
! |
|
5112 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5113 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5114 |
"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
|
5115 |
|
2893 | 5116 |
|newImage| |
5117 |
||
5118 |
newImage := self image. |
|
5119 |
newImage compressColorMap. |
|
2652 | 5120 |
|
5121 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5122 |
self fetchImageData. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5123 |
] |
1008 | 5124 |
! |
5125 |
||
1852 | 5126 |
copyColorFromColormap |
1871 | 5127 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 5128 |
! |
5129 |
||
2054 | 5130 |
ditherToDepth |
5131 |
|depth| |
|
5132 |
||
5133 |
depth := Dialog request:'New depth ?'. |
|
5134 |
depth isEmptyOrNil ifTrue:[^ self]. |
|
5135 |
depth := Number readFrom:depth onError:nil. |
|
5136 |
depth isNil ifTrue:[^ self]. |
|
5137 |
||
5138 |
self ditherToDepth:depth |
|
5139 |
||
5140 |
"Created: / 07-07-2006 / 13:22:10 / cg" |
|
5141 |
! |
|
5142 |
||
5143 |
ditherToDepth:depth |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5144 |
|ditherColors newImage useStandardColors nGrey greyColorsAlready additionalGreyColors moreColors d| |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5145 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5146 |
useStandardColors := true. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5147 |
"/ useStandardColors := Dialog confirmWithCancel:'Dither in standard colors or use a new (optimized) colormap ?'. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5148 |
"/ useStandardColors isNil ifTrue:[^ self]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5149 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5150 |
useStandardColors ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5151 |
depth = 1 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5152 |
ditherColors := Array with:(Color black) with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5153 |
] ifFalse:[ depth = 2 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5154 |
ditherColors := Array |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5155 |
with:(Color black) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5156 |
with:(Color darkGrey) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5157 |
with:(Color lightGrey) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5158 |
with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5159 |
] ifFalse:[ depth = 3 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5160 |
ditherColors := Color colorCubeWithRed:2 green:2 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5161 |
] ifFalse:[ depth = 4 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5162 |
ditherColors := Color vgaColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5163 |
] ifFalse:[ depth = 5 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5164 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5165 |
] ifFalse:[ depth = 6 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5166 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:3. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5167 |
] ifFalse:[ depth <= 8 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5168 |
ditherColors := Color colorCubeWithRed:6 green:6 blue:5. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5169 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5170 |
self error:'unsupported depth'. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5171 |
]]]]]]]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5172 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5173 |
nGrey := (2 raisedTo:depth) - ditherColors size. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5174 |
nGrey > 0 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5175 |
nGrey := nGrey min:128. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5176 |
greyColorsAlready := ditherColors select:[:clr | clr isGreyColor]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5177 |
d := 1 / nGrey. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5178 |
moreColors := (1 to:nGrey-1) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5179 |
collect:[:i | Color brightness:(d * i)] |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5180 |
thenReject:[:clr | greyColorsAlready includes:clr ]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5181 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5182 |
ditherColors := ditherColors , moreColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5183 |
]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5184 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5185 |
self halt. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5186 |
]. |
2054 | 5187 |
|
5188 |
self withExecuteCursorDo:[ |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5189 |
"/ newImage := self image asDitheredImageUsing:ditherColors depth:depth. |
2054 | 5190 |
newImage := self image asDitheredImageUsing:ditherColors depth:8. |
5191 |
||
5192 |
imageEditView makeUndo. |
|
5193 |
imageEditView image:newImage. |
|
5194 |
imageEditView setModified. |
|
5195 |
self updateImage. |
|
5196 |
self updateImagePreView. |
|
5197 |
||
5198 |
self fetchImageData. |
|
5199 |
]. |
|
5200 |
||
5201 |
"Created: / 07-07-2006 / 13:20:56 / cg" |
|
2073 | 5202 |
"Modified: / 05-09-2006 / 16:13:25 / cg" |
2054 | 5203 |
! |
5204 |
||
2174 | 5205 |
doubleClickOnColor:aColorIndex |
5206 |
self editSelectedColor. |
|
5207 |
||
5208 |
"Created: / 22-07-2007 / 13:14:37 / cg" |
|
5209 |
! |
|
5210 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5211 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5212 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5213 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5214 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5215 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5216 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5217 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5218 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5219 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5220 |
]. |
2575
43e98f6d71d2
ColorEditDialog was grazy - adapted to changed protocol
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5221 |
editor colorNameOrColor |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5222 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5223 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5224 |
|
1446 | 5225 |
fetchImageData |
1460 | 5226 |
|image| |
5227 |
||
5228 |
(image := imageEditView image) notNil ifTrue:[ |
|
5229 |
self findColorMapMode. |
|
5230 |
self updateLabelsAndHistory. |
|
5231 |
] |
|
1446 | 5232 |
! |
5233 |
||
1544 | 5234 |
inspectColor |
2573 | 5235 |
|clrIndex clr| |
5236 |
||
5237 |
self hasColormap ifFalse:[ |
|
5238 |
clr := self selectedColorOrNil |
|
5239 |
] ifTrue:[ |
|
5240 |
clrIndex := self selectedColorIndexOrNil. |
|
5241 |
clrIndex isNil ifTrue:[ |
|
5242 |
^ self |
|
5243 |
]. |
|
5244 |
clr := self image colorFromValue:clrIndex-1 |
|
1544 | 5245 |
]. |
2573 | 5246 |
clr inspect |
1544 | 5247 |
! |
5248 |
||
2651 | 5249 |
inspectColormap |
5250 |
self hasColormap ifTrue:[ |
|
5251 |
self image colorMap inspect |
|
5252 |
]. |
|
5253 |
! |
|
5254 |
||
1598 | 5255 |
makeBrighter |
5256 |
| anyChange| |
|
5257 |
||
5258 |
self withExecuteCursorDo:[ |
|
5259 |
anyChange := imageEditView makeBrighter. |
|
5260 |
anyChange ifFalse:[ |
|
5261 |
Dialog warn:'Image unchanged'. |
|
5262 |
] ifTrue:[ |
|
5263 |
self updateImage. |
|
5264 |
] |
|
5265 |
]. |
|
5266 |
! |
|
5267 |
||
5268 |
makeDarker |
|
5269 |
| anyChange| |
|
5270 |
||
5271 |
self withExecuteCursorDo:[ |
|
5272 |
anyChange := imageEditView makeDarker. |
|
5273 |
anyChange ifFalse:[ |
|
5274 |
Dialog warn:'Image unchanged'. |
|
5275 |
] ifTrue:[ |
|
5276 |
self updateImage. |
|
5277 |
] |
|
5278 |
]. |
|
5279 |
! |
|
5280 |
||
1926 | 5281 |
makeGrayScaleImage |
1598 | 5282 |
|anyChange| |
1436 | 5283 |
|
5284 |
self withExecuteCursorDo:[ |
|
1926 | 5285 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 5286 |
anyChange ifFalse:[ |
5287 |
Dialog warn:'Image unchanged'. |
|
5288 |
] ifTrue:[ |
|
1598 | 5289 |
self updateImage. |
5290 |
] |
|
5291 |
]. |
|
5292 |
! |
|
5293 |
||
5294 |
makeInverse |
|
5295 |
| anyChange| |
|
5296 |
||
5297 |
self withExecuteCursorDo:[ |
|
5298 |
anyChange := imageEditView makeInverse. |
|
5299 |
anyChange ifFalse:[ |
|
5300 |
Dialog warn:'Image unchanged'. |
|
5301 |
] ifTrue:[ |
|
5302 |
self updateImage. |
|
1436 | 5303 |
] |
5304 |
]. |
|
5305 |
! |
|
5306 |
||
1446 | 5307 |
makeSelectedColorBrighter |
1682 | 5308 |
self processSelectedColorWith:[:clr | clr lightened] |
1446 | 5309 |
! |
5310 |
||
5311 |
makeSelectedColorDarker |
|
1682 | 5312 |
self processSelectedColorWith:[:clr | clr darkened] |
1446 | 5313 |
! |
5314 |
||
1884 | 5315 |
makeSelectedColorGray |
5316 |
self processSelectedColorWith:[:clr | Color brightness:(clr brightness)] |
|
5317 |
! |
|
5318 |
||
2826 | 5319 |
makeSlightlyBrighter |
5320 |
| anyChange| |
|
5321 |
||
5322 |
self withExecuteCursorDo:[ |
|
5323 |
anyChange := imageEditView makeSlightlyBrighter. |
|
5324 |
anyChange ifFalse:[ |
|
5325 |
Dialog warn:'Image unchanged'. |
|
5326 |
] ifTrue:[ |
|
5327 |
self updateImage. |
|
5328 |
] |
|
5329 |
]. |
|
5330 |
||
5331 |
"Created: / 24-11-2010 / 11:06:11 / cg" |
|
5332 |
! |
|
5333 |
||
5334 |
makeSlightlyDarker |
|
5335 |
| anyChange| |
|
5336 |
||
5337 |
self withExecuteCursorDo:[ |
|
5338 |
anyChange := imageEditView makeSlightlyDarker. |
|
5339 |
anyChange ifFalse:[ |
|
5340 |
Dialog warn:'Image unchanged'. |
|
5341 |
] ifTrue:[ |
|
5342 |
self updateImage. |
|
5343 |
] |
|
5344 |
]. |
|
5345 |
||
5346 |
"Created: / 24-11-2010 / 11:06:23 / cg" |
|
5347 |
! |
|
5348 |
||
2652 | 5349 |
menu_clearColormapEntry0AndMaskedPixels |
5350 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5351 |
0 and then clear all masked pixels (to pixelValue 0)" |
|
5352 |
||
5353 |
imageEditView makeUndo. |
|
5354 |
self withExecuteCursorDo:[ |
|
5355 |
self clearColormapEntry0AndMaskedPixels |
|
5356 |
] |
|
5357 |
! |
|
5358 |
||
5359 |
menu_clearMaskedPixels |
|
5360 |
"clear all masked pixels (to pixelValue 0)" |
|
5361 |
||
5362 |
imageEditView makeUndo. |
|
5363 |
||
5364 |
self withExecuteCursorDo:[ |
|
5365 |
self clearMaskedPixels |
|
5366 |
] |
|
5367 |
! |
|
5368 |
||
5369 |
menu_compressColorMap |
|
5370 |
"calculates a new color map for the image, using only used colors" |
|
5371 |
||
2893 | 5372 |
|depth oldImage usedColors colorMap| |
2652 | 5373 |
|
5374 |
oldImage := self image. |
|
5375 |
||
5376 |
oldImage photometric ~~ #palette ifTrue:[ |
|
5377 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
1852 | 5378 |
^ self |
5379 |
]. |
|
2893 | 5380 |
depth := oldImage depth. |
5381 |
colorMap := oldImage colorMap asArray asSet. |
|
2652 | 5382 |
usedColors := oldImage realUsedColors. |
2893 | 5383 |
usedColors size == colorMap size ifTrue:[ |
2652 | 5384 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
5385 |
^ self |
|
5386 |
]. |
|
5387 |
||
5388 |
imageEditView makeUndo. |
|
5389 |
||
5390 |
self withExecuteCursorDo:[ |
|
5391 |
self compressColorMap |
|
1852 | 5392 |
] |
5393 |
! |
|
5394 |
||
2652 | 5395 |
menu_copyMask |
5396 |
|mask| |
|
5397 |
||
5398 |
mask := self image mask. |
|
5399 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
5400 |
! |
|
5401 |
||
5402 |
menu_pasteMask |
|
1480 | 5403 |
|img mask| |
5404 |
||
5405 |
imageEditView makeUndo. |
|
5406 |
||
5407 |
img := self image. |
|
5408 |
mask := img mask. |
|
5409 |
||
5410 |
mask |
|
5411 |
copyFrom:MaskClipboard |
|
5412 |
x:0 y:0 |
|
5413 |
toX:0 y:0 |
|
5414 |
width:(mask width min:MaskClipboard width) |
|
5415 |
height:(mask height min:MaskClipboard height). |
|
5416 |
img mask:mask. |
|
5417 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
5418 |
self fetchImageData. |
|
5419 |
] |
|
5420 |
! |
|
5421 |
||
2652 | 5422 |
menu_sortColorMap |
5423 |
"calculates a new color map for the image, sorting colors" |
|
5424 |
||
5425 |
self menu_sortColorMapWith:self sortBlockForColors |
|
5426 |
! |
|
5427 |
||
5428 |
menu_sortColorMapWith:sortBlock |
|
5429 |
"calculates a new color map for the image, sorting colors" |
|
5430 |
||
5431 |
self image photometric ~~ #palette ifTrue:[ |
|
5432 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
5433 |
^ self |
|
5434 |
]. |
|
5435 |
||
5436 |
imageEditView makeUndo. |
|
5437 |
||
5438 |
self withExecuteCursorDo:[ |
|
5439 |
self sortColorMapWith:sortBlock |
|
5440 |
] |
|
5441 |
||
5442 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5443 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
5444 |
! |
|
5445 |
||
5446 |
pasteColorIntoColormap |
|
5447 |
|copyBufferColor| |
|
5448 |
||
5449 |
copyBufferColor := imageEditView getClipboardObject. |
|
5450 |
copyBufferColor isColor ifFalse:[ |
|
5451 |
UserPreferences current beepInEditor ifTrue:[ |
|
5452 |
self window beep. |
|
5453 |
]. |
|
5454 |
^ self |
|
5455 |
]. |
|
5456 |
||
5457 |
self processSelectedColorWith:[:clr | |
|
5458 |
copyBufferColor |
|
5459 |
] |
|
5460 |
! |
|
5461 |
||
1682 | 5462 |
pickAndAddColorToColormap |
5463 |
self addColorToColormap:(Color fromUser) |
|
5464 |
! |
|
5465 |
||
1933 | 5466 |
pickAndPasteColor |
5467 |
self pickColor. |
|
5468 |
self pasteColorIntoColormap. |
|
5469 |
! |
|
5470 |
||
1852 | 5471 |
pickColor |
1871 | 5472 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 5473 |
! |
5474 |
||
1682 | 5475 |
processSelectedColorWith:aBlock |
1852 | 5476 |
"undoable color processing: the selected color will be replaced by the |
5477 |
value of aBlock" |
|
5478 |
||
5479 |
|img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor| |
|
1682 | 5480 |
|
5481 |
selectedColorIndex := self selectedColorIndexOrNil. |
|
5482 |
selectedColorIndex isNil ifTrue:[^ self]. |
|
5483 |
||
5484 |
img := self image. |
|
5485 |
cMap := img colorMap. |
|
5486 |
cMap isNil ifTrue:[ |
|
1916 | 5487 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 5488 |
^ self |
5489 |
]. |
|
1852 | 5490 |
|
5491 |
oldColor := cMap at:selectedColorIndex. |
|
1682 | 5492 |
imageEditView makeUndo. |
5493 |
||
2992 | 5494 |
modifiedColormap := cMap asNewArray. |
1852 | 5495 |
|
5496 |
newColor := aBlock value:oldColor. |
|
1859 | 5497 |
modifiedColormap at:selectedColorIndex put:newColor. |
1682 | 5498 |
|
5499 |
newImage := img species new |
|
5500 |
width:img width |
|
5501 |
height:img height |
|
1843 | 5502 |
depth:img depth |
1682 | 5503 |
fromArray:img bits. |
5504 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5505 |
newImage colorMap:modifiedColormap. |
1682 | 5506 |
newImage fileName:img fileName. |
5507 |
newImage mask:(img mask copy). |
|
5508 |
||
5509 |
oldSelection := self selectionOfColor value. |
|
5510 |
||
5511 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5512 |
self fetchImageData. |
|
5513 |
]. |
|
5514 |
self selectionOfColor value:oldSelection. |
|
5515 |
||
5516 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
|
5517 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
|
5518 |
! |
|
5519 |
||
1124 | 5520 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5521 |
|s n anyChange img usedColors| |
1124 | 5522 |
|
2817 | 5523 |
s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
1435 | 5524 |
s size == 0 ifTrue:[^ self]. |
1934 | 5525 |
|
1124 | 5526 |
n := Integer readFrom:s onError:0. |
5527 |
(n between:1 and:7) ifFalse:[ |
|
5528 |
Dialog warn:'Image unchanged'. |
|
5529 |
^ self |
|
5530 |
]. |
|
5531 |
||
5532 |
self withExecuteCursorDo:[ |
|
5533 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
5534 |
anyChange ifFalse:[ |
|
5535 |
Dialog warn:'Image unchanged'. |
|
5536 |
] ifTrue:[ |
|
5537 |
img := imageEditView image. |
|
5538 |
imageEditView image:img. |
|
1446 | 5539 |
|
5540 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5541 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5542 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5543 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5544 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5545 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5546 |
] |
1124 | 5547 |
] |
5548 |
]. |
|
2817 | 5549 |
|
5550 |
"Modified: / 29-10-2010 / 18:08:01 / cg" |
|
1124 | 5551 |
! |
5552 |
||
1930 | 5553 |
reduceNumberOfColors2 |
1938 | 5554 |
|s rndR rndG rndB usedColors image newImage| |
5555 |
||
5556 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 5557 |
s size == 0 ifTrue:[^ self]. |
1938 | 5558 |
rndR := Integer readFrom:s onError:0. |
1939 | 5559 |
|
1938 | 5560 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
5561 |
s size == 0 ifTrue:[^ self]. |
|
5562 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 5563 |
|
1938 | 5564 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
5565 |
s size == 0 ifTrue:[^ self]. |
|
5566 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 5567 |
|
5568 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 5569 |
Dialog warn:'Image unchanged'. |
5570 |
^ self |
|
5571 |
]. |
|
5572 |
||
5573 |
self withExecuteCursorDo:[ |
|
1934 | 5574 |
image := self image. |
2054 | 5575 |
"/ usedColors := image usedColorsMax:4096. |
1934 | 5576 |
imageEditView makeUndo. |
5577 |
||
5578 |
newImage := image copy. |
|
2260 | 5579 |
newImage photometric == #palette ifTrue:[ |
5580 |
newImage colorMap:(OrderedCollection new). |
|
5581 |
]. |
|
5582 |
||
1934 | 5583 |
image |
5584 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
5585 |
do:[:x :y :clr | |
|
5586 |
|r g b nr ng nb newClr| |
|
5587 |
||
5588 |
r := clr redByte. |
|
5589 |
g := clr greenByte. |
|
5590 |
b := clr blueByte. |
|
1938 | 5591 |
nr := (r roundTo:rndR) min:255. |
5592 |
ng := (g roundTo:rndG) min:255. |
|
5593 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 5594 |
|
5595 |
newClr := Color redByte:nr greenByte:ng blueByte:nb. |
|
2260 | 5596 |
newImage photometric == #palette ifTrue:[ |
5597 |
(newImage colorMap includes:newClr) ifFalse:[ |
|
5598 |
newImage colorMap add:newClr |
|
5599 |
]. |
|
5600 |
]. |
|
1934 | 5601 |
newImage colorAtX:x y:y put:newClr |
5602 |
]. |
|
5603 |
||
5604 |
imageEditView image:newImage. |
|
5605 |
imageEditView setModified. |
|
5606 |
self updateImage. |
|
5607 |
self updateImagePreView. |
|
5608 |
||
5609 |
self fetchImageData. |
|
5610 |
usedColors := newImage usedColorsMax:10000. |
|
5611 |
usedColors size == 10000 ifTrue:[ |
|
5612 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
5613 |
] ifFalse:[ |
|
5614 |
Dialog information:(usedColors size printString , ' colors used.') |
|
5615 |
] |
|
1930 | 5616 |
]. |
2054 | 5617 |
|
5618 |
"Modified: / 07-07-2006 / 13:10:42 / cg" |
|
1930 | 5619 |
! |
5620 |
||
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5621 |
selectColor:aColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5622 |
|idx img cMap| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5623 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5624 |
aColor isNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5625 |
idx := nil. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5626 |
] ifFalse:[ |
2791 | 5627 |
img := self image. |
5628 |
img notNil ifTrue: [ |
|
5629 |
aColor == Color noColor ifTrue:[ |
|
5630 |
(img mask notNil) ifTrue:[ |
|
5631 |
idx := 1. |
|
5632 |
] |
|
5633 |
] ifFalse:[ |
|
2447 | 5634 |
(cMap := self listOfColors) notNil ifTrue:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5635 |
idx := cMap indexOf:aColor ifAbsent:nil. |
2447 | 5636 |
]. |
5637 |
idx isNil ifTrue:[ |
|
5638 |
"/ should not happen... |
|
5639 |
(cMap := img colorMap) notNil ifTrue:[ |
|
5640 |
idx := cMap indexOf:aColor ifAbsent:nil. |
|
5641 |
idx notNil ifTrue:[ |
|
5642 |
img mask notNil ifTrue:[ |
|
5643 |
idx := idx + 1. |
|
5644 |
]. |
|
5645 |
] |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5646 |
]. |
2447 | 5647 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5648 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5649 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5650 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5651 |
self selectionOfColor value:idx. |
2790 | 5652 |
|
2791 | 5653 |
"Modified: / 02-07-2010 / 12:06:07 / cg" |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5654 |
! |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5655 |
|
1682 | 5656 |
selectedColorIndexOrNil |
2651 | 5657 |
|img clrIndex| |
1682 | 5658 |
|
5659 |
img := self image. |
|
5660 |
img isNil ifTrue:[ |
|
2764 | 5661 |
"/ self warn:'No Image.'. |
1682 | 5662 |
^ nil |
5663 |
]. |
|
5664 |
clrIndex := self selectionOfColor value. |
|
1896 | 5665 |
self hasMask "img mask notNil" ifTrue: [ |
2449
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5666 |
(clrIndex isInteger and:[clrIndex > 1]) ifTrue:[ |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5667 |
^ clrIndex - 1 |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5668 |
]. |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5669 |
^ nil |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5670 |
]. |
1682 | 5671 |
^ clrIndex |
5672 |
! |
|
5673 |
||
1852 | 5674 |
selectedColorOrNil |
2447 | 5675 |
|cmapIndex img cMap colorList| |
1896 | 5676 |
|
5677 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 5678 |
cmapIndex isNil ifTrue:[^ nil]. |
2556 | 5679 |
cmapIndex == 0 ifTrue:[^ nil]. |
1852 | 5680 |
|
5681 |
img := self image. |
|
5682 |
cMap := img colorMap. |
|
5683 |
cMap isNil ifTrue:[ |
|
2447 | 5684 |
"/ self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
5685 |
colorList := self listOfColors. |
|
5686 |
colorList notNil ifTrue:[ |
|
5687 |
^ colorList at:cmapIndex ifAbsent:nil |
|
5688 |
]. |
|
1900 | 5689 |
^ nil |
1852 | 5690 |
]. |
1896 | 5691 |
^ cMap at:cmapIndex. |
1852 | 5692 |
! |
5693 |
||
1008 | 5694 |
sortColorMap |
5695 |
"calculates a new color map for the image, sorting colors" |
|
5696 |
||
2652 | 5697 |
self sortColorMapWith:self sortBlockForColors |
1939 | 5698 |
! |
5699 |
||
5700 |
sortColorMapWith:sortBlock |
|
5701 |
"calculates a new color map for the image, sorting colors" |
|
5702 |
||
1008 | 5703 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
5704 |
||
5705 |
oldImage := self image. |
|
5706 |
depth := oldImage depth. |
|
5707 |
||
2652 | 5708 |
usedColors := oldImage realColorMap. |
5709 |
||
5710 |
||
5711 |
"/ translation table |
|
5712 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
5713 |
newColorMap := usedColors asArray. |
|
5714 |
newColorMap sort:sortBlock. |
|
5715 |
||
5716 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
5717 |
|newPixel| |
|
5718 |
||
5719 |
(usedColors includes:clr) ifTrue:[ |
|
5720 |
newPixel := newColorMap indexOf:clr. |
|
5721 |
oldToNew at:oldIdx put:newPixel-1. |
|
5722 |
] |
|
1008 | 5723 |
]. |
5724 |
||
2652 | 5725 |
oldBits := oldImage bits. |
5726 |
newBits := ByteArray new:(oldBits size). |
|
5727 |
depth ~~ 8 ifTrue:[ |
|
5728 |
"/ expand/compress can only handle 8bits |
|
5729 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5730 |
oldBits |
|
5731 |
expandPixels:depth |
|
5732 |
width:oldImage width |
|
5733 |
height:oldImage height |
|
5734 |
into:tmpBits |
|
5735 |
mapping:oldToNew. |
|
5736 |
tmpBits |
|
5737 |
compressPixels:depth |
|
5738 |
width:oldImage width |
|
5739 |
height:oldImage height |
|
5740 |
into:newBits |
|
5741 |
mapping:nil |
|
5742 |
] ifFalse:[ |
|
5743 |
oldBits |
|
5744 |
expandPixels:depth |
|
5745 |
width:oldImage width |
|
5746 |
height:oldImage height |
|
5747 |
into:newBits |
|
5748 |
mapping:oldToNew. |
|
5749 |
]. |
|
5750 |
||
5751 |
newImage := oldImage species new |
|
5752 |
width:oldImage width |
|
5753 |
height:oldImage height |
|
5754 |
depth:depth |
|
5755 |
fromArray:newBits. |
|
5756 |
||
5757 |
newImage colorMap:newColorMap. |
|
5758 |
newImage fileName:oldImage fileName. |
|
5759 |
newImage mask:(oldImage mask copy). |
|
5760 |
||
5761 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5762 |
self fetchImageData. |
|
1008 | 5763 |
] |
5764 |
||
5765 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5766 |
"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
|
5767 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5768 |
|
1715 | 5769 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 5770 |
|
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5771 |
do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5772 |
|box dx1 dx2 image| |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5773 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5774 |
image := imageEditView image. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5775 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5776 |
box := EnterBox new. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5777 |
box title:(resources string:'dX1 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5778 |
box okText:(resources string:'OK'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5779 |
box abortText:(resources string:'Cancel'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5780 |
box initialText:'0.1'. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5781 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5782 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5783 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5784 |
and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5785 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5786 |
box title:(resources string:'dX2 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5787 |
box initialText:(dx1 printString). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5788 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5789 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5790 |
and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5791 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5792 |
imageEditView threeDProjection:dx1 and:dx2. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5793 |
] |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5794 |
]. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5795 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5796 |
self updateInfoLabel |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5797 |
! |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5798 |
|
1882 | 5799 |
doBrightenImage |
5800 |
imageEditView brightenImage. |
|
5801 |
self listOfColors removeAll. |
|
5802 |
self findColorMapMode. |
|
2585 | 5803 |
"/ imageEditView removelastUndo |
1882 | 5804 |
! |
5805 |
||
767 | 5806 |
doBrowseClass |
5807 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 5808 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5809 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5810 |
|
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
5811 |
cls := imageEditView resourceClass. |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5812 |
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
|
5813 |
|
1488 | 5814 |
UserPreferences systemBrowserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5815 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5816 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5817 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5818 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 5819 |
! |
5820 |
||
1703 | 5821 |
doCopyImageToClipboard |
5822 |
imageEditView copyImageToClipboard. |
|
5823 |
! |
|
5824 |
||
1045 | 5825 |
doCropAll |
986 | 5826 |
"find all borders and cut them off" |
5827 |
||
1045 | 5828 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 5829 |
self updateInfoLabel |
5830 |
||
5831 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
5832 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
5833 |
! |
|
5834 |
||
1045 | 5835 |
doCropBottom |
986 | 5836 |
"find a bottom border and cut it off" |
5837 |
||
1045 | 5838 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 5839 |
self updateInfoLabel |
5840 |
||
5841 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
5842 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
5843 |
! |
|
5844 |
||
1045 | 5845 |
doCropLeft |
986 | 5846 |
"find a left border and cut it off" |
5847 |
||
1045 | 5848 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 5849 |
self updateInfoLabel |
5850 |
||
5851 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
5852 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
5853 |
! |
|
5854 |
||
1045 | 5855 |
doCropManual |
986 | 5856 |
"let user specify borders and cut them off" |
5857 |
||
1502 | 5858 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
5859 |
||
5860 |
acceptChannel := TriggerValue new. |
|
1490 | 5861 |
|
5862 |
firstChange := true. |
|
5863 |
||
1502 | 5864 |
gropAction := |
5865 |
[:lV :rV :tV :bV | |l r t b| |
|
5866 |
acceptChannel value:true. |
|
5867 |
||
5868 |
l := lV value. |
|
5869 |
r := rV value. |
|
5870 |
t := tV value. |
|
5871 |
b := bV value. |
|
5872 |
(l + r + t + b) == 0 ifTrue:[ |
|
2520 | 5873 |
UserPreferences current beepInEditor ifTrue:[ |
5874 |
self window beep |
|
5875 |
] |
|
1502 | 5876 |
] ifFalse:[ |
5877 |
img := imageEditView image. |
|
5878 |
firstChange ifTrue:[ |
|
5879 |
imageEditView makeUndo. |
|
5880 |
firstChange := false. |
|
5881 |
]. |
|
5882 |
imageEditView |
|
5883 |
makeSubImageX:l y:t |
|
5884 |
width:(img width - l - r) |
|
5885 |
height:(img height - t - b). |
|
2546 | 5886 |
|
5887 |
self updateImagePreView. |
|
1502 | 5888 |
self updateInfoLabel |
5889 |
]. |
|
1490 | 5890 |
]. |
986 | 5891 |
|
5892 |
bindings := IdentityDictionary new. |
|
1507 | 5893 |
bindings at:#left put:(left := 1 asValue). |
5894 |
bindings at:#right put:(right := 1 asValue). |
|
5895 |
bindings at:#top put:(top := 1 asValue). |
|
5896 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 5897 |
bindings at:#acceptChannel put:acceptChannel. |
5898 |
||
5899 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
5900 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
5901 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
5902 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
5903 |
||
5904 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 5905 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
5906 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 5907 |
ifFalse:[ |
5908 |
firstChange ~~ true ifTrue:[ |
|
1558 | 5909 |
imageEditView undo. |
5910 |
self updateImagePreView. |
|
1507 | 5911 |
] |
5912 |
]. |
|
986 | 5913 |
|
5914 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
5915 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
5916 |
! |
|
5917 |
||
1045 | 5918 |
doCropRight |
986 | 5919 |
"find a right border and cut it off" |
5920 |
||
1045 | 5921 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 5922 |
self updateInfoLabel |
5923 |
||
5924 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
5925 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
5926 |
! |
|
5927 |
||
1045 | 5928 |
doCropTop |
986 | 5929 |
"find a top border and cut it off" |
5930 |
||
1045 | 5931 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 5932 |
self updateInfoLabel |
5933 |
||
5934 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
5935 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
5936 |
! |
|
5937 |
||
1882 | 5938 |
doDarkenImage |
5939 |
imageEditView darkenImage. |
|
5940 |
self listOfColors removeAll. |
|
5941 |
self findColorMapMode. |
|
2585 | 5942 |
"/ imageEditView removelastUndo |
1882 | 5943 |
! |
5944 |
||
1433 | 5945 |
doEditMask |
5946 |
self image mask edit |
|
5947 |
! |
|
5948 |
||
767 | 5949 |
doFlipHorizontal |
5950 |
"flips horizontally current image" |
|
400 | 5951 |
|
911 | 5952 |
imageEditView flipHorizontal |
400 | 5953 |
! |
5954 |
||
767 | 5955 |
doFlipVertical |
5956 |
"flips vertically current image" |
|
400 | 5957 |
|
911 | 5958 |
imageEditView flipVertical |
400 | 5959 |
! |
5960 |
||
2196 | 5961 |
doInsertTextFromUser |
5962 |
|text tempForm tempImage maskImage font w h| |
|
5963 |
||
2424 | 5964 |
text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'. |
5965 |
text isEmptyOrNil ifTrue:[^ self ]. |
|
2196 | 5966 |
|
5967 |
font := Font family:'arial' size:20. |
|
5968 |
font := font onDevice:Screen current. |
|
5969 |
w := font widthOf:text. |
|
5970 |
h := font heightOf:text. |
|
5971 |
||
5972 |
tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current). |
|
5973 |
tempForm clear. |
|
5974 |
tempForm font:font. |
|
5975 |
tempForm paint:(Color colorId:1). |
|
5976 |
tempForm displayString:text at:(0@font ascent). |
|
5977 |
||
5978 |
tempImage := tempForm asImage. |
|
5979 |
maskImage := tempForm asImage. |
|
5980 |
tempImage |
|
5981 |
photometric:#palette; |
|
5982 |
colorMap:(Array with:Color white with:imageEditView selectedColor); |
|
5983 |
mask:maskImage. |
|
5984 |
||
5985 |
ImageEditView copyImageToClipboard:tempImage. |
|
5986 |
self editMode value:#paste. |
|
5987 |
||
5988 |
"Modified: / 11-11-2007 / 12:32:55 / cg" |
|
5989 |
! |
|
5990 |
||
1896 | 5991 |
doInspectImage |
5992 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
5993 |
||
5994 |
self image inspect |
|
5995 |
! |
|
5996 |
||
767 | 5997 |
doMagnifyDown |
1987 | 5998 |
"magnifies the current image one step down" |
400 | 5999 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6000 |
|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
|
6001 |
|
1987 | 6002 |
magHolder := self magnificationHolder. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6003 |
(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
|
6004 |
magHolder value: mag - 1 |
400 | 6005 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6006 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6007 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 6008 |
! |
6009 |
||
767 | 6010 |
doMagnifyImage |
1479 | 6011 |
"magnifies the current image to a new size" |
400 | 6012 |
|
1353 | 6013 |
|box newSize image| |
6014 |
||
6015 |
image := imageEditView image. |
|
6016 |
||
6017 |
box := EnterBox new. |
|
6018 |
box title:(resources string:'Images new size:'). |
|
6019 |
box okText:(resources string:'OK'). |
|
6020 |
box abortText:(resources string:'Cancel'). |
|
6021 |
box initialText:image extent printString. |
|
6022 |
box showAtPointer. |
|
6023 |
(box accepted |
|
1960 | 6024 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6025 |
ifTrue:[ |
1479 | 6026 |
newSize isPoint ifFalse:[ |
6027 |
self warn:'please enter the new size as ''x @ y''.'. |
|
6028 |
^ self. |
|
6029 |
]. |
|
6030 |
imageEditView magnifyImageTo:newSize. |
|
6031 |
]. |
|
6032 |
||
6033 |
self updateInfoLabel |
|
6034 |
! |
|
6035 |
||
6036 |
doMagnifyImageBy |
|
6037 |
"magnifies the current image (by a scale)" |
|
6038 |
||
2260 | 6039 |
|box oldSize newSize scaleString scale image| |
1479 | 6040 |
|
6041 |
image := imageEditView image. |
|
6042 |
oldSize := image extent. |
|
6043 |
||
2260 | 6044 |
scaleString := Dialog |
6045 |
request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') |
|
6046 |
initialAnswer:'1' |
|
6047 |
list:#('0.25' '0.5' '2' '4'). |
|
6048 |
||
6049 |
"/ box := EnterBox new. |
|
6050 |
"/ box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
6051 |
"/ box okText:(resources string:'OK'). |
|
6052 |
"/ box abortText:(resources string:'Cancel'). |
|
6053 |
"/ box initialText:1 printString. |
|
6054 |
"/ box showAtPointer. |
|
6055 |
"/ box accepted ifTrue:[ |
|
6056 |
"/ scaleString := box contents. |
|
6057 |
"/ ]. |
|
6058 |
||
6059 |
scale := Object readFromString:scaleString onError:nil. |
|
6060 |
||
6061 |
scale notNil ifTrue:[ |
|
1479 | 6062 |
scale isNumber ifFalse:[ |
6063 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
6064 |
^ self. |
|
6065 |
]. |
|
6066 |
newSize := oldSize * scale. |
|
1353 | 6067 |
imageEditView magnifyImageTo:newSize. |
6068 |
]. |
|
6069 |
||
400 | 6070 |
self updateInfoLabel |
6071 |
! |
|
6072 |
||
767 | 6073 |
doMagnifyUp |
1987 | 6074 |
"magnifies the current image one step up" |
400 | 6075 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6076 |
|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
|
6077 |
|
1987 | 6078 |
magHolder := self magnificationHolder. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6079 |
(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
|
6080 |
magHolder value: mag + 1 |
400 | 6081 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6082 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6083 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 6084 |
! |
6085 |
||
767 | 6086 |
doNegativeImage |
6087 |
"negates current image by negating the color map" |
|
400 | 6088 |
|
1598 | 6089 |
self image depth ~~ 1 ifTrue:[ |
6090 |
Dialog warn:'Only useful for depth 1 images'. |
|
6091 |
^ self |
|
6092 |
]. |
|
911 | 6093 |
imageEditView negativeImage. |
400 | 6094 |
self listOfColors removeAll. |
901 | 6095 |
self findColorMapMode. |
2585 | 6096 |
"/ imageEditView removelastUndo |
400 | 6097 |
! |
6098 |
||
767 | 6099 |
doResizeImage |
1353 | 6100 |
"resizes the current image" |
6101 |
||
6102 |
|box newSize image| |
|
6103 |
||
6104 |
image := imageEditView image. |
|
6105 |
||
6106 |
box := EnterBox new. |
|
6107 |
box title:(resources string:'Images new size:'). |
|
6108 |
box okText:(resources string:'OK'). |
|
6109 |
box abortText:(resources string:'Cancel'). |
|
6110 |
box initialText:image extent printString. |
|
6111 |
box showAtPointer. |
|
6112 |
(box accepted |
|
1960 | 6113 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6114 |
ifTrue:[ |
6115 |
imageEditView resizeImageTo:newSize. |
|
6116 |
]. |
|
400 | 6117 |
! |
6118 |
||
767 | 6119 |
doRotateImage |
6120 |
"rotates current image" |
|
400 | 6121 |
|
2884 | 6122 |
|rotationString box rotation| |
6123 |
||
6124 |
rotationString := Dialog |
|
6125 |
request:(resources string:'Rotate by (degrees, clockwise):') |
|
6126 |
list:#( '-90' '90' '180' '45' '-45' '135' '-135' ) |
|
6127 |
initialAnswer:90. |
|
6128 |
rotationString isEmptyOrNil ifTrue:[^ self]. "/ cancelled |
|
6129 |
rotation := Number readFrom:rotationString onError:[nil]. |
|
6130 |
rotation isNil ifTrue:[^ self]. |
|
6131 |
||
6132 |
"/ box := EnterBox new. |
|
6133 |
"/ box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
6134 |
"/ box okText:(resources string:'OK'). |
|
6135 |
"/ box abortText:(resources string:'Cancel'). |
|
6136 |
"/ box initialText: '0'. |
|
6137 |
"/ box showAtPointer. |
|
6138 |
"/ (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
|
6139 |
"/ ifFalse:[ ^ self ]. |
|
6140 |
||
6141 |
imageEditView rotateImageBy:rotation. |
|
6142 |
self updateInfoLabel. |
|
6143 |
||
6144 |
"Modified: / 18-03-2012 / 14:41:14 / cg" |
|
400 | 6145 |
! |
6146 |
||
1557 | 6147 |
doShiftManual |
6148 |
"let user specify amount and shift" |
|
6149 |
||
1713 | 6150 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 6151 |
|
6152 |
acceptChannel := TriggerValue new. |
|
1960 | 6153 |
wrapHolder := (lastShiftUsedWrap ? true) asValue. |
1557 | 6154 |
|
6155 |
firstChange := true. |
|
6156 |
||
6157 |
shiftAction := |
|
6158 |
[:shiftH :shiftV | |
|
6159 |
acceptChannel value:true. |
|
6160 |
||
6161 |
img := imageEditView image. |
|
6162 |
firstChange ifTrue:[ |
|
6163 |
imageEditView makeUndo. |
|
6164 |
firstChange := false. |
|
6165 |
]. |
|
1713 | 6166 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 6167 |
self updateInfoLabel |
6168 |
]. |
|
6169 |
||
6170 |
bindings := IdentityDictionary new. |
|
6171 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 6172 |
bindings at:#wrap put:wrapHolder. |
1557 | 6173 |
bindings at:#acceptChannel put:acceptChannel. |
6174 |
||
6175 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
6176 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
6177 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
6178 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
6179 |
||
6180 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
6181 |
ifFalse:[ |
|
6182 |
firstChange ~~ true ifTrue:[ |
|
6183 |
imageEditView undo |
|
6184 |
] |
|
6185 |
]. |
|
1960 | 6186 |
lastShiftUsedWrap := wrapHolder value. |
1557 | 6187 |
|
6188 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6189 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6190 |
! |
|
6191 |
||
1480 | 6192 |
doUnCropManual |
6193 |
"let user specify borders and add them" |
|
6194 |
||
6195 |
|bindings left top right bottom img| |
|
6196 |
||
6197 |
bindings := IdentityDictionary new. |
|
1704 | 6198 |
bindings at:#left put:(left := 1 asValue). |
6199 |
bindings at:#right put:(right := 1 asValue). |
|
6200 |
bindings at:#top put:(top := 1 asValue). |
|
6201 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6202 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 6203 |
ifTrue:[ |
6204 |
left := left value. |
|
6205 |
right := right value. |
|
6206 |
top := top value. |
|
6207 |
bottom := bottom value. |
|
6208 |
img := imageEditView image. |
|
6209 |
||
6210 |
imageEditView |
|
6211 |
makeBorderedImageX:left y:top |
|
6212 |
width:(img width + left + right) |
|
6213 |
height:(img height + top + bottom). |
|
6214 |
self updateInfoLabel |
|
6215 |
]. |
|
6216 |
||
6217 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6218 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6219 |
! |
|
6220 |
||
767 | 6221 |
doUndo |
6222 |
"reverses last edit action" |
|
400 | 6223 |
|
1436 | 6224 |
imageEditView undo. |
400 | 6225 |
! ! |
6226 |
||
2812 | 6227 |
!ImageEditor methodsFor:'user actions-image sequences'! |
6228 |
||
6229 |
editEachImageFromSequence |
|
6230 |
|seq| |
|
6231 |
||
6232 |
self checkModified ifFalse:[ ^ self ]. |
|
6233 |
||
6234 |
imageEditView releaseUndos. |
|
6235 |
||
6236 |
seq := self image imageSequence. |
|
6237 |
seq size > 10 ifTrue:[ |
|
6238 |
(Dialog confirm:(resources string:'Ok to open %1 image editor windows?' with:seq size)) |
|
6239 |
ifFalse:[^ self]. |
|
6240 |
]. |
|
6241 |
||
6242 |
seq do:[:eachFrame | |
|
6243 |
ImageEditor openOnImage:eachFrame image |
|
6244 |
]. |
|
6245 |
||
6246 |
"Modified: / 21-10-2010 / 15:01:25 / cg" |
|
6247 |
! |
|
6248 |
||
6249 |
gotoImageInSequence:index |
|
6250 |
"display the next image in the image sequence" |
|
6251 |
||
6252 |
|img seq frame listOfColors| |
|
6253 |
||
6254 |
imageEditView releaseUndos. |
|
6255 |
||
6256 |
seq := self image imageSequence. |
|
6257 |
||
6258 |
imageSeqNr := index. |
|
6259 |
frame := seq at:imageSeqNr. |
|
6260 |
imageEditView image:(frame image). |
|
6261 |
||
6262 |
(img := self image) notNil ifTrue:[ |
|
6263 |
listOfColors := self listOfColors. |
|
6264 |
img colorMap notNil ifTrue:[ |
|
6265 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
|
6266 |
] ifFalse:[ |
|
6267 |
listOfColors removeAll. |
|
6268 |
]. |
|
6269 |
self findColorMapMode. |
|
6270 |
self updateLabelsAndHistory. |
|
6271 |
img := img onDevice:device. |
|
6272 |
imageEditView image:img. |
|
6273 |
] ifFalse:[ |
|
6274 |
self updateForNoImage |
|
6275 |
]. |
|
6276 |
||
6277 |
"Created: / 21-10-2010 / 14:22:11 / cg" |
|
6278 |
! |
|
6279 |
||
6280 |
nextImageInSequence |
|
6281 |
"display the next image in the image sequence" |
|
6282 |
||
6283 |
|seq index| |
|
6284 |
||
6285 |
seq := self image imageSequence. |
|
6286 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6287 |
index := 1. |
|
6288 |
]. |
|
6289 |
index := index + 1. |
|
6290 |
index > seq size ifTrue:[ |
|
6291 |
self information:'Back to first image in sequence'. |
|
6292 |
index := 1. |
|
6293 |
]. |
|
6294 |
self gotoImageInSequence:index. |
|
6295 |
||
6296 |
"Modified: / 21-10-2010 / 14:24:11 / cg" |
|
6297 |
! |
|
6298 |
||
6299 |
previousImageInSequence |
|
6300 |
"display the previous image in the image sequence" |
|
6301 |
||
6302 |
|seq index| |
|
6303 |
||
6304 |
seq := self image imageSequence. |
|
6305 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6306 |
index := 1. |
|
6307 |
]. |
|
6308 |
index := index - 1. |
|
6309 |
index < 1 ifTrue:[ |
|
6310 |
self information:'Wrap to last image in sequence'. |
|
6311 |
index := seq size. |
|
6312 |
]. |
|
6313 |
self gotoImageInSequence:index. |
|
6314 |
||
6315 |
"Created: / 21-10-2010 / 14:25:03 / cg" |
|
6316 |
! ! |
|
6317 |
||
1715 | 6318 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 6319 |
|
767 | 6320 |
doLoadFromClass |
6321 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 6322 |
|
1122 | 6323 |
|img| |
6324 |
||
1975 | 6325 |
self checkModified ifFalse:[ ^ self ]. |
6326 |
||
1054 | 6327 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6328 |
imageSeqNr := nil. |
1122 | 6329 |
(img := self image) notNil ifTrue: [ |
1900 | 6330 |
self updateColorsFromImage:img. |
574 | 6331 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6332 |
self updateLabelsAndHistory. |
1054 | 6333 |
] ifFalse: [ |
6334 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6335 |
]. |
449 | 6336 |
] |
400 | 6337 |
! |
6338 |
||
767 | 6339 |
doLoadFromFile |
6340 |
"opens a dialog for loading an image from a file" |
|
400 | 6341 |
|
2820 | 6342 |
|img file filters title| |
1353 | 6343 |
|
1975 | 6344 |
self checkModified ifFalse:[ ^ self ]. |
6345 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6346 |
imageSeqNr := nil. |
1353 | 6347 |
img := self image. |
6348 |
img notNil ifTrue: [ |
|
6349 |
file := img fileName |
|
6350 |
]. |
|
6351 |
||
2820 | 6352 |
title := (resources string:'Load Image From'). |
6353 |
||
6354 |
UserPreferences current useNativeFileDialog ifTrue:[ |
|
6355 |
self withWaitCursorDo:[ |
|
6356 |
file := Display |
|
6357 |
nativeFileDialogFor:(self window topView id) |
|
6358 |
save:false |
|
6359 |
title:title |
|
6360 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6361 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6362 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6363 |
filter: |
6364 |
{ |
|
6365 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg' } . |
|
6366 |
{ (resources string:'All Files') . '*.*' } |
|
6367 |
} |
|
2821 | 6368 |
extension:nil |
2827 | 6369 |
"blocking:false". |
2820 | 6370 |
]. |
6371 |
] ifFalse:[ |
|
6372 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
6373 |
file notNil ifTrue:[ |
|
6374 |
file := FileSelectionBrowser |
|
6375 |
request:title |
|
6376 |
fileName:file |
|
6377 |
withFileFilters:filters. |
|
6378 |
] ifFalse:[ |
|
6379 |
file := FileSelectionBrowser |
|
6380 |
request:title |
|
6381 |
inDirectory:LastDirectory |
|
6382 |
withFileFilters:filters. |
|
6383 |
]. |
|
1353 | 6384 |
]. |
2820 | 6385 |
|
1353 | 6386 |
file notNil ifTrue:[ |
6387 |
LastDirectory := file asFilename directoryName. |
|
6388 |
self loadFromFile:file |
|
6389 |
] |
|
2820 | 6390 |
|
2827 | 6391 |
"Modified: / 14-12-2010 / 13:52:11 / cg" |
400 | 6392 |
! |
6393 |
||
2796 | 6394 |
doLoadFromURL |
6395 |
"opens a dialog for loading an image from a URL" |
|
6396 |
||
2866 | 6397 |
|tempFile url response| |
2796 | 6398 |
|
6399 |
self checkModified ifFalse:[ ^ self ]. |
|
6400 |
||
6401 |
url := Dialog |
|
2866 | 6402 |
request:(resources string:'Load Image from URL') |
2796 | 6403 |
initialAnswer:LastURL. |
6404 |
||
6405 |
url notEmptyOrNil ifTrue:[ |
|
6406 |
LastURL := url. |
|
6407 |
tempFile := Filename newTemporary. |
|
2866 | 6408 |
self withWaitCursorDo:[ |
6409 |
response := HTTPInterface get:url destinationFile:tempFile. |
|
6410 |
]. |
|
6411 |
response isErrorResponse ifTrue:[ |
|
6412 |
Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
|
6413 |
] ifFalse:[ |
|
6414 |
self loadFromFile:tempFile. |
|
6415 |
]. |
|
2796 | 6416 |
tempFile delete |
6417 |
] |
|
6418 |
||
6419 |
"Created: / 20-09-2010 / 11:30:59 / cg" |
|
6420 |
! |
|
6421 |
||
767 | 6422 |
doNewImage |
6423 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 6424 |
|
1975 | 6425 |
|dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext| |
6426 |
||
6427 |
self checkModified ifFalse:[ ^ self ]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6428 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6429 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6430 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6431 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 6432 |
|
1975 | 6433 |
dialogAspects := IdentityDictionary new |
767 | 6434 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6435 |
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
|
6436 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6437 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 6438 |
yourself. |
6439 |
||
1975 | 6440 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects) |
1383 | 6441 |
ifTrue:[ |
1975 | 6442 |
szString := (dialogAspects at:#selectionOfSize) value. |
1960 | 6443 |
ext := self pointFromString:szString. |
1962 | 6444 |
ext isNil ifTrue:[ |
6445 |
width := height := 32 |
|
6446 |
] ifFalse:[ |
|
6447 |
width := ext x. |
|
6448 |
height := ext y. |
|
6449 |
]. |
|
1960 | 6450 |
"/ width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
6451 |
"/ height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 6452 |
|
1975 | 6453 |
cMapString := (dialogAspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6454 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6455 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6456 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6457 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6458 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 6459 |
|
1637 | 6460 |
LastSizeString := szString. |
6461 |
LastColormapMode := cMapString. |
|
6462 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6463 |
(cMapMode startsWith: 'mask') ifTrue:[ |
767 | 6464 |
image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
400 | 6465 |
]. |
6466 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6467 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6468 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6469 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6470 |
]. |
400 | 6471 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 6472 |
] |
929 | 6473 |
! |
6474 |
||
2058 | 6475 |
doNewImageEditor |
6476 |
"opens a new image editor" |
|
6477 |
||
6478 |
ImageEditor open |
|
6479 |
||
6480 |
"Created: / 17-08-2006 / 09:03:14 / cg" |
|
6481 |
! |
|
6482 |
||
1682 | 6483 |
doNewImageFromClipboard |
6484 |
|image| |
|
6485 |
||
1975 | 6486 |
self checkModified ifFalse:[ ^ self ]. |
6487 |
||
1682 | 6488 |
image := imageEditView clipBoard. |
1975 | 6489 |
imageEditView image:image. |
6490 |
||
6491 |
image notNil ifTrue:[ |
|
1900 | 6492 |
self updateColorsFromImage:image. |
1682 | 6493 |
self findColorMapMode. |
6494 |
self updateLabelsAndHistory. |
|
6495 |
] |
|
6496 |
! |
|
6497 |
||
929 | 6498 |
grabScreenImage |
6499 |
"let user choose an area and grab that are for editing" |
|
6500 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6501 |
self grabScreenImageUsing:[ |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6502 |
|r| |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6503 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6504 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6505 |
r := Rectangle fromUser. |
2708 | 6506 |
(r width == 0 or:[r height == 0]) ifTrue:[ |
6507 |
nil |
|
6508 |
] ifFalse:[ |
|
6509 |
lastGrabbedScreenArea := r. |
|
6510 |
Image fromScreen:r |
|
6511 |
] |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6512 |
]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6513 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6514 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6515 |
grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6516 |
"grab again from the previous area for editing" |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6517 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6518 |
self grabScreenImageUsing:[ |
2708 | 6519 |
Image fromScreen:lastGrabbedScreenArea |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6520 |
]. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6521 |
! |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6522 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6523 |
grabScreenImageUsing:aBlock |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6524 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6525 |
|
1975 | 6526 |
self checkModified ifFalse:[ ^ self ]. |
6527 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6528 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6529 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6530 |
|image d8image img| |
929 | 6531 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6532 |
imageSeqNr := nil. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6533 |
image := aBlock value. |
2708 | 6534 |
image notNil ifTrue:[ |
1121 | 6535 |
image depth > 8 ifTrue:[ |
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6536 |
false ifTrue:[ |
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
6537 |
Error handle:[:ex | |sig| |
2996 | 6538 |
(sig := ex creator) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 6539 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 6540 |
|
6541 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
6542 |
d8image := nil. |
|
6543 |
] do:[ |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6544 |
d8image := Depth8Image fromImage:image photometric:#palette. |
1121 | 6545 |
]. |
6546 |
d8image notNil ifTrue:[ |
|
6547 |
image := d8image |
|
6548 |
] |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6549 |
]. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6550 |
]. |
1121 | 6551 |
(imageEditView image:image) notNil ifTrue:[ |
6552 |
self listOfColors contents:(image colorMap). |
|
6553 |
self findColorMapMode. |
|
6554 |
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
|
6555 |
] |
1121 | 6556 |
] |
6557 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6558 |
afterSeconds:1 |
929 | 6559 |
|
6560 |
"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
|
6561 |
"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
|
6562 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6563 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6564 |
grabWindowImage |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6565 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6566 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6567 |
self grabScreenImageUsing:[ |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6568 |
|v| |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6569 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6570 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
2704 | 6571 |
v topView raise. |
6572 |
v topView makeFullyVisible. |
|
6573 |
Delay waitForSeconds:0.5. "/ give view a chance to redraw itself. |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6574 |
Image fromView:(v topView) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6575 |
]. |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6576 |
]. |
400 | 6577 |
! ! |
6578 |
||
1715 | 6579 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 6580 |
|
767 | 6581 |
doPrint |
6582 |
"prints current image on the current printer" |
|
400 | 6583 |
|
1734 | 6584 |
self withWaitCursorDo:[ |
6585 |
imageEditView print |
|
6586 |
] |
|
400 | 6587 |
! |
6588 |
||
1613 | 6589 |
doSaveButtonImageToFileAs |
6590 |
"opens a dialog for saving current image to a file" |
|
6591 |
||
6592 |
imageEditView saveButtonImageToFileAs. |
|
6593 |
self updateLabelsAndHistory. |
|
6594 |
! |
|
6595 |
||
767 | 6596 |
doSaveImageFile |
6597 |
"saves current image to current file" |
|
400 | 6598 |
|
1481 | 6599 |
imageEditView save. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6600 |
self clearModified. |
400 | 6601 |
! |
6602 |
||
767 | 6603 |
doSaveImageFileAs |
1922 | 6604 |
"opens a dialog for saving an image to a file" |
6605 |
||
6606 |
|img file filters| |
|
6607 |
||
6608 |
img := self image. |
|
6609 |
img notNil ifTrue: [ |
|
6610 |
file := img fileName |
|
6611 |
]. |
|
6612 |
||
2595 | 6613 |
filters := FileSelectionBrowser saveImageFileNameFilters. |
1922 | 6614 |
|
2820 | 6615 |
UserPreferences current useNativeFileDialog ifTrue:[ |
6616 |
self withWaitCursorDo:[ |
|
6617 |
file := Display |
|
6618 |
nativeFileDialogFor:(self window topView id) |
|
6619 |
save:true |
|
6620 |
title:(resources string:'Save Image To') |
|
6621 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6622 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6623 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6624 |
filter: |
6625 |
{ |
|
6626 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp' } . |
|
6627 |
{ (resources string:'All Files') . '*.*' } |
|
6628 |
} |
|
2821 | 6629 |
extension:nil |
2827 | 6630 |
"blocking:false". |
2807 | 6631 |
]. |
2820 | 6632 |
] ifFalse:[ |
6633 |
(FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[ |
|
6634 |
file notNil ifTrue:[ |
|
6635 |
file := Dialog requestFileName:'Save Image To' |
|
6636 |
default:file |
|
6637 |
pattern:(filters first). |
|
6638 |
] ifFalse:[ |
|
6639 |
file := Dialog |
|
6640 |
requestFileName:'Save Image To' |
|
6641 |
default:'image.png' |
|
6642 |
pattern:(filters first) |
|
6643 |
fromDirectory:LastDirectory. |
|
6644 |
]. |
|
2807 | 6645 |
] ifFalse:[ |
2820 | 6646 |
file notNil ifTrue:[ |
6647 |
file := FileSelectionBrowser |
|
6648 |
request:'Save Image To' |
|
6649 |
fileName:file |
|
6650 |
withFileFilters:filters. |
|
6651 |
] ifFalse:[ |
|
6652 |
file := FileSelectionBrowser |
|
6653 |
request:'Save Image To' |
|
6654 |
inDirectory:LastDirectory |
|
6655 |
withFileFilters:filters. |
|
6656 |
]. |
|
2807 | 6657 |
]. |
1922 | 6658 |
]. |
6659 |
file notNil ifTrue:[ |
|
6660 |
imageEditView saveImageFileAs:file. |
|
6661 |
LastDirectory := file asFilename directoryName. |
|
6662 |
self updateLabelsAndHistory. |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6663 |
self clearModified. |
1922 | 6664 |
] |
2807 | 6665 |
|
2827 | 6666 |
"Modified: / 14-12-2010 / 13:51:47 / cg" |
400 | 6667 |
! |
6668 |
||
767 | 6669 |
doSaveImageMaskFileAs |
6670 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 6671 |
|
1481 | 6672 |
imageEditView saveImageMaskFileAs. |
400 | 6673 |
! |
6674 |
||
767 | 6675 |
doSaveMethod |
1975 | 6676 |
"saves the image in current class and selector" |
6677 |
||
6678 |
imageEditView saveMethod ifTrue:[ |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6679 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6680 |
self clearModified. |
400 | 6681 |
] |
6682 |
! |
|
6683 |
||
767 | 6684 |
doSaveMethodAs |
6685 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 6686 |
|
1975 | 6687 |
imageEditView saveMethodAs ifTrue:[ |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6688 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6689 |
self clearModified. |
400 | 6690 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6691 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6692 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6693 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6694 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6695 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6696 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6697 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6698 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6699 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6700 |
TextBox openOn:img storeString |
1975 | 6701 |
! |
6702 |
||
6703 |
save |
|
6704 |
"saves current image on current class and selector" |
|
6705 |
||
6706 |
self doSaveMethod |
|
400 | 6707 |
! ! |
6708 |
||
1715 | 6709 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 6710 |
|
6711 |
doChangeGridMagnification |
|
6712 |
"change grid magnification" |
|
6713 |
||
6714 |
|box oldGridLimit newGridLimit| |
|
6715 |
||
6716 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
6717 |
||
6718 |
box := EnterBox new. |
|
6719 |
box title:(resources string:'Grid Magnification Limit:'). |
|
6720 |
box okText:(resources string:'OK'). |
|
6721 |
box abortText:(resources string:'Cancel'). |
|
6722 |
box initialText:(oldGridLimit x printString). |
|
6723 |
box showAtPointer. |
|
6724 |
||
6725 |
(box accepted |
|
6726 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
6727 |
) ifTrue:[ |
|
6728 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
6729 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
6730 |
imageEditView invalidate |
|
6731 |
] |
|
6732 |
||
2192 | 6733 |
! |
6734 |
||
6735 |
penWidth:n |
|
6736 |
imageEditView penWidth:n |
|
6737 |
||
6738 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2375 | 6739 |
! |
6740 |
||
2881 | 6741 |
penWidthHolderChanged |
6742 |
imageEditView penWidth:(self penWidthHolder value) |
|
6743 |
||
6744 |
"Created: / 15-02-2012 / 22:32:00 / cg" |
|
6745 |
! |
|
6746 |
||
2375 | 6747 |
spraySpot:n |
6748 |
imageEditView spraySpot:n |
|
6749 |
||
6750 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2881 | 6751 |
! |
6752 |
||
6753 |
spraySpotHolderChanged |
|
6754 |
imageEditView spraySpot:(self spraySpotHolder value) |
|
6755 |
||
6756 |
"Created: / 15-02-2012 / 22:37:08 / cg" |
|
1353 | 6757 |
! ! |
6758 |
||
400 | 6759 |
!ImageEditor class methodsFor:'documentation'! |
6760 |
||
6761 |
version |
|
6762 |
^ '$Header$' |
|
2590 | 6763 |
! |
6764 |
||
6765 |
version_CVS |
|
6766 |
^ '$Header$' |
|
400 | 6767 |
! ! |
2945 | 6768 |