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