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