ImageEditor.st
author tz
Tue, 03 Feb 1998 17:13:23 +0100
changeset 566 58b18ffe959c
parent 544 8fa6ee20c3cd
child 569 8df885a4b692
permissions -rw-r--r--
info bar layout changed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
400
228524287573 intitial checkin
tz
parents:
diff changeset
     1
"
503
98b67511b1c0 copyright changed
tz
parents: 499
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
     4
228524287573 intitial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
     7
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
     9
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    11
"
228524287573 intitial checkin
tz
parents:
diff changeset
    12
228524287573 intitial checkin
tz
parents:
diff changeset
    13
ToolApplicationModel subclass:#ImageEditor
228524287573 intitial checkin
tz
parents:
diff changeset
    14
	instanceVariableNames:'colorMapMode selectedColorIndex postOpenAction'
228524287573 intitial checkin
tz
parents:
diff changeset
    15
	classVariableNames:''
228524287573 intitial checkin
tz
parents:
diff changeset
    16
	poolDictionaries:''
228524287573 intitial checkin
tz
parents:
diff changeset
    17
	category:'Interface-Advanced-Tools'
228524287573 intitial checkin
tz
parents:
diff changeset
    18
!
228524287573 intitial checkin
tz
parents:
diff changeset
    19
228524287573 intitial checkin
tz
parents:
diff changeset
    20
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    21
228524287573 intitial checkin
tz
parents:
diff changeset
    22
copyright
228524287573 intitial checkin
tz
parents:
diff changeset
    23
"
503
98b67511b1c0 copyright changed
tz
parents: 499
diff changeset
    24
 COPYRIGHT (c) 1997 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    25
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
    26
228524287573 intitial checkin
tz
parents:
diff changeset
    27
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
    28
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    29
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    30
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    31
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    32
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    33
"
228524287573 intitial checkin
tz
parents:
diff changeset
    34
!
228524287573 intitial checkin
tz
parents:
diff changeset
    35
228524287573 intitial checkin
tz
parents:
diff changeset
    36
documentation
228524287573 intitial checkin
tz
parents:
diff changeset
    37
"
228524287573 intitial checkin
tz
parents:
diff changeset
    38
    By the Image Editor you are able to create, design, modify or just inspect images.
228524287573 intitial checkin
tz
parents:
diff changeset
    39
228524287573 intitial checkin
tz
parents:
diff changeset
    40
    [start with:]
228524287573 intitial checkin
tz
parents:
diff changeset
    41
        ImageEditor open
228524287573 intitial checkin
tz
parents:
diff changeset
    42
        ImageEditor openOnClass:ImageEditor andSelector:#newImageIcon
228524287573 intitial checkin
tz
parents:
diff changeset
    43
228524287573 intitial checkin
tz
parents:
diff changeset
    44
    [see also:]
228524287573 intitial checkin
tz
parents:
diff changeset
    45
        ImageEditView Image
228524287573 intitial checkin
tz
parents:
diff changeset
    46
228524287573 intitial checkin
tz
parents:
diff changeset
    47
    [author:]
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
    48
        Thomas Zwick, eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    49
"
228524287573 intitial checkin
tz
parents:
diff changeset
    50
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    51
228524287573 intitial checkin
tz
parents:
diff changeset
    52
!ImageEditor class methodsFor:'instance creation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    53
228524287573 intitial checkin
tz
parents:
diff changeset
    54
openModalOnClass: aClass andSelector: aSelector
228524287573 intitial checkin
tz
parents:
diff changeset
    55
228524287573 intitial checkin
tz
parents:
diff changeset
    56
    "self openModalOnClass: self andSelector: #newImageIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
    57
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    58
    |imageEditor className resourceClassName resourceSelector|                      
400
228524287573 intitial checkin
tz
parents:
diff changeset
    59
    imageEditor := self new.
228524287573 intitial checkin
tz
parents:
diff changeset
    60
    aClass isClass ifTrue: [className := aClass name].
228524287573 intitial checkin
tz
parents:
diff changeset
    61
    aClass isString ifTrue: [className := aClass].      
228524287573 intitial checkin
tz
parents:
diff changeset
    62
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    63
    imageEditor postOpenAction: [imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector].
400
228524287573 intitial checkin
tz
parents:
diff changeset
    64
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
    65
228524287573 intitial checkin
tz
parents:
diff changeset
    66
    resourceClassName := imageEditor valueOfResourceClass value.
228524287573 intitial checkin
tz
parents:
diff changeset
    67
    resourceSelector := imageEditor valueOfResourceSelector value.
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    68
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    69
    (className asString ~= resourceClassName) | (aSelector asString ~= resourceSelector)
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    70
        ifTrue: [^resourceClassName, ' ', resourceSelector]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    71
        ifFalse:[^nil]
400
228524287573 intitial checkin
tz
parents:
diff changeset
    72
!
228524287573 intitial checkin
tz
parents:
diff changeset
    73
228524287573 intitial checkin
tz
parents:
diff changeset
    74
openOnClass: aClass andSelector: aSelector
228524287573 intitial checkin
tz
parents:
diff changeset
    75
228524287573 intitial checkin
tz
parents:
diff changeset
    76
    "self openOnClass: self andSelector: #newImageIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
    77
228524287573 intitial checkin
tz
parents:
diff changeset
    78
    ^self open loadFromMessage: aClass name, ' ', aSelector
228524287573 intitial checkin
tz
parents:
diff changeset
    79
!
228524287573 intitial checkin
tz
parents:
diff changeset
    80
228524287573 intitial checkin
tz
parents:
diff changeset
    81
openOnFile: image
228524287573 intitial checkin
tz
parents:
diff changeset
    82
228524287573 intitial checkin
tz
parents:
diff changeset
    83
    "self openOnFile: 'bitmaps/SmalltalkX.xbm'"
228524287573 intitial checkin
tz
parents:
diff changeset
    84
228524287573 intitial checkin
tz
parents:
diff changeset
    85
    ^self open loadFromFile: image
228524287573 intitial checkin
tz
parents:
diff changeset
    86
!
228524287573 intitial checkin
tz
parents:
diff changeset
    87
228524287573 intitial checkin
tz
parents:
diff changeset
    88
openOnImage: image
228524287573 intitial checkin
tz
parents:
diff changeset
    89
228524287573 intitial checkin
tz
parents:
diff changeset
    90
    "self openOnImage: self stxIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
    91
228524287573 intitial checkin
tz
parents:
diff changeset
    92
    ^self open loadFromImage: image
228524287573 intitial checkin
tz
parents:
diff changeset
    93
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    94
228524287573 intitial checkin
tz
parents:
diff changeset
    95
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
    96
228524287573 intitial checkin
tz
parents:
diff changeset
    97
listOfColorMaps
228524287573 intitial checkin
tz
parents:
diff changeset
    98
228524287573 intitial checkin
tz
parents:
diff changeset
    99
    |colorMap|
228524287573 intitial checkin
tz
parents:
diff changeset
   100
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   101
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   102
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   103
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   104
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   105
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   106
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   107
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   108
        add: Color magenta;
228524287573 intitial checkin
tz
parents:
diff changeset
   109
        add: (Color red: 50 green: 0 blue: 0);
228524287573 intitial checkin
tz
parents:
diff changeset
   110
        add: (Color red: 0 green: 50 blue: 0);
228524287573 intitial checkin
tz
parents:
diff changeset
   111
        add: (Color red: 0 green: 0 blue: 50);
228524287573 intitial checkin
tz
parents:
diff changeset
   112
        add: (Color red: 0 green: 50 blue: 50);
228524287573 intitial checkin
tz
parents:
diff changeset
   113
        add: (Color red: 50 green: 50 blue: 0);
228524287573 intitial checkin
tz
parents:
diff changeset
   114
        add: (Color red: 50 green: 0 blue: 50);
228524287573 intitial checkin
tz
parents:
diff changeset
   115
        add: Color gray;
228524287573 intitial checkin
tz
parents:
diff changeset
   116
        add: Color lightGray.                                
228524287573 intitial checkin
tz
parents:
diff changeset
   117
    0 to: 5 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   118
    [:r|                                                    
228524287573 intitial checkin
tz
parents:
diff changeset
   119
        0 to: 5 do:         
228524287573 intitial checkin
tz
parents:
diff changeset
   120
        [:g|
228524287573 intitial checkin
tz
parents:
diff changeset
   121
            0 to: 5 do:                             
228524287573 intitial checkin
tz
parents:
diff changeset
   122
            [:b|
228524287573 intitial checkin
tz
parents:
diff changeset
   123
                colorMap add: (Color red: (r*100//5) ceiling green: (g*100//5) ceiling blue: (b*100//5) ceiling)
228524287573 intitial checkin
tz
parents:
diff changeset
   124
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   125
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   126
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   127
228524287573 intitial checkin
tz
parents:
diff changeset
   128
    1 to: 25 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   129
    [:g|                             
228524287573 intitial checkin
tz
parents:
diff changeset
   130
        colorMap add: (Color gray: (g*100//26) ceiling)
228524287573 intitial checkin
tz
parents:
diff changeset
   131
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   132
228524287573 intitial checkin
tz
parents:
diff changeset
   133
    ^Dictionary new
228524287573 intitial checkin
tz
parents:
diff changeset
   134
        at: '8-plane' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   135
        at: '8-plane + mask' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   136
        at: '4-plane' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   137
        at: '4-plane + mask' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   138
        at: '2-plane' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   139
        at: '2-plane + mask' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   140
        at: '1-plane' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   141
        at: '1-plane + mask' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   142
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   143
!
228524287573 intitial checkin
tz
parents:
diff changeset
   144
228524287573 intitial checkin
tz
parents:
diff changeset
   145
listOfDefaultSizes
228524287573 intitial checkin
tz
parents:
diff changeset
   146
228524287573 intitial checkin
tz
parents:
diff changeset
   147
    ^#('24x24' '16x16' '32x32')
228524287573 intitial checkin
tz
parents:
diff changeset
   148
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   149
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   150
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   151
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   152
helpSpec
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   153
    "return a dictionary filled with helpKey -> helptext associations.
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   154
     These are used by the activeHelp tool."
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   155
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   156
    "
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   157
    UIHelpTool openOnClass:ImageEditor    
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   158
    "
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   159
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   160
  ^ super helpSpec addPairsFrom:#(
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   161
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   162
#colorMap
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   163
'Increases or reduces size of color map of the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   164
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   165
#colorMapTable
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   166
'Shows a list of used colors of the current image.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   167
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   168
#drawModeBox
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   169
'Switches to mode drawing boxes.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   170
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   171
#drawModeCopy
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   172
'Switches to mode copying areas.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   173
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   174
#drawModeFill
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   175
'Switches to mode filling areas around selected point.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   176
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   177
#drawModeFilledBox
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   178
'Switches to mode drawing filled boxes.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   179
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   180
#drawModePaste
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   181
'Switches to mode pasting areas at selected point.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   182
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   183
#drawModePoint
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   184
'Switches to mode drawing points.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   185
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   186
#editFlipHorizontal
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   187
'Flips horizontally the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   188
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   189
#editFlipVertical
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   190
'Flips vertically the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   191
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   192
#editMagnifyImage
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   193
'Opens a dialog to magnify the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   194
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   195
#editNegate
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   196
'Convertes colors of image by negating them.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   197
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   198
#editResize
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   199
'Opens a dialog to resize the image with preserving the old image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   200
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   201
#editRotate
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   202
'Opens a dialog to rotate the image in degrees.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   203
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   204
#fileBrowseClass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   205
'Opens the System Browser on the class and the selector.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   206
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   207
#fileLoadFromClass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   208
'Opens a dialog for selecting an image resource method.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   209
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   210
#fileLoadFromClassWithSuperclass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   211
'Opens a dialog for opening the resource dialog on a superclass.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   212
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   213
#fileLoadFromFile
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   214
'Opens a dialog for selecting an image file.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   215
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   216
#fileNewImage
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   217
'Opens a dialog with choices of size and color depth.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   218
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   219
#filePrint
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   220
'Print the image on a postscript printer.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   221
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   222
#fileSaveAs
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   223
'Opens dialog to save the image on a file.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   224
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   225
#fileSaveFile
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   226
'Saves the image on selected file name.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   227
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   228
#fileSaveMaskAs
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   229
'Opens dialog to save the mask of the image on a file.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   230
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   231
#fileSaveMethod
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   232
'Saves current image into selected class and selector.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   233
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   234
#fileSaveMethodAs
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   235
'Opens dialog to save the image on a class and a selector.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   236
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   237
#inputFieldFileName
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   238
'File name of the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   239
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   240
#inputFieldOfClass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   241
'Class implementing the image method.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   242
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   243
#inputFieldOfSelector
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   244
'Selector of the class returning the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   245
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   246
#magnificationNumber
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   247
'Shows current number of magnification.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   248
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   249
#magnifyImageDown
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   250
'Magnifies down current image.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   251
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   252
#magnifyImageUp
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   253
'Magnifies up current image.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   254
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   255
#mouseKeyColorMode
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   256
'Toggles between left and right mouse key color.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   257
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   258
#previewView
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   259
'Shows preview of the current image.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   260
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   261
)
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   262
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   263
400
228524287573 intitial checkin
tz
parents:
diff changeset
   264
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
   265
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   266
windowSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   267
    "this window spec was automatically generated by the ST/X UIPainter"
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   268
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   269
    "do not manually edit this - the painter/builder may not be able to
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   270
     handle the specification if its corrupted."
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   271
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   272
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   273
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   274
     ImageEditor new openInterface:#windowSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   275
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   276
    "ImageEditor open"
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   277
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   278
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   279
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   280
    ^
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   281
     
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   282
       #(#FullSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   283
          #'window:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   284
           #(#WindowSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   285
              #'name:' 'Image Editor'
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
   286
              #'layout:' #(#LayoutFrame 402 0 299 0 901 0 644 0)
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   287
              #'label:' 'Image Editor'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   288
              #'min:' #(#Point 400 320)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   289
              #'max:' #(#Point 1152 900)
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
   290
              #'bounds:' #(#Rectangle 402 299 902 645)
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   291
              #'menu:' #menu
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   292
              #'usePreferredExtent:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   293
          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   294
          #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   295
           #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   296
              #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   297
               #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   298
                 #(#MenuPanelSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   299
                    #'name:' 'menuToolbarView'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   300
                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   301
                    #'menu:' #menuToolbar
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   302
                    #'style:' #(#FontDescription #helvetica #medium #roman 10)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   303
                    #'showSeparatingLines:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   304
                )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   305
                 #(#VariableHorizontalPanelSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   306
                    #'name:' 'variableHorizontalPanel1'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   307
                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   308
                    #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   309
                     #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   310
                        #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   311
                         #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   312
                           #(#ViewSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   313
                              #'name:' 'view1'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   314
                              #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   315
                               #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   316
                                  #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   317
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   318
                                     #(#FramedBoxSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   319
                                        #'name:' 'framedBox1'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   320
                                        #'layout:' #(#LayoutFrame 1 0.0 3 0.0 110 0 65 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   321
                                        #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   322
                                         #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   323
                                            #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   324
                                             #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   325
                                               #(#ArrowButtonSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   326
                                                  #'name:' 'magnifyDownButton'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   327
                                                  #'layout:' #(#LayoutFrame 13 0 20 0 35 0 42 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   328
                                                  #'activeHelpKey:' #magnifyImageDown
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   329
                                                  #'model:' #magnifyDown
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   330
                                                  #'enableChannel:' #imageIsLoaded
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   331
                                                  #'isTriggerOnDown:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   332
                                                  #'direction:' #left
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   333
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   334
                                               #(#ArrowButtonSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   335
                                                  #'name:' 'magnifyUpButton'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   336
                                                  #'layout:' #(#LayoutFrame 73 0 20 0 95 0 42 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   337
                                                  #'activeHelpKey:' #magnifyImageUp
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   338
                                                  #'model:' #magnifyUp
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   339
                                                  #'enableChannel:' #imageIsLoaded
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   340
                                                  #'isTriggerOnDown:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   341
                                                  #'direction:' #right
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   342
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   343
                                               #(#InputFieldSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   344
                                                  #'name:' 'magnificationInputField'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   345
                                                  #'layout:' #(#LayoutFrame 36 0 20 0.0 72 0 42 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   346
                                                  #'activeHelpKey:' #magnificationNumber
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   347
                                                  #'enableChannel:' #imageIsLoaded
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   348
                                                  #'model:' #valueOfMagnification
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   349
                                                  #'type:' #number
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   350
                                                  #'acceptOnReturn:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   351
                                                  #'acceptOnTab:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   352
                                                  #'numChars:' 2
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   353
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   354
                                            )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   355
                                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   356
                                        #'label:' 'Magnification'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   357
                                        #'labelPosition:' #topLeft
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   358
                                        #'style:' #(#FontDescription #helvetica #medium #roman 12)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   359
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   360
                                     #(#ArbitraryComponentSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   361
                                        #'name:' 'imagePreView'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   362
                                        #'layout:' #(#LayoutFrame 111 0.0 9 0.0 -6 1 60 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   363
                                        #'activeHelpKey:' #previewView
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   364
                                        #'hasHorizontalScrollBar:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   365
                                        #'hasVerticalScrollBar:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   366
                                        #'miniScrollerHorizontal:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   367
                                        #'miniScrollerVertical:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   368
                                        #'component:' #ImageView
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   369
                                        #'hasBorder:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   370
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   371
                                     #(#FramedBoxSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   372
                                        #'name:' 'framedBox2'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   373
                                        #'layout:' #(#LayoutFrame 1 0.0 68 0 0 1.0 -66 1)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   374
                                        #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   375
                                         #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   376
                                            #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   377
                                             #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   378
                                               #(#DataSetSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   379
                                                  #'name:' 'colorDataSetView'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   380
                                                  #'layout:' #(#LayoutFrame 11 0.0 19 0.0 20 1.0 -10 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   381
                                                  #'activeHelpKey:' #colorMapTable
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   382
                                                  #'model:' #selectionOfColor
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   383
                                                  #'style:' #(#FontDescription #helvetica #medium #roman 12)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   384
                                                  #'hasHorizontalScrollBar:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   385
                                                  #'hasVerticalScrollBar:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   386
                                                  #'miniScrollerHorizontal:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   387
                                                  #'miniScrollerVertical:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   388
                                                  #'dataList:' #listOfColors
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   389
                                                  #'level:' -1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   390
                                                  #'has3Dsepartors:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   391
                                                  #'verticalSpacing:' 1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   392
                                                  #'columns:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   393
                                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   394
                                                     #(#DataSetColumnSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   395
                                                        #'rendererType:' #rowSelector
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   396
                                                        #'backgroundSelector:' #yourself
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   397
                                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   398
                                                     #(#DataSetColumnSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   399
                                                        #'label:' 'Red'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   400
                                                        #'model:' #rowRedByte
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   401
                                                        #'canSelect:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   402
                                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   403
                                                     #(#DataSetColumnSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   404
                                                        #'label:' 'Green'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   405
                                                        #'model:' #rowGreenByte
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   406
                                                        #'canSelect:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   407
                                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   408
                                                     #(#DataSetColumnSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   409
                                                        #'label:' 'Blue'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   410
                                                        #'model:' #rowBlueByte
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   411
                                                        #'canSelect:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   412
                                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   413
                                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   414
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   415
                                               #(#MenuPanelSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   416
                                                  #'name:' 'menuColorAssignmentPanel'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   417
                                                  #'layout:' #(#LayoutFrame 11 0 -10 1 18 1 17 1)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   418
                                                  #'activeHelpKey:' #mouseKeyColorMode
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   419
                                                  #'enableChannel:' #imageIsLoaded
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   420
                                                  #'menu:' #menuColorAssignment
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   421
                                                  #'style:' #(#FontDescription #helvetica #medium #roman 10)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   422
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   423
                                            )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   424
                                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   425
                                        #'label:' 'Color Map'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   426
                                        #'labelPosition:' #topLeft
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   427
                                        #'style:' #(#FontDescription #helvetica #medium #roman 12)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   428
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   429
                                     #(#VerticalPanelViewSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   430
                                        #'name:' 'verticalPanelView1'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   431
                                        #'layout:' #(#LayoutFrame 1 0.0 -68 1 83 0 0 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   432
                                        #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   433
                                         #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   434
                                            #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   435
                                             #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   436
                                               #(#LabelSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   437
                                                  #'name:' 'classNameLabel'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   438
                                                  #'label:' 'Class:'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   439
                                                  #'adjust:' #right
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   440
                                                  #'extent:' #(#Point 82 21)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   441
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   442
                                               #(#LabelSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   443
                                                  #'name:' 'selectorLabel'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   444
                                                  #'label:' 'Selector:'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   445
                                                  #'adjust:' #right
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   446
                                                  #'extent:' #(#Point 82 20)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   447
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   448
                                               #(#LabelSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   449
                                                  #'name:' 'fileNameLabel'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   450
                                                  #'label:' 'File Name:'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   451
                                                  #'adjust:' #right
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   452
                                                  #'extent:' #(#Point 82 21)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   453
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   454
                                            )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   455
                                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   456
                                        #'horizontalLayout:' #fit
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   457
                                        #'verticalLayout:' #fit
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   458
                                        #'horizontalSpace:' 3
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   459
                                        #'verticalSpace:' 3
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   460
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   461
                                     #(#VerticalPanelViewSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   462
                                        #'name:' 'verticalPanelView2'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   463
                                        #'layout:' #(#LayoutFrame 85 0.0 -68 1 -6 1 0 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   464
                                        #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   465
                                         #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   466
                                            #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   467
                                             #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   468
                                               #(#InputFieldSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   469
                                                  #'name:' 'resourceClassInputField'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   470
                                                  #'activeHelpKey:' #inputFieldOfClass
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   471
                                                  #'model:' #valueOfResourceClass
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   472
                                                  #'immediateAccept:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   473
                                                  #'extent:' #(#Point 153 21)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   474
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   475
                                               #(#InputFieldSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   476
                                                  #'name:' 'resourceSelectorInputField'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   477
                                                  #'activeHelpKey:' #inputFieldOfSelector
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   478
                                                  #'model:' #valueOfResourceSelector
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   479
                                                  #'immediateAccept:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   480
                                                  #'acceptOnTab:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   481
                                                  #'extent:' #(#Point 153 20)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   482
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   483
                                               #(#InputFieldSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   484
                                                  #'name:' 'fileNameInputField'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   485
                                                  #'activeHelpKey:' #inputFieldFileName
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   486
                                                  #'model:' #valueOfFileName
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   487
                                                  #'immediateAccept:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   488
                                                  #'acceptOnTab:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   489
                                                  #'extent:' #(#Point 153 21)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   490
                                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   491
                                            )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   492
                                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   493
                                        #'horizontalLayout:' #fit
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   494
                                        #'verticalLayout:' #fit
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   495
                                        #'horizontalSpace:' 3
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   496
                                        #'verticalSpace:' 3
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   497
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   498
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   499
                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   500
                              #'level:' -1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   501
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   502
                           #(#ViewSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   503
                              #'name:' 'view2'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   504
                              #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   505
                               #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   506
                                  #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   507
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   508
                                     #(#ArbitraryComponentSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   509
                                        #'name:' 'imageEditView'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   510
                                        #'layout:' #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   511
                                        #'hasHorizontalScrollBar:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   512
                                        #'hasVerticalScrollBar:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   513
                                        #'component:' #ImageEditView
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   514
                                        #'hasBorder:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   515
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   516
                                     #(#LabelSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   517
                                        #'name:' 'coordLabel'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   518
                                        #'layout:' #(#LayoutFrame 2 0.0 -22 1 -4 1.0 0 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   519
                                        #'level:' -1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   520
                                        #'adjust:' #left
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   521
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   522
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   523
                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   524
                              #'level:' -1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   525
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   526
                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   527
                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   528
                    #'level:' 1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   529
                    #'handles:' #(#Any 0.5 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   530
                )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   531
                 #(#UISubSpecification
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   532
                    #'name:' 'infoBarSubSpec'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   533
                    #'layout:' #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   534
                    #'majorKey:' #ToolApplicationModel
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
   535
                    #'minorKey:' #windowSpecForInfoBarWithClock
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   536
                )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   537
              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   538
          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   539
      )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   540
!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   541
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   542
windowSpecForNewImage
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   543
    "this window spec was automatically generated by the ST/X UIPainter"
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   544
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   545
    "do not manually edit this - the painter/builder may not be able to
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   546
     handle the specification if its corrupted."
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   547
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   548
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   549
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpecForNewImage
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   550
     ImageEditor new openInterface:#windowSpecForNewImage
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   551
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   552
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   553
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   554
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   555
    ^
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   556
     
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   557
       #(#FullSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   558
          #'window:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   559
           #(#WindowSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   560
              #'name:' 'New Image'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   561
              #'layout:' #(#LayoutFrame 194 0 152 0 461 0 248 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   562
              #'label:' 'New Image'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   563
              #'min:' #(#Point 10 10)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   564
              #'max:' #(#Point 1152 900)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   565
              #'bounds:' #(#Rectangle 194 152 462 249)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   566
              #'usePreferredExtent:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   567
          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   568
          #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   569
           #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   570
              #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   571
               #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   572
                 #(#ViewSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   573
                    #'name:' 'View'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   574
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -38 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   575
                    #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   576
                     #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   577
                        #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   578
                         #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   579
                           #(#FramedBoxSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   580
                              #'name:' 'framedBox1'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   581
                              #'layout:' #(#LayoutFrame 1 0.0 1 0.0 0 0.4 55 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   582
                              #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   583
                               #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   584
                                  #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   585
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   586
                                     #(#ComboBoxSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   587
                                        #'name:' 'defaultSizesComboBox'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   588
                                        #'layout:' #(#LayoutFrame 15 0.0 16 0.0 15 1.0 16 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   589
                                        #'model:' #selectionOfSize
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   590
                                        #'type:' #string
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   591
                                        #'comboList:' #listOfDefaultSizes
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   592
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   593
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   594
                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   595
                              #'label:' 'Size'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   596
                              #'labelPosition:' #topLeft
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   597
                              #'style:' #(#FontDescription #helvetica #medium #roman 12)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   598
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   599
                           #(#FramedBoxSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   600
                              #'name:' 'framedBox2'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   601
                              #'layout:' #(#LayoutFrame 0 0.4 1 0.0 -1 1.0 55 0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   602
                              #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   603
                               #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   604
                                  #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   605
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   606
                                     #(#ComboListSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   607
                                        #'name:' 'colorMapComboBox'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   608
                                        #'layout:' #(#LayoutFrame 15 0.0 16 0.0 15 1.0 16 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   609
                                        #'model:' #selectionOfColorMap
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   610
                                        #'comboList:' #listOfColorMaps
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   611
                                        #'useIndex:' false
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   612
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   613
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   614
                              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   615
                              #'label:' 'Color Map'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   616
                              #'labelPosition:' #topLeft
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   617
                              #'style:' #(#FontDescription #helvetica #medium #roman 12)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   618
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   619
                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   620
                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   621
                    #'level:' 1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   622
                )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   623
                 #(#HorizontalPanelViewSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   624
                    #'name:' 'horizontalPanelView1'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   625
                    #'layout:' #(#LayoutFrame 0 0.0 -38 1 0 1.0 0 1.0)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   626
                    #'component:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   627
                     #(#SpecCollection
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   628
                        #'collection:' 
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   629
                         #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   630
                           #(#ActionButtonSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   631
                              #'name:' 'actionButton2'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   632
                              #'label:' 'Cancel'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   633
                              #'model:' #cancel
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   634
                              #'extent:' #(#Point 100 22)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   635
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   636
                           #(#ActionButtonSpec
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   637
                              #'name:' 'actionButton1'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   638
                              #'label:' 'OK'
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   639
                              #'model:' #accept
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   640
                              #'isDefault:' true
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   641
                              #'extent:' #(#Point 100 22)
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   642
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   643
                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   644
                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   645
                    #'horizontalLayout:' #center
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   646
                    #'verticalLayout:' #center
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   647
                    #'horizontalSpace:' 2
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   648
                    #'verticalSpace:' 1
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   649
                )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   650
              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   651
          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   652
      )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   653
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   654
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   655
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   656
400
228524287573 intitial checkin
tz
parents:
diff changeset
   657
menu
228524287573 intitial checkin
tz
parents:
diff changeset
   658
    "this window spec was automatically generated by the ST/X MenuEditor"
228524287573 intitial checkin
tz
parents:
diff changeset
   659
228524287573 intitial checkin
tz
parents:
diff changeset
   660
    "do not manually edit this - the builder may not be able to
228524287573 intitial checkin
tz
parents:
diff changeset
   661
     handle the specification if its corrupted."
228524287573 intitial checkin
tz
parents:
diff changeset
   662
228524287573 intitial checkin
tz
parents:
diff changeset
   663
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   664
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
   665
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
   666
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   667
228524287573 intitial checkin
tz
parents:
diff changeset
   668
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
   669
228524287573 intitial checkin
tz
parents:
diff changeset
   670
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   671
     
228524287573 intitial checkin
tz
parents:
diff changeset
   672
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   673
          
228524287573 intitial checkin
tz
parents:
diff changeset
   674
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
   675
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   676
                #'label:' 'About'
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
   677
                #'labelImage:' #(#ResourceRetriever nil #menuIcon)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   678
                #'submenuChannel:' #menuAbout
228524287573 intitial checkin
tz
parents:
diff changeset
   679
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   680
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   681
                #'label:' 'File'
228524287573 intitial checkin
tz
parents:
diff changeset
   682
                #'translateLabel:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   683
                #'submenu:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   684
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   685
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   686
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   687
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   688
                          #'label:' 'New...'
228524287573 intitial checkin
tz
parents:
diff changeset
   689
                          #'value:' #newImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   690
                          #'activeHelpKey:' #fileNewImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   691
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   692
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   693
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   694
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   695
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   696
                          #'label:' 'Load From File...'
228524287573 intitial checkin
tz
parents:
diff changeset
   697
                          #'value:' #loadFromFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   698
                          #'activeHelpKey:' #fileLoadFromFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   699
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   700
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   701
                          #'label:' 'Load From Class...'
228524287573 intitial checkin
tz
parents:
diff changeset
   702
                          #'value:' #loadFromClass
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   703
                          #'activeHelpKey:' #fileLoadFromClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   704
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   705
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   706
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   707
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   708
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   709
                          #'label:' 'Save'
228524287573 intitial checkin
tz
parents:
diff changeset
   710
                          #'value:' #saveImageFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   711
                          #'activeHelpKey:' #fileSaveFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   712
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   713
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   714
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   715
                          #'label:' 'Save As...'
228524287573 intitial checkin
tz
parents:
diff changeset
   716
                          #'value:' #saveImageFileAs
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   717
                          #'activeHelpKey:' #fileSaveAs
400
228524287573 intitial checkin
tz
parents:
diff changeset
   718
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   719
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   720
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   721
                          #'label:' 'Save Mask As...'
228524287573 intitial checkin
tz
parents:
diff changeset
   722
                          #'value:' #saveImageMaskFileAs
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   723
                          #'activeHelpKey:' #fileSaveMaskAs
400
228524287573 intitial checkin
tz
parents:
diff changeset
   724
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   725
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   726
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   727
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   728
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   729
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   730
                          #'label:' 'Save Method'
228524287573 intitial checkin
tz
parents:
diff changeset
   731
                          #'value:' #saveMethod
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   732
                          #'activeHelpKey:' #fileSaveMethod
400
228524287573 intitial checkin
tz
parents:
diff changeset
   733
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   734
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   735
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   736
                          #'label:' 'Save Method As...'
228524287573 intitial checkin
tz
parents:
diff changeset
   737
                          #'value:' #saveMethodAs
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   738
                          #'activeHelpKey:' #fileSaveMethodAs
400
228524287573 intitial checkin
tz
parents:
diff changeset
   739
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   740
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   741
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   742
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   743
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   744
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   745
                          #'label:' 'Print'
228524287573 intitial checkin
tz
parents:
diff changeset
   746
                          #'value:' #print
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   747
                          #'activeHelpKey:' #filePrint
400
228524287573 intitial checkin
tz
parents:
diff changeset
   748
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   749
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   750
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   751
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   752
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   753
                       #(#MenuItem
499
da5c2e271d1a load from superclass removed
tz
parents: 497
diff changeset
   754
                          #'label:' 'Browse Image Class'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   755
                          #'value:' #browseClass
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   756
                          #'activeHelpKey:' #fileBrowseClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   757
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   758
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   759
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   760
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   761
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   762
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   763
                          #'label:' 'Exit'
228524287573 intitial checkin
tz
parents:
diff changeset
   764
                          #'translateLabel:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   765
                          #'value:' #closeRequest
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   766
                          #'activeHelpKey:' #fileExit
400
228524287573 intitial checkin
tz
parents:
diff changeset
   767
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   768
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   769
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   770
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   771
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   772
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   773
                #'label:' 'Edit'
228524287573 intitial checkin
tz
parents:
diff changeset
   774
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   775
                #'submenu:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   776
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   777
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   778
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   779
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   780
                          #'label:' 'Undo'
228524287573 intitial checkin
tz
parents:
diff changeset
   781
                          #'value:' #undo
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   782
                          #'activeHelpKey:' #editUndo
400
228524287573 intitial checkin
tz
parents:
diff changeset
   783
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   784
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   785
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   786
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   787
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   788
                          #'label:' 'Flip - Vertical'
228524287573 intitial checkin
tz
parents:
diff changeset
   789
                          #'value:' #flipVertical
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   790
                          #'activeHelpKey:' #editFlipVertical
400
228524287573 intitial checkin
tz
parents:
diff changeset
   791
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   792
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   793
                          #'label:' 'Flip - Horizontal'
228524287573 intitial checkin
tz
parents:
diff changeset
   794
                          #'value:' #flipHorizontal
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   795
                          #'activeHelpKey:' #editFlipHorizontal
400
228524287573 intitial checkin
tz
parents:
diff changeset
   796
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   797
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   798
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   799
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   800
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   801
                          #'label:' 'Resize...'
228524287573 intitial checkin
tz
parents:
diff changeset
   802
                          #'value:' #resizeImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   803
                          #'activeHelpKey:' #editResize
400
228524287573 intitial checkin
tz
parents:
diff changeset
   804
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   805
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   806
                          #'label:' 'Magnify...'
228524287573 intitial checkin
tz
parents:
diff changeset
   807
                          #'value:' #magnifyImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   808
                          #'activeHelpKey:' #editMagnifyImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   809
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   810
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   811
                          #'label:' 'Rotate...'
228524287573 intitial checkin
tz
parents:
diff changeset
   812
                          #'value:' #rotateImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   813
                          #'activeHelpKey:' #editRotate
400
228524287573 intitial checkin
tz
parents:
diff changeset
   814
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   815
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   816
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   817
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   818
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   819
                          #'label:' 'Negative'
228524287573 intitial checkin
tz
parents:
diff changeset
   820
                          #'value:' #negativeImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   821
                          #'activeHelpKey:' #editNegate
400
228524287573 intitial checkin
tz
parents:
diff changeset
   822
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   823
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   824
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   825
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   826
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   827
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   828
                #'label:' 'Color Map'
228524287573 intitial checkin
tz
parents:
diff changeset
   829
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   830
                #'submenu:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   831
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   832
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   833
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   834
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   835
                          #'label:' '8-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   836
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   837
                          #'argument:' '8-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   838
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   839
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   840
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   841
                          #'label:' '4-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   842
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   843
                          #'argument:' '4-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   844
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   845
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   846
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   847
                          #'label:' '2-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   848
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   849
                          #'argument:' '2-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   850
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   851
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   852
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   853
                          #'label:' '1-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   854
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   855
                          #'argument:' '1-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   856
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   857
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   858
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   859
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   860
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   861
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   862
                          #'label:' '8-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   863
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   864
                          #'argument:' '8-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   865
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   866
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   867
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   868
                          #'label:' '4-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   869
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   870
                          #'argument:' '4-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   871
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   872
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   873
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   874
                          #'label:' '2-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   875
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   876
                          #'argument:' '2-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   877
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   878
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   879
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   880
                          #'label:' '1-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   881
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   882
                          #'argument:' '1-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   883
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   884
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   885
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   886
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   887
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   888
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   889
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   890
                #'label:' 'History'
228524287573 intitial checkin
tz
parents:
diff changeset
   891
                #'submenuChannel:' #menuHistory
228524287573 intitial checkin
tz
parents:
diff changeset
   892
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   893
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   894
                #'label:' 'Help'
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
   895
                #'startGroup:' #right
400
228524287573 intitial checkin
tz
parents:
diff changeset
   896
                #'submenuChannel:' #menuHelp
228524287573 intitial checkin
tz
parents:
diff changeset
   897
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   898
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   899
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
   900
      )
228524287573 intitial checkin
tz
parents:
diff changeset
   901
!
228524287573 intitial checkin
tz
parents:
diff changeset
   902
228524287573 intitial checkin
tz
parents:
diff changeset
   903
menuColorAssignment
228524287573 intitial checkin
tz
parents:
diff changeset
   904
    "this window spec was automatically generated by the ST/X MenuEditor"
228524287573 intitial checkin
tz
parents:
diff changeset
   905
228524287573 intitial checkin
tz
parents:
diff changeset
   906
    "do not manually edit this - the builder may not be able to
228524287573 intitial checkin
tz
parents:
diff changeset
   907
     handle the specification if its corrupted."
228524287573 intitial checkin
tz
parents:
diff changeset
   908
228524287573 intitial checkin
tz
parents:
diff changeset
   909
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   910
     MenuEditor new openOnClass:ImageEditor andSelector:#menuColorAssignment
228524287573 intitial checkin
tz
parents:
diff changeset
   911
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuColorAssignment)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
   912
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   913
228524287573 intitial checkin
tz
parents:
diff changeset
   914
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
   915
228524287573 intitial checkin
tz
parents:
diff changeset
   916
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   917
     
228524287573 intitial checkin
tz
parents:
diff changeset
   918
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   919
          
228524287573 intitial checkin
tz
parents:
diff changeset
   920
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
   921
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   922
                #'label:' 'left'
228524287573 intitial checkin
tz
parents:
diff changeset
   923
                #'nameKey:' #leftMouseKeyButton
228524287573 intitial checkin
tz
parents:
diff changeset
   924
                #'argument:' '1'
228524287573 intitial checkin
tz
parents:
diff changeset
   925
                #'labelImage:' #(#ResourceRetriever nil #leftMouseKeyIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   926
                #'indication:' #'mouseKeyColorMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   927
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   928
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   929
                #'label:' 'right'
228524287573 intitial checkin
tz
parents:
diff changeset
   930
                #'nameKey:' #rightMouseKeyButton
228524287573 intitial checkin
tz
parents:
diff changeset
   931
                #'argument:' '2'
228524287573 intitial checkin
tz
parents:
diff changeset
   932
                #'labelImage:' #(#ResourceRetriever nil #rightMouseKeyIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   933
                #'indication:' #'mouseKeyColorMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   934
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   935
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   936
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
   937
      )
228524287573 intitial checkin
tz
parents:
diff changeset
   938
!
228524287573 intitial checkin
tz
parents:
diff changeset
   939
228524287573 intitial checkin
tz
parents:
diff changeset
   940
menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
   941
    "this window spec was automatically generated by the ST/X MenuEditor"
228524287573 intitial checkin
tz
parents:
diff changeset
   942
228524287573 intitial checkin
tz
parents:
diff changeset
   943
    "do not manually edit this - the builder may not be able to
228524287573 intitial checkin
tz
parents:
diff changeset
   944
     handle the specification if its corrupted."
228524287573 intitial checkin
tz
parents:
diff changeset
   945
228524287573 intitial checkin
tz
parents:
diff changeset
   946
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   947
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
   948
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
   949
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   950
228524287573 intitial checkin
tz
parents:
diff changeset
   951
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
   952
228524287573 intitial checkin
tz
parents:
diff changeset
   953
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   954
     
228524287573 intitial checkin
tz
parents:
diff changeset
   955
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   956
          
228524287573 intitial checkin
tz
parents:
diff changeset
   957
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
   958
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   959
                #'label:' 'newImage'
228524287573 intitial checkin
tz
parents:
diff changeset
   960
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   961
                #'value:' #newImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   962
                #'activeHelpKey:' #fileNewImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   963
                #'labelImage:' #(#ResourceRetriever nil #newImageIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   964
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   965
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   966
                #'label:' 'loadFromClass'
228524287573 intitial checkin
tz
parents:
diff changeset
   967
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   968
                #'value:' #loadFromClass
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   969
                #'activeHelpKey:' #fileLoadFromClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   970
                #'labelImage:' #(#ResourceRetriever nil #loadFromClassIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   971
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   972
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   973
                #'label:' 'loadFromFile'
228524287573 intitial checkin
tz
parents:
diff changeset
   974
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   975
                #'value:' #loadFromFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   976
                #'activeHelpKey:' #fileLoadFromFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   977
                #'labelImage:' #(#ResourceRetriever nil #loadFromFileIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   978
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   979
             #(#MenuItem
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   980
                #'label:' ''
400
228524287573 intitial checkin
tz
parents:
diff changeset
   981
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   982
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   983
                #'label:' 'saveMethod'
228524287573 intitial checkin
tz
parents:
diff changeset
   984
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   985
                #'value:' #saveMethod
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   986
                #'activeHelpKey:' #fileSaveMethod
400
228524287573 intitial checkin
tz
parents:
diff changeset
   987
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   988
                #'labelImage:' #(#ResourceRetriever nil #saveAsMethodIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   989
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   990
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   991
                #'label:' 'saveFile'
228524287573 intitial checkin
tz
parents:
diff changeset
   992
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   993
                #'value:' #saveImageFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   994
                #'activeHelpKey:' #fileSaveFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   995
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   996
                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   997
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   998
             #(#MenuItem
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   999
                #'label:' ''
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1000
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1001
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
  1002
                #'label:' 'Point'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
  1003
                #'activeHelpKey:' #drawModePoint
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1004
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1005
                #'argument:' 'point'
228524287573 intitial checkin
tz
parents:
diff changeset
  1006
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
  1007
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1008
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
  1009
                #'label:' 'Box'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
  1010
                #'activeHelpKey:' #drawModeBox
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1011
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1012
                #'argument:' 'box'
228524287573 intitial checkin
tz
parents:
diff changeset
  1013
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
  1014
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1015
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
  1016
                #'label:' 'Filled Box'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
  1017
                #'activeHelpKey:' #drawModeFilledBox
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1018
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1019
                #'argument:' 'filledBox'
228524287573 intitial checkin
tz
parents:
diff changeset
  1020
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
  1021
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1022
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
  1023
                #'label:' 'Fill'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
  1024
                #'activeHelpKey:' #drawModeFill
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1025
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1026
                #'argument:' 'fill'
228524287573 intitial checkin
tz
parents:
diff changeset
  1027
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
  1028
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1029
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
  1030
                #'label:' 'Copy'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
  1031
                #'activeHelpKey:' #drawModeCopy
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1032
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1033
                #'argument:' 'copy'
228524287573 intitial checkin
tz
parents:
diff changeset
  1034
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
  1035
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1036
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
  1037
                #'label:' 'Paste'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
  1038
                #'activeHelpKey:' #drawModePaste
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1039
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1040
                #'argument:' 'paste'
228524287573 intitial checkin
tz
parents:
diff changeset
  1041
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
  1042
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1043
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
  1044
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
  1045
      )
228524287573 intitial checkin
tz
parents:
diff changeset
  1046
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1047
228524287573 intitial checkin
tz
parents:
diff changeset
  1048
!ImageEditor class methodsFor:'resources'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1049
228524287573 intitial checkin
tz
parents:
diff changeset
  1050
leftMouseKeyIcon
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1051
    "Generated by the Image Editor"
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1052
    "
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1053
    ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1054
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1055
228524287573 intitial checkin
tz
parents:
diff changeset
  1056
    <resource: #image>
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1057
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1058
    ^Icon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1059
        constantNamed:#'ImageEditor leftMouseKeyIcon'
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1060
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JEE@@B!!QP@@(TT@@@@@@@AUUP@@UUT@@EUU@@AUUP@@UUT@@EUU@@@UU@@@@@@@@@@@@@@a'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); yourself)); 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]!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1061
228524287573 intitial checkin
tz
parents:
diff changeset
  1062
loadFromClassIcon
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1063
    "Generated by the Image Editor"
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1064
    "
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1065
    ImageEditor openOnClass:self andSelector:#loadFromClassIcon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1066
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1067
228524287573 intitial checkin
tz
parents:
diff changeset
  1068
    <resource: #image>
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1069
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1070
    ^Icon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1071
        constantNamed:#'ImageEditor loadFromClassIcon'
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1072
        ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQDQDQDQDQDQDQDQ@@@@@@@@@ADQDQDO????????G!!DQDP????????<^8QDQC4QG]4)G51DQDQDOQD]7)J5=??8QDP=DQ7]JQ=_??!!DQC3L6Y#$61/?>DQDOL3Y&$91,??8QDP<3M&X9M,[??!!DQC2H%UR %-_?>DQDOH"UU (-[??8QDP<"IUT(I[W??!!DQC??????????>DQDOD_G?G?D_D_8QDP<_<_G1<_<_?!!DQC1?1<QG1G1G>DQDOG?G1<_<_<_8QDP<Q<QG1<Q<Q?!!DQC??????????>DQG>;.;.;.;.;.8QDQDQDQDQDQDQDQDb'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); add:(Color black); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8'); yourself); yourself]!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1073
228524287573 intitial checkin
tz
parents:
diff changeset
  1074
loadFromFileIcon
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1075
    "Generated by the Image Editor"
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1076
    "
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1077
    ImageEditor openOnClass:self andSelector:#loadFromFileIcon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1078
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1079
228524287573 intitial checkin
tz
parents:
diff changeset
  1080
    <resource: #image>
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1081
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1082
    ^Icon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1083
        constantNamed:#'ImageEditor loadFromFileIcon'
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1084
        ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQDQDQDQDQDQDQDQ@@@@@@@@@ADQDQDO????????G!!DQDP????????<^8QDQC4QG]4)G51DQDQDOQD]7)J5=??8QDP=DQ7]JQ=_??!!DQC3L6Y#$61/?>DQDOL3Y&$91,??8QDP<3M&X9M,[??!!DQC2H%UR %-_?>DQDOH"UU (-[??8QDP<"IUT(I[W??!!DQC??????????>DQDODQ<_<_?1D_8QDP<_?1?1??G??!!DQC1G?G?G?<Q?>DQDOG?<_<_?1??8QDP<_?1?1D_DQ?!!DQC??????????>DQG>;.;.;.;.;.8QDQDQDQDQDQDQDQDb'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); add:(Color black); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8'); yourself); yourself]!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1085
228524287573 intitial checkin
tz
parents:
diff changeset
  1086
newImageIcon
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1087
    "Generated by the Image Editor"
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1088
    "
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1089
    ImageEditor openOnClass:self andSelector:#newImageIcon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1090
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1091
228524287573 intitial checkin
tz
parents:
diff changeset
  1092
    <resource: #image>
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1093
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1094
    ^Icon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1095
        constantNamed:#'ImageEditor newImageIcon'
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1096
        ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQDQDQDQDQDQDQDQ@@@@@@@@@ADQDQDO????????G!!DQDP????????<^8QDQC4QG]4)G51DQDQDOQD]7)J5=??8QDP=DQ7]JQ=_??!!DQC3L6Y#$61/?>DQDOL3Y&$91,??8QDP<3M&X9M,[??!!DQC2H%UR %-_?>DQDOH"UU (-[??8QDP<"IUT(I[W??!!DQC??????????>DQDOG?G1D_G1<_8QDP<Q<_G?<_G1?!!DQC1DQ<Q?1<_G>DQDOG1G1??G1<_8QDP<_<_DQ?1<_?!!DQC??????????>DQG>;.;.;.;.;.8QDQDQDQDQDQDQDQDb'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); add:(Color black); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8'); yourself); yourself]!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1097
228524287573 intitial checkin
tz
parents:
diff changeset
  1098
rightMouseKeyIcon
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1099
    "Generated by the Image Editor"
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1100
    "
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1101
    ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1102
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1103
228524287573 intitial checkin
tz
parents:
diff changeset
  1104
    <resource: #image>
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1105
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1106
    ^Icon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1107
        constantNamed:#'ImageEditor rightMouseKeyIcon'
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1108
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@AUUP@@UUT@@EUU@@AUUP@@UUT@@EUU@@@UU@@@@@@@@@@@@@@a'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); yourself)); 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]!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1109
228524287573 intitial checkin
tz
parents:
diff changeset
  1110
saveAsMethodIcon
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1111
    "Generated by the Image Editor"
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1112
    "
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1113
    ImageEditor openOnClass:self andSelector:#saveAsMethodIcon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1114
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1115
228524287573 intitial checkin
tz
parents:
diff changeset
  1116
    <resource: #image>
488
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1117
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1118
    ^Icon
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1119
        constantNamed:#'ImageEditor saveAsMethodIcon'
147bf8fe5456 new icon method format applied
tz
parents: 487
diff changeset
  1120
        ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQD^8QDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDQDTQG]4)G5>G!!DQDQQD]7)J5=G!!DQDQEDQ7]JQ=_!!8QDQDSL6Y#$61 <ADQDQL3Y&$91,<ODQDQD3M&X9M,XO@QDQDRH%UR %-^;!!DQDQH"UU (-[;.DQDQD"IUT(I[W.8b'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); add:(Color black); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@H@@@@@@@H3N@ID)@ID)@D3I@@@@@@@@@A @@A @@BP@@@@@@@_?<@_?<@_?<@_?<@_?<@_?<@_?<@_?<@_?<'); yourself); yourself]! !
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1121
228524287573 intitial checkin
tz
parents:
diff changeset
  1122
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1123
228524287573 intitial checkin
tz
parents:
diff changeset
  1124
image
228524287573 intitial checkin
tz
parents:
diff changeset
  1125
228524287573 intitial checkin
tz
parents:
diff changeset
  1126
    ^self imageEditView image
228524287573 intitial checkin
tz
parents:
diff changeset
  1127
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1128
228524287573 intitial checkin
tz
parents:
diff changeset
  1129
postOpenAction: anAction
228524287573 intitial checkin
tz
parents:
diff changeset
  1130
228524287573 intitial checkin
tz
parents:
diff changeset
  1131
    postOpenAction := anAction
228524287573 intitial checkin
tz
parents:
diff changeset
  1132
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1133
228524287573 intitial checkin
tz
parents:
diff changeset
  1134
!ImageEditor methodsFor:'accessing - views'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1135
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1136
coordLabel
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1137
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1138
    ^builder componentAt: #coordLabel
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1139
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1140
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1141
fileNameInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1142
228524287573 intitial checkin
tz
parents:
diff changeset
  1143
    ^builder componentAt: #fileNameInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1144
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1145
228524287573 intitial checkin
tz
parents:
diff changeset
  1146
imageEditView
228524287573 intitial checkin
tz
parents:
diff changeset
  1147
228524287573 intitial checkin
tz
parents:
diff changeset
  1148
    ^(builder componentAt: #imageEditView) subViews first 
228524287573 intitial checkin
tz
parents:
diff changeset
  1149
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1150
228524287573 intitial checkin
tz
parents:
diff changeset
  1151
imagePreView
228524287573 intitial checkin
tz
parents:
diff changeset
  1152
228524287573 intitial checkin
tz
parents:
diff changeset
  1153
    ^(builder componentAt: #imagePreView) subViews first 
228524287573 intitial checkin
tz
parents:
diff changeset
  1154
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1155
228524287573 intitial checkin
tz
parents:
diff changeset
  1156
resourceClassInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1157
228524287573 intitial checkin
tz
parents:
diff changeset
  1158
    ^builder componentAt: #resourceClassInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1159
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1160
228524287573 intitial checkin
tz
parents:
diff changeset
  1161
resourceSelectorInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1162
228524287573 intitial checkin
tz
parents:
diff changeset
  1163
    ^builder componentAt: #resourceSelectorInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1164
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1165
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1166
!ImageEditor methodsFor:'active help'!
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1167
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1168
defaultInfoLabel
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1169
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1170
    |usedColors|
499
da5c2e271d1a load from superclass removed
tz
parents: 497
diff changeset
  1171
    self image isNil ifTrue: [^'No image loaded.'].
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1172
    self image colorMap isNil ifTrue: [usedColors := '?'] ifFalse: [usedColors := self image usedColors size].
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1173
    ^self image width printString, 'x',
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1174
        self image height printString, 'x',
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1175
        (2 raisedTo: self image depth) printString,
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1176
        (self image mask notNil ifTrue: [' (mask + '] ifFalse: ['(']),
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1177
        usedColors printString,
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1178
        ' used colors)'
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1179
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1180
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1181
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1182
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1183
228524287573 intitial checkin
tz
parents:
diff changeset
  1184
imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1185
228524287573 intitial checkin
tz
parents:
diff changeset
  1186
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1187
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1188
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1189
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1190
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1191
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1192
228524287573 intitial checkin
tz
parents:
diff changeset
  1193
listOfColors
228524287573 intitial checkin
tz
parents:
diff changeset
  1194
228524287573 intitial checkin
tz
parents:
diff changeset
  1195
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1196
    (holder := builder bindingAt:#listOfColors) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1197
        builder aspectAt:#listOfColors put:(holder :=  List new).
228524287573 intitial checkin
tz
parents:
diff changeset
  1198
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1199
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1200
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1201
228524287573 intitial checkin
tz
parents:
diff changeset
  1202
selectionOfColor
228524287573 intitial checkin
tz
parents:
diff changeset
  1203
228524287573 intitial checkin
tz
parents:
diff changeset
  1204
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1205
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1206
        builder aspectAt:#selectionOfColor put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  1207
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex).
228524287573 intitial checkin
tz
parents:
diff changeset
  1208
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1209
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1210
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1211
228524287573 intitial checkin
tz
parents:
diff changeset
  1212
valueOfCoordLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1213
228524287573 intitial checkin
tz
parents:
diff changeset
  1214
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1215
    (holder := builder bindingAt:#valueOfCoordLabel) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1216
        builder aspectAt:#valueOfCoordLabel put:(holder :=  ValueHolder new).
228524287573 intitial checkin
tz
parents:
diff changeset
  1217
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1218
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1219
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1220
228524287573 intitial checkin
tz
parents:
diff changeset
  1221
valueOfFileName
228524287573 intitial checkin
tz
parents:
diff changeset
  1222
228524287573 intitial checkin
tz
parents:
diff changeset
  1223
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1224
    (holder := builder bindingAt:#valueOfFileName) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1225
        builder aspectAt:#valueOfFileName put:(holder :=  '' asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1226
        holder addDependent: self
228524287573 intitial checkin
tz
parents:
diff changeset
  1227
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1228
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1229
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1230
228524287573 intitial checkin
tz
parents:
diff changeset
  1231
valueOfMagnification
228524287573 intitial checkin
tz
parents:
diff changeset
  1232
228524287573 intitial checkin
tz
parents:
diff changeset
  1233
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1234
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1235
        builder aspectAt:#valueOfMagnification put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  1236
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
228524287573 intitial checkin
tz
parents:
diff changeset
  1237
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1238
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1239
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1240
228524287573 intitial checkin
tz
parents:
diff changeset
  1241
valueOfResourceClass
228524287573 intitial checkin
tz
parents:
diff changeset
  1242
228524287573 intitial checkin
tz
parents:
diff changeset
  1243
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1244
    (holder := builder bindingAt:#valueOfResourceClass) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1245
        builder aspectAt:#valueOfResourceClass put: (holder := '' asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1246
        holder addDependent: self
228524287573 intitial checkin
tz
parents:
diff changeset
  1247
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1248
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1249
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1250
228524287573 intitial checkin
tz
parents:
diff changeset
  1251
valueOfResourceSelector
228524287573 intitial checkin
tz
parents:
diff changeset
  1252
228524287573 intitial checkin
tz
parents:
diff changeset
  1253
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1254
    (holder := builder bindingAt:#valueOfResourceSelector) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1255
        builder aspectAt:#valueOfResourceSelector put: (holder := '' asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1256
        holder addDependent: self
228524287573 intitial checkin
tz
parents:
diff changeset
  1257
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1258
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1259
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1260
228524287573 intitial checkin
tz
parents:
diff changeset
  1261
!ImageEditor methodsFor:'change & update'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1262
228524287573 intitial checkin
tz
parents:
diff changeset
  1263
update:something with:aParameter from:changedObject
228524287573 intitial checkin
tz
parents:
diff changeset
  1264
228524287573 intitial checkin
tz
parents:
diff changeset
  1265
    something == #value
228524287573 intitial checkin
tz
parents:
diff changeset
  1266
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1267
    [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1268
        (changedObject = self valueOfResourceClass)
228524287573 intitial checkin
tz
parents:
diff changeset
  1269
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1270
        [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1271
            |s what m|
228524287573 intitial checkin
tz
parents:
diff changeset
  1272
            s := self resourceClassInputField contents withoutSpaces.
228524287573 intitial checkin
tz
parents:
diff changeset
  1273
            what := Smalltalk classnameCompletion:s.
228524287573 intitial checkin
tz
parents:
diff changeset
  1274
            self resourceClassInputField contents:what first.
228524287573 intitial checkin
tz
parents:
diff changeset
  1275
            (what at:2) size ~~ 1 ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1276
                Display beep
228524287573 intitial checkin
tz
parents:
diff changeset
  1277
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1278
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1279
        (changedObject = self valueOfResourceClass) | (changedObject = self valueOfResourceSelector)
228524287573 intitial checkin
tz
parents:
diff changeset
  1280
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1281
        [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1282
            self loadFromMessage: self resourceClassInputField contents, ' ', self resourceSelectorInputField contents
228524287573 intitial checkin
tz
parents:
diff changeset
  1283
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1284
        (changedObject = self valueOfFileName)
228524287573 intitial checkin
tz
parents:
diff changeset
  1285
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1286
        [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1287
            self loadFromFile: self fileNameInputField contents
228524287573 intitial checkin
tz
parents:
diff changeset
  1288
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1289
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1290
228524287573 intitial checkin
tz
parents:
diff changeset
  1291
    super update:something with:aParameter from:changedObject
228524287573 intitial checkin
tz
parents:
diff changeset
  1292
228524287573 intitial checkin
tz
parents:
diff changeset
  1293
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1294
228524287573 intitial checkin
tz
parents:
diff changeset
  1295
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1296
228524287573 intitial checkin
tz
parents:
diff changeset
  1297
colorMapMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1298
228524287573 intitial checkin
tz
parents:
diff changeset
  1299
    ^colorMapMode = aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1300
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1301
228524287573 intitial checkin
tz
parents:
diff changeset
  1302
colorMapMode: aMode value: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1303
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1304
    |depth newColorMap newImage image newColors realColorMap oldFileName| 
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1305
228524287573 intitial checkin
tz
parents:
diff changeset
  1306
    newColorMap := self class listOfColorMaps at: aMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1307
    depth := (newColorMap size log: 2) asInteger. 
228524287573 intitial checkin
tz
parents:
diff changeset
  1308
    newImage := (Image implementorForDepth: depth) new.  
228524287573 intitial checkin
tz
parents:
diff changeset
  1309
    oldFileName := self image fileName.
228524287573 intitial checkin
tz
parents:
diff changeset
  1310
    Object errorSignal handle:
228524287573 intitial checkin
tz
parents:
diff changeset
  1311
    [:ex|
228524287573 intitial checkin
tz
parents:
diff changeset
  1312
        Object errorSignal handle:
228524287573 intitial checkin
tz
parents:
diff changeset
  1313
        [:ex|
228524287573 intitial checkin
tz
parents:
diff changeset
  1314
            ^self warn: 'Convertation failed!!'
228524287573 intitial checkin
tz
parents:
diff changeset
  1315
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1316
        do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1317
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1318
            self image colorsFromX:0 y:0 toX:(self image width-1) y:(self image height-1) do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1319
            [:x :y :clr |
228524287573 intitial checkin
tz
parents:
diff changeset
  1320
                (newColorMap includes: clr)
228524287573 intitial checkin
tz
parents:
diff changeset
  1321
                    ifTrue: [self image colorAtX:x y:y put:clr]
228524287573 intitial checkin
tz
parents:
diff changeset
  1322
                    ifFalse: [self image colorAtX:x y:y put: self image colorMap first]
228524287573 intitial checkin
tz
parents:
diff changeset
  1323
            ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1324
            image := newImage fromImage: self image.
228524287573 intitial checkin
tz
parents:
diff changeset
  1325
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1326
    ] 
228524287573 intitial checkin
tz
parents:
diff changeset
  1327
    do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1328
    [ 
228524287573 intitial checkin
tz
parents:
diff changeset
  1329
        image := newImage fromImage: self image
228524287573 intitial checkin
tz
parents:
diff changeset
  1330
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1331
    (String fromString: aMode) reverse readStream nextWord reverse = 'mask'
228524287573 intitial checkin
tz
parents:
diff changeset
  1332
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1333
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1334
        image mask isNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1335
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1336
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1337
            image mask: (Depth1Image fromImage: (image asThresholdMonochromeImage: 0.1)). 
228524287573 intitial checkin
tz
parents:
diff changeset
  1338
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1339
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1340
    ifFalse:
228524287573 intitial checkin
tz
parents:
diff changeset
  1341
    [ 
228524287573 intitial checkin
tz
parents:
diff changeset
  1342
        image mask: nil.
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1343
    ]. 
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1344
    realColorMap := OrderedCollection new.
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1345
    image realColorMap do:
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1346
    [:clr|
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1347
        (realColorMap includes: clr) ifFalse: [realColorMap add: clr]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1348
    ].
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1349
    newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1350
    newColorMap do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1351
    [:clr|
228524287573 intitial checkin
tz
parents:
diff changeset
  1352
        ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
228524287573 intitial checkin
tz
parents:
diff changeset
  1353
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1354
        [      
228524287573 intitial checkin
tz
parents:
diff changeset
  1355
            newColors add: clr
228524287573 intitial checkin
tz
parents:
diff changeset
  1356
        ]
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1357
    ].       
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1358
    image colorMap: newColors.
228524287573 intitial checkin
tz
parents:
diff changeset
  1359
    colorMapMode := aMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1360
    (self imageEditView image: image) notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1361
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1362
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1363
        self image fileName: oldFileName.
228524287573 intitial checkin
tz
parents:
diff changeset
  1364
        self listOfColors contents: image colorMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  1365
        self findColorMapMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1366
        self updateInputFieldsAndLabelsAndHistory.
228524287573 intitial checkin
tz
parents:
diff changeset
  1367
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1368
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1369
228524287573 intitial checkin
tz
parents:
diff changeset
  1370
editMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1371
228524287573 intitial checkin
tz
parents:
diff changeset
  1372
    ^self imageEditView editMode = aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1373
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1374
228524287573 intitial checkin
tz
parents:
diff changeset
  1375
editMode: aMode value: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1376
228524287573 intitial checkin
tz
parents:
diff changeset
  1377
    self imageEditView editMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1378
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1379
228524287573 intitial checkin
tz
parents:
diff changeset
  1380
mouseKeyColorMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1381
228524287573 intitial checkin
tz
parents:
diff changeset
  1382
    ^self imageEditView mouseKeyColorMode = aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1383
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1384
228524287573 intitial checkin
tz
parents:
diff changeset
  1385
mouseKeyColorMode: aMode value: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1386
228524287573 intitial checkin
tz
parents:
diff changeset
  1387
    self imageEditView mouseKeyColorMode: aMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1388
228524287573 intitial checkin
tz
parents:
diff changeset
  1389
    self selectionOfColor value: (self listOfColors indexOf: self imageEditView selectedColor).
228524287573 intitial checkin
tz
parents:
diff changeset
  1390
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1391
228524287573 intitial checkin
tz
parents:
diff changeset
  1392
!ImageEditor methodsFor:'private'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1393
228524287573 intitial checkin
tz
parents:
diff changeset
  1394
findColorMapMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1395
228524287573 intitial checkin
tz
parents:
diff changeset
  1396
    self image depth > 8 ifTrue: [colorMapMode := ''. self listOfColors removeAll. ^nil].
228524287573 intitial checkin
tz
parents:
diff changeset
  1397
    colorMapMode := self image depth printString, '-plane'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1398
    self listOfColors isEmpty
228524287573 intitial checkin
tz
parents:
diff changeset
  1399
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1400
    [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1401
         self colorMapMode: colorMapMode value: nil
228524287573 intitial checkin
tz
parents:
diff changeset
  1402
    ].       
228524287573 intitial checkin
tz
parents:
diff changeset
  1403
    self imageEditView selectColor: (Array with: (self listOfColors at: 1) with: (self listOfColors at: 2)).
228524287573 intitial checkin
tz
parents:
diff changeset
  1404
    self image mask notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1405
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1406
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1407
        colorMapMode := colorMapMode, ' + mask'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1408
        self listOfColors addFirst: (Color basicNew setColorId:0).
228524287573 intitial checkin
tz
parents:
diff changeset
  1409
        self imageEditView selectColor: (Array with: (self listOfColors at: 2) with: (self listOfColors at: 1)).
228524287573 intitial checkin
tz
parents:
diff changeset
  1410
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1411
    self selectionOfColor value: 0.
228524287573 intitial checkin
tz
parents:
diff changeset
  1412
    self selectionOfColor value: (self listOfColors indexOf: self imageEditView selectedColor).
228524287573 intitial checkin
tz
parents:
diff changeset
  1413
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1414
228524287573 intitial checkin
tz
parents:
diff changeset
  1415
sortColorColumn: aColumn
228524287573 intitial checkin
tz
parents:
diff changeset
  1416
228524287573 intitial checkin
tz
parents:
diff changeset
  1417
228524287573 intitial checkin
tz
parents:
diff changeset
  1418
228524287573 intitial checkin
tz
parents:
diff changeset
  1419
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1420
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1421
updateForNoneImage
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1422
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1423
    self imageIsLoaded value: false.
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1424
    self listOfColors removeAll.
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1425
    self imagePreView image: nil
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1426
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1427
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1428
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1429
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1430
!
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1431
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1432
updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1433
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1434
    self valueOfInfoLabel value: self defaultInfoLabel
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1435
228524287573 intitial checkin
tz
parents:
diff changeset
  1436
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1437
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1438
updateInputFields
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1439
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1440
    self valueOfResourceSelector removeDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1441
    self valueOfResourceSelector value: self imageEditView resourceSelector.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1442
    self valueOfResourceSelector addDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1443
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1444
    self valueOfResourceClass removeDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1445
    self imageEditView resourceClass notNil
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1446
        ifTrue: [self valueOfResourceClass value: self imageEditView resourceClass]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1447
        ifFalse: [self valueOfResourceClass value: ''].
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1448
    self valueOfResourceClass addDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1449
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1450
!
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1451
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1452
updateInputFieldsAndLabelsAndHistory
228524287573 intitial checkin
tz
parents:
diff changeset
  1453
228524287573 intitial checkin
tz
parents:
diff changeset
  1454
    self imageIsLoaded value: self image notNil.
228524287573 intitial checkin
tz
parents:
diff changeset
  1455
228524287573 intitial checkin
tz
parents:
diff changeset
  1456
    self image isNil ifTrue: [^nil].
228524287573 intitial checkin
tz
parents:
diff changeset
  1457
228524287573 intitial checkin
tz
parents:
diff changeset
  1458
    self updateInfoLabel.
228524287573 intitial checkin
tz
parents:
diff changeset
  1459
228524287573 intitial checkin
tz
parents:
diff changeset
  1460
    self valueOfFileName removeDependent: self.
228524287573 intitial checkin
tz
parents:
diff changeset
  1461
    self valueOfFileName value: self image fileName.
228524287573 intitial checkin
tz
parents:
diff changeset
  1462
    self valueOfFileName addDependent: self.
228524287573 intitial checkin
tz
parents:
diff changeset
  1463
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1464
    self updateInputFields.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1465
228524287573 intitial checkin
tz
parents:
diff changeset
  1466
    self imageEditView resourceMessage asCollectionOfWords size = 2
228524287573 intitial checkin
tz
parents:
diff changeset
  1467
        ifTrue: [self addToHistory: self imageEditView resourceMessage -> #loadFromMessage:].
228524287573 intitial checkin
tz
parents:
diff changeset
  1468
228524287573 intitial checkin
tz
parents:
diff changeset
  1469
    self image fileName notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1470
        ifTrue: [self addToHistory: self image fileName -> #loadFromFile:].
228524287573 intitial checkin
tz
parents:
diff changeset
  1471
228524287573 intitial checkin
tz
parents:
diff changeset
  1472
228524287573 intitial checkin
tz
parents:
diff changeset
  1473
228524287573 intitial checkin
tz
parents:
diff changeset
  1474
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1475
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1476
!ImageEditor methodsFor:'queries'!
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1477
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1478
preferredExtent
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1479
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1480
    ^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5)
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1481
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1482
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1483
! !
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  1484
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1485
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1486
228524287573 intitial checkin
tz
parents:
diff changeset
  1487
magnification
228524287573 intitial checkin
tz
parents:
diff changeset
  1488
228524287573 intitial checkin
tz
parents:
diff changeset
  1489
    (builder componentAt: #imageEditView) isNil ifTrue: [^1].
228524287573 intitial checkin
tz
parents:
diff changeset
  1490
    ^self imageEditView magnification x
228524287573 intitial checkin
tz
parents:
diff changeset
  1491
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1492
228524287573 intitial checkin
tz
parents:
diff changeset
  1493
magnification: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1494
228524287573 intitial checkin
tz
parents:
diff changeset
  1495
    |magnification|
228524287573 intitial checkin
tz
parents:
diff changeset
  1496
    magnification := aValue asInteger asPoint.
228524287573 intitial checkin
tz
parents:
diff changeset
  1497
    (magnification = self imageEditView magnification) | (magnification = (0@0)) ifTrue: [^nil].
228524287573 intitial checkin
tz
parents:
diff changeset
  1498
    self imageEditView magnification: magnification
228524287573 intitial checkin
tz
parents:
diff changeset
  1499
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1500
228524287573 intitial checkin
tz
parents:
diff changeset
  1501
selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  1502
228524287573 intitial checkin
tz
parents:
diff changeset
  1503
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  1504
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1505
228524287573 intitial checkin
tz
parents:
diff changeset
  1506
selectedColorIndex: anIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  1507
228524287573 intitial checkin
tz
parents:
diff changeset
  1508
    selectedColorIndex := anIndex.    
228524287573 intitial checkin
tz
parents:
diff changeset
  1509
    self imageEditView selectedColor: (self listOfColors at: anIndex ifAbsent: [^nil])
228524287573 intitial checkin
tz
parents:
diff changeset
  1510
228524287573 intitial checkin
tz
parents:
diff changeset
  1511
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1512
228524287573 intitial checkin
tz
parents:
diff changeset
  1513
!ImageEditor methodsFor:'startup / release'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1514
228524287573 intitial checkin
tz
parents:
diff changeset
  1515
closeRequest
228524287573 intitial checkin
tz
parents:
diff changeset
  1516
228524287573 intitial checkin
tz
parents:
diff changeset
  1517
    self imageEditView checkModified ifTrue:[super closeRequest]
228524287573 intitial checkin
tz
parents:
diff changeset
  1518
228524287573 intitial checkin
tz
parents:
diff changeset
  1519
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1520
228524287573 intitial checkin
tz
parents:
diff changeset
  1521
open
228524287573 intitial checkin
tz
parents:
diff changeset
  1522
228524287573 intitial checkin
tz
parents:
diff changeset
  1523
    super open.
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  1524
420
7fd01e47c912 unnecessary spec selectors removed
tz
parents: 415
diff changeset
  1525
    self imageEditView masterApplication: self.
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  1526
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1527
    self resourceClassInputField entryCompletionBlock:
228524287573 intitial checkin
tz
parents:
diff changeset
  1528
    [:value|
228524287573 intitial checkin
tz
parents:
diff changeset
  1529
        |what|
228524287573 intitial checkin
tz
parents:
diff changeset
  1530
        what := Smalltalk classnameCompletion: value withoutSpaces.
228524287573 intitial checkin
tz
parents:
diff changeset
  1531
        self resourceClassInputField contents:what first.
228524287573 intitial checkin
tz
parents:
diff changeset
  1532
        (what at:2) size ~~ 1 ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1533
            Display beep
228524287573 intitial checkin
tz
parents:
diff changeset
  1534
        ]
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  1535
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1536
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1537
228524287573 intitial checkin
tz
parents:
diff changeset
  1538
postOpenWith:aBuilder
228524287573 intitial checkin
tz
parents:
diff changeset
  1539
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1540
    self imageEditView masterApplication: self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1541
    postOpenAction notNil ifTrue: [postOpenAction value].
228524287573 intitial checkin
tz
parents:
diff changeset
  1542
    super postOpenWith:aBuilder.
228524287573 intitial checkin
tz
parents:
diff changeset
  1543
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1544
228524287573 intitial checkin
tz
parents:
diff changeset
  1545
reOpen
228524287573 intitial checkin
tz
parents:
diff changeset
  1546
228524287573 intitial checkin
tz
parents:
diff changeset
  1547
    self imageEditView checkModified ifTrue:[super reOpen]
228524287573 intitial checkin
tz
parents:
diff changeset
  1548
228524287573 intitial checkin
tz
parents:
diff changeset
  1549
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1550
228524287573 intitial checkin
tz
parents:
diff changeset
  1551
!ImageEditor methodsFor:'user actions - editing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1552
228524287573 intitial checkin
tz
parents:
diff changeset
  1553
browseClass
228524287573 intitial checkin
tz
parents:
diff changeset
  1554
228524287573 intitial checkin
tz
parents:
diff changeset
  1555
    SystemBrowser openInClass: (Smalltalk at: self imageEditView resourceClass ifAbsent: [^nil]) class selector: self imageEditView resourceSelector
228524287573 intitial checkin
tz
parents:
diff changeset
  1556
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1557
228524287573 intitial checkin
tz
parents:
diff changeset
  1558
flipHorizontal
228524287573 intitial checkin
tz
parents:
diff changeset
  1559
228524287573 intitial checkin
tz
parents:
diff changeset
  1560
    self imageEditView flipHorizontal
228524287573 intitial checkin
tz
parents:
diff changeset
  1561
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1562
228524287573 intitial checkin
tz
parents:
diff changeset
  1563
flipVertical
228524287573 intitial checkin
tz
parents:
diff changeset
  1564
228524287573 intitial checkin
tz
parents:
diff changeset
  1565
    self imageEditView flipVertical
228524287573 intitial checkin
tz
parents:
diff changeset
  1566
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1567
228524287573 intitial checkin
tz
parents:
diff changeset
  1568
magnifyDown
228524287573 intitial checkin
tz
parents:
diff changeset
  1569
228524287573 intitial checkin
tz
parents:
diff changeset
  1570
    self valueOfMagnification value > 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1571
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1572
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1573
        self valueOfMagnification value: self valueOfMagnification value - 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1574
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1575
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1576
228524287573 intitial checkin
tz
parents:
diff changeset
  1577
magnifyImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1578
228524287573 intitial checkin
tz
parents:
diff changeset
  1579
    self imageEditView magnifyImage.   
228524287573 intitial checkin
tz
parents:
diff changeset
  1580
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1581
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1582
228524287573 intitial checkin
tz
parents:
diff changeset
  1583
magnifyUp
228524287573 intitial checkin
tz
parents:
diff changeset
  1584
228524287573 intitial checkin
tz
parents:
diff changeset
  1585
    self valueOfMagnification value < 99
228524287573 intitial checkin
tz
parents:
diff changeset
  1586
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1587
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1588
        self valueOfMagnification value: self valueOfMagnification value + 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1589
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1590
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1591
228524287573 intitial checkin
tz
parents:
diff changeset
  1592
negativeImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1593
228524287573 intitial checkin
tz
parents:
diff changeset
  1594
    self imageEditView negativeImage.
228524287573 intitial checkin
tz
parents:
diff changeset
  1595
    self listOfColors removeAll.
228524287573 intitial checkin
tz
parents:
diff changeset
  1596
    self findColorMapMode.     
228524287573 intitial checkin
tz
parents:
diff changeset
  1597
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1598
228524287573 intitial checkin
tz
parents:
diff changeset
  1599
resizeImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1600
228524287573 intitial checkin
tz
parents:
diff changeset
  1601
    self imageEditView resizeImage.   
228524287573 intitial checkin
tz
parents:
diff changeset
  1602
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1603
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1604
228524287573 intitial checkin
tz
parents:
diff changeset
  1605
rotateImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1606
228524287573 intitial checkin
tz
parents:
diff changeset
  1607
    self imageEditView rotateImage.
228524287573 intitial checkin
tz
parents:
diff changeset
  1608
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1609
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1610
228524287573 intitial checkin
tz
parents:
diff changeset
  1611
undo
228524287573 intitial checkin
tz
parents:
diff changeset
  1612
228524287573 intitial checkin
tz
parents:
diff changeset
  1613
    self imageEditView undo
228524287573 intitial checkin
tz
parents:
diff changeset
  1614
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1615
228524287573 intitial checkin
tz
parents:
diff changeset
  1616
!ImageEditor methodsFor:'user actions - loading'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1617
228524287573 intitial checkin
tz
parents:
diff changeset
  1618
loadFromClass
228524287573 intitial checkin
tz
parents:
diff changeset
  1619
228524287573 intitial checkin
tz
parents:
diff changeset
  1620
    self loadFromInClassesOf: #Object.
228524287573 intitial checkin
tz
parents:
diff changeset
  1621
   
228524287573 intitial checkin
tz
parents:
diff changeset
  1622
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1623
228524287573 intitial checkin
tz
parents:
diff changeset
  1624
loadFromFile
228524287573 intitial checkin
tz
parents:
diff changeset
  1625
228524287573 intitial checkin
tz
parents:
diff changeset
  1626
    self loadFromFile:
228524287573 intitial checkin
tz
parents:
diff changeset
  1627
        (FileSelectionBrowser
228524287573 intitial checkin
tz
parents:
diff changeset
  1628
            request: 'Load Image From' 
228524287573 intitial checkin
tz
parents:
diff changeset
  1629
            fileFilters: FileSelectionBrowser loadImageFileNameFilters)
228524287573 intitial checkin
tz
parents:
diff changeset
  1630
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1631
228524287573 intitial checkin
tz
parents:
diff changeset
  1632
loadFromFile: aFileName
228524287573 intitial checkin
tz
parents:
diff changeset
  1633
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1634
    (self imageEditView loadFromFile: aFileName) notNil
450
845121b3901b if image is nil really clear view
tz
parents: 449
diff changeset
  1635
    ifTrue:
845121b3901b if image is nil really clear view
tz
parents: 449
diff changeset
  1636
    [
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1637
        self image notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1638
        ifTrue:
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1639
        [          
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1640
            self image colorMap notNil
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1641
            ifTrue:
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1642
            [
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1643
                self listOfColors contents: self image usedColors asSet.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1644
            ]
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1645
            ifFalse:
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1646
            [
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1647
                self listOfColors removeAll.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1648
            ].
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1649
            self findColorMapMode.     
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1650
            self updateInputFieldsAndLabelsAndHistory.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1651
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1652
        ifFalse:
228524287573 intitial checkin
tz
parents:
diff changeset
  1653
        [
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1654
            self updateForNoneImage
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1655
        ]
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1656
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1657
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1658
228524287573 intitial checkin
tz
parents:
diff changeset
  1659
loadFromImage: image
228524287573 intitial checkin
tz
parents:
diff changeset
  1660
450
845121b3901b if image is nil really clear view
tz
parents: 449
diff changeset
  1661
    self imageEditView image: image.
845121b3901b if image is nil really clear view
tz
parents: 449
diff changeset
  1662
    self image notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1663
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1664
    [    
228524287573 intitial checkin
tz
parents:
diff changeset
  1665
        self image colorMap notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1666
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1667
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1668
            self listOfColors contents: self image usedColors asSet asOrderedCollection.
228524287573 intitial checkin
tz
parents:
diff changeset
  1669
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1670
        ifFalse:
228524287573 intitial checkin
tz
parents:
diff changeset
  1671
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1672
            self listOfColors removeAll.
228524287573 intitial checkin
tz
parents:
diff changeset
  1673
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1674
        self findColorMapMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1675
        self updateInputFieldsAndLabelsAndHistory.
228524287573 intitial checkin
tz
parents:
diff changeset
  1676
    ]
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1677
    ifFalse:
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1678
    [
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1679
        self updateForNoneImage
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1680
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1681
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1682
228524287573 intitial checkin
tz
parents:
diff changeset
  1683
loadFromInClassesOf: aSuperclassOrSymbol
228524287573 intitial checkin
tz
parents:
diff changeset
  1684
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1685
    (self imageEditView loadFromInClassesOf: aSuperclassOrSymbol) notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1686
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1687
    [
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1688
        self image notNil
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1689
        ifTrue:
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1690
        [
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1691
            self listOfColors contents: self image usedColors asSet asOrderedCollection.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1692
            self findColorMapMode.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1693
            self updateInputFieldsAndLabelsAndHistory.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1694
        ]
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1695
        ifFalse:
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1696
        [
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1697
            self updateForNoneImage
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1698
        ]
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1699
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1700
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1701
228524287573 intitial checkin
tz
parents:
diff changeset
  1702
loadFromMessage: aMessage
228524287573 intitial checkin
tz
parents:
diff changeset
  1703
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1704
    (self imageEditView loadFromMessage: aMessage) notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1705
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1706
    [
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1707
        self image notNil
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1708
        ifTrue:
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1709
        [
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1710
            self listOfColors contents: self image usedColors asSet asOrderedCollection.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1711
            self findColorMapMode.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1712
            self updateInputFieldsAndLabelsAndHistory.
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1713
        ]
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1714
        ifFalse:
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1715
        [
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1716
            self updateForNoneImage
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1717
        ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1718
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1719
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1720
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1721
loadFromOrPrepareForMessage: aMessage
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1722
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1723
    (self imageEditView loadFromMessage: aMessage) notNil
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1724
    ifTrue:
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1725
    [
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1726
        self listOfColors contents: self image usedColors asSet asOrderedCollection.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1727
        self findColorMapMode.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1728
        self updateInputFieldsAndLabelsAndHistory.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1729
    ]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1730
    ifFalse:
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1731
    [
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1732
        self imageEditView resourceMessage: aMessage.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1733
        self updateInputFields.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1734
    ]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1735
!
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1736
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1737
newImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1738
228524287573 intitial checkin
tz
parents:
diff changeset
  1739
    |aspects|
228524287573 intitial checkin
tz
parents:
diff changeset
  1740
    aspects  := IdentityDictionary new
228524287573 intitial checkin
tz
parents:
diff changeset
  1741
        at:#listOfSizes put: self class listOfDefaultSizes asValue;
228524287573 intitial checkin
tz
parents:
diff changeset
  1742
        at:#listOfColorMaps put: self class listOfColorMaps keys asSortedCollection asValue;
228524287573 intitial checkin
tz
parents:
diff changeset
  1743
        at:#selectionOfSize put: self class listOfDefaultSizes first copy asValue;
228524287573 intitial checkin
tz
parents:
diff changeset
  1744
        at:#selectionOfColorMap put: self class listOfColorMaps keys asSortedCollection first asValue;
228524287573 intitial checkin
tz
parents:
diff changeset
  1745
        yourself.
228524287573 intitial checkin
tz
parents:
diff changeset
  1746
228524287573 intitial checkin
tz
parents:
diff changeset
  1747
    (self openDialogInterface:#windowSpecForNewImage withBindings:aspects)
228524287573 intitial checkin
tz
parents:
diff changeset
  1748
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1749
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1750
        |width height cMap imageClass image|
228524287573 intitial checkin
tz
parents:
diff changeset
  1751
        width := 128 min: (Integer readFromString: ((aspects at:#selectionOfSize) value upTo: $x) onError:[24]).
228524287573 intitial checkin
tz
parents:
diff changeset
  1752
        height := 128 min: (Integer readFromString: ((aspects at:#selectionOfSize) value copy reverse upTo: $x) reverse onError:[24]).
228524287573 intitial checkin
tz
parents:
diff changeset
  1753
228524287573 intitial checkin
tz
parents:
diff changeset
  1754
        cMap := (self class listOfColorMaps at: (colorMapMode := (aspects at:#selectionOfColorMap) value)).
228524287573 intitial checkin
tz
parents:
diff changeset
  1755
        imageClass := Image implementorForDepth: ((cMap size log: 2) asInteger).
228524287573 intitial checkin
tz
parents:
diff changeset
  1756
        image := imageClass width: width height: height fromArray: (ByteArray new: width*height).
228524287573 intitial checkin
tz
parents:
diff changeset
  1757
228524287573 intitial checkin
tz
parents:
diff changeset
  1758
        (colorMapMode copy reverse readStream nextWord reverse = 'mask')
228524287573 intitial checkin
tz
parents:
diff changeset
  1759
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1760
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1761
            image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels.
228524287573 intitial checkin
tz
parents:
diff changeset
  1762
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1763
        image colorMap: cMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  1764
        image fillRectangleX:0 y:0 width:width height:height with:Color white.
228524287573 intitial checkin
tz
parents:
diff changeset
  1765
        (self imageEditView image: image) notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1766
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1767
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1768
            self listOfColors contents: cMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  1769
            self findColorMapMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1770
            self updateInputFieldsAndLabelsAndHistory
228524287573 intitial checkin
tz
parents:
diff changeset
  1771
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1772
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1773
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1774
228524287573 intitial checkin
tz
parents:
diff changeset
  1775
!ImageEditor methodsFor:'user actions - saving'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1776
228524287573 intitial checkin
tz
parents:
diff changeset
  1777
print
228524287573 intitial checkin
tz
parents:
diff changeset
  1778
228524287573 intitial checkin
tz
parents:
diff changeset
  1779
    self imageEditView print
228524287573 intitial checkin
tz
parents:
diff changeset
  1780
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1781
228524287573 intitial checkin
tz
parents:
diff changeset
  1782
saveImageFile
228524287573 intitial checkin
tz
parents:
diff changeset
  1783
228524287573 intitial checkin
tz
parents:
diff changeset
  1784
    self imageEditView saveImageFileAs: self fileNameInputField contents
228524287573 intitial checkin
tz
parents:
diff changeset
  1785
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1786
228524287573 intitial checkin
tz
parents:
diff changeset
  1787
saveImageFileAs
228524287573 intitial checkin
tz
parents:
diff changeset
  1788
228524287573 intitial checkin
tz
parents:
diff changeset
  1789
    self imageEditView saveImageFileAs.
228524287573 intitial checkin
tz
parents:
diff changeset
  1790
    self updateInputFieldsAndLabelsAndHistory
228524287573 intitial checkin
tz
parents:
diff changeset
  1791
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1792
228524287573 intitial checkin
tz
parents:
diff changeset
  1793
saveImageMaskFileAs
228524287573 intitial checkin
tz
parents:
diff changeset
  1794
228524287573 intitial checkin
tz
parents:
diff changeset
  1795
    self imageEditView saveImageMaskFileAs
228524287573 intitial checkin
tz
parents:
diff changeset
  1796
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1797
228524287573 intitial checkin
tz
parents:
diff changeset
  1798
saveMethod
228524287573 intitial checkin
tz
parents:
diff changeset
  1799
228524287573 intitial checkin
tz
parents:
diff changeset
  1800
    (self imageEditView 
228524287573 intitial checkin
tz
parents:
diff changeset
  1801
        resourceSelector: self resourceSelectorInputField contents;
228524287573 intitial checkin
tz
parents:
diff changeset
  1802
        resourceClass: self resourceClassInputField contents;
228524287573 intitial checkin
tz
parents:
diff changeset
  1803
        saveMethod) notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1804
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1805
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1806
        self updateInputFieldsAndLabelsAndHistory
228524287573 intitial checkin
tz
parents:
diff changeset
  1807
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1808
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1809
228524287573 intitial checkin
tz
parents:
diff changeset
  1810
saveMethodAs
228524287573 intitial checkin
tz
parents:
diff changeset
  1811
228524287573 intitial checkin
tz
parents:
diff changeset
  1812
    self imageEditView saveMethodAs notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1813
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1814
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1815
        self updateInputFieldsAndLabelsAndHistory
228524287573 intitial checkin
tz
parents:
diff changeset
  1816
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1817
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1818
228524287573 intitial checkin
tz
parents:
diff changeset
  1819
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1820
228524287573 intitial checkin
tz
parents:
diff changeset
  1821
version
228524287573 intitial checkin
tz
parents:
diff changeset
  1822
    ^ '$Header$'
228524287573 intitial checkin
tz
parents:
diff changeset
  1823
! !