ImageEditor.st
author tz
Tue, 27 Jan 1998 15:09:17 +0100
changeset 487 6c336c183330
parent 475 0d5a50fe59f4
child 488 147bf8fe5456
permissions -rw-r--r--
info bar as subSpec to class ToolApplicationModel moved
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
400
228524287573 intitial checkin
tz
parents:
diff changeset
     1
"
228524287573 intitial checkin
tz
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
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
"
228524287573 intitial checkin
tz
parents:
diff changeset
    24
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
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:]
228524287573 intitial checkin
tz
parents:
diff changeset
    48
        Thomas Zwick
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
#editUndo
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   205
'Undoes last action.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   206
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   207
#fileBrowseClass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   208
'Opens the System Browser on the class and the selector.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   209
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   210
#fileLoadFromClass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   211
'Opens a dialog for selecting an image resource method.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   212
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   213
#fileLoadFromClassWithSuperclass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   214
'Opens a dialog for opening the resource dialog on a superclass.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   215
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   216
#fileLoadFromFile
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   217
'Opens a dialog for selecting an image file.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   218
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   219
#fileNewImage
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   220
'Opens a dialog with choices of size and color depth.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   221
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   222
#filePrint
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   223
'Print the image on a postscript printer.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   224
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   225
#fileSaveAs
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   226
'Opens dialog to save the image on a file.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   227
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   228
#fileSaveFile
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   229
'Saves the image on selected file name.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   230
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   231
#fileSaveMaskAs
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   232
'Opens dialog to save the mask of the image on a file.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   233
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   234
#fileSaveMethod
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   235
'Saves current image into selected class and selector.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   236
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   237
#fileSaveMethodAs
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   238
'Opens dialog to save the image on a class and a selector.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   239
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   240
#inputFieldFileName
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   241
'File name of the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   242
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   243
#inputFieldOfClass
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   244
'Class implementing the image method.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   245
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   246
#inputFieldOfSelector
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   247
'Selector of the class returning the image.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   248
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   249
#magnificationNumber
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   250
'Shows current number of magnification.'
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
#magnifyImageDown
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   253
'Magnifies down 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
#magnifyImageUp
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   256
'Magnifies up current image.'
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
#mouseKeyColorMode
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   259
'Toggles between left and right mouse key color.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   260
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   261
#previewView
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   262
'Shows preview of the current image.'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   263
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   264
)
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   265
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   266
400
228524287573 intitial checkin
tz
parents:
diff changeset
   267
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
   268
228524287573 intitial checkin
tz
parents:
diff changeset
   269
menu
228524287573 intitial checkin
tz
parents:
diff changeset
   270
    "this window spec was automatically generated by the ST/X MenuEditor"
228524287573 intitial checkin
tz
parents:
diff changeset
   271
228524287573 intitial checkin
tz
parents:
diff changeset
   272
    "do not manually edit this - the builder may not be able to
228524287573 intitial checkin
tz
parents:
diff changeset
   273
     handle the specification if its corrupted."
228524287573 intitial checkin
tz
parents:
diff changeset
   274
228524287573 intitial checkin
tz
parents:
diff changeset
   275
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   276
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
   277
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
   278
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   279
228524287573 intitial checkin
tz
parents:
diff changeset
   280
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
   281
228524287573 intitial checkin
tz
parents:
diff changeset
   282
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   283
     
228524287573 intitial checkin
tz
parents:
diff changeset
   284
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   285
          
228524287573 intitial checkin
tz
parents:
diff changeset
   286
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
   287
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   288
                #'label:' 'About'
228524287573 intitial checkin
tz
parents:
diff changeset
   289
                #'labelImage:' #(#ResourceRetriever #ImageEditor #icon)
228524287573 intitial checkin
tz
parents:
diff changeset
   290
                #'submenuChannel:' #menuAbout
228524287573 intitial checkin
tz
parents:
diff changeset
   291
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   292
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   293
                #'label:' 'File'
228524287573 intitial checkin
tz
parents:
diff changeset
   294
                #'translateLabel:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   295
                #'submenu:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   296
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   297
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   298
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   299
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   300
                          #'label:' 'New...'
228524287573 intitial checkin
tz
parents:
diff changeset
   301
                          #'value:' #newImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   302
                          #'activeHelpKey:' #fileNewImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   303
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   304
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   305
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   306
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   307
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   308
                          #'label:' 'Load From File...'
228524287573 intitial checkin
tz
parents:
diff changeset
   309
                          #'value:' #loadFromFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   310
                          #'activeHelpKey:' #fileLoadFromFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   311
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   312
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   313
                          #'label:' 'Load From Class...'
228524287573 intitial checkin
tz
parents:
diff changeset
   314
                          #'value:' #loadFromClass
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   315
                          #'activeHelpKey:' #fileLoadFromClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   316
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   317
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   318
                          #'label:' 'Load From Class With Superclass...'
228524287573 intitial checkin
tz
parents:
diff changeset
   319
                          #'translateLabel:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   320
                          #'value:' #loadFromClassWithSuperclass
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   321
                          #'activeHelpKey:' #fileLoadFromClassWithSuperclass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   322
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   323
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   324
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   325
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   326
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   327
                          #'label:' 'Save'
228524287573 intitial checkin
tz
parents:
diff changeset
   328
                          #'value:' #saveImageFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   329
                          #'activeHelpKey:' #fileSaveFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   330
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   331
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   332
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   333
                          #'label:' 'Save As...'
228524287573 intitial checkin
tz
parents:
diff changeset
   334
                          #'value:' #saveImageFileAs
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   335
                          #'activeHelpKey:' #fileSaveAs
400
228524287573 intitial checkin
tz
parents:
diff changeset
   336
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   337
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   338
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   339
                          #'label:' 'Save Mask As...'
228524287573 intitial checkin
tz
parents:
diff changeset
   340
                          #'value:' #saveImageMaskFileAs
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   341
                          #'activeHelpKey:' #fileSaveMaskAs
400
228524287573 intitial checkin
tz
parents:
diff changeset
   342
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   343
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   344
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   345
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   346
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   347
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   348
                          #'label:' 'Save Method'
228524287573 intitial checkin
tz
parents:
diff changeset
   349
                          #'value:' #saveMethod
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   350
                          #'activeHelpKey:' #fileSaveMethod
400
228524287573 intitial checkin
tz
parents:
diff changeset
   351
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   352
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   353
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   354
                          #'label:' 'Save Method As...'
228524287573 intitial checkin
tz
parents:
diff changeset
   355
                          #'value:' #saveMethodAs
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   356
                          #'activeHelpKey:' #fileSaveMethodAs
400
228524287573 intitial checkin
tz
parents:
diff changeset
   357
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   358
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   359
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   360
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   361
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   362
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   363
                          #'label:' 'Print'
228524287573 intitial checkin
tz
parents:
diff changeset
   364
                          #'value:' #print
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   365
                          #'activeHelpKey:' #filePrint
400
228524287573 intitial checkin
tz
parents:
diff changeset
   366
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   367
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   368
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   369
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   370
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   371
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   372
                          #'label:' 'Browse Class'
228524287573 intitial checkin
tz
parents:
diff changeset
   373
                          #'value:' #browseClass
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   374
                          #'activeHelpKey:' #fileBrowseClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   375
                          #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   376
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   377
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   378
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   379
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   380
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   381
                          #'label:' 'Exit'
228524287573 intitial checkin
tz
parents:
diff changeset
   382
                          #'translateLabel:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   383
                          #'value:' #closeRequest
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   384
                          #'activeHelpKey:' #fileExit
400
228524287573 intitial checkin
tz
parents:
diff changeset
   385
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   386
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   387
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   388
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   389
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   390
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   391
                #'label:' 'Edit'
228524287573 intitial checkin
tz
parents:
diff changeset
   392
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   393
                #'submenu:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   394
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   395
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   396
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   397
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   398
                          #'label:' 'Undo'
228524287573 intitial checkin
tz
parents:
diff changeset
   399
                          #'value:' #undo
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   400
                          #'activeHelpKey:' #editUndo
400
228524287573 intitial checkin
tz
parents:
diff changeset
   401
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   402
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   403
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   404
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   405
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   406
                          #'label:' 'Flip - Vertical'
228524287573 intitial checkin
tz
parents:
diff changeset
   407
                          #'value:' #flipVertical
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   408
                          #'activeHelpKey:' #editFlipVertical
400
228524287573 intitial checkin
tz
parents:
diff changeset
   409
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   410
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   411
                          #'label:' 'Flip - Horizontal'
228524287573 intitial checkin
tz
parents:
diff changeset
   412
                          #'value:' #flipHorizontal
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   413
                          #'activeHelpKey:' #editFlipHorizontal
400
228524287573 intitial checkin
tz
parents:
diff changeset
   414
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   415
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   416
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   417
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   418
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   419
                          #'label:' 'Resize...'
228524287573 intitial checkin
tz
parents:
diff changeset
   420
                          #'value:' #resizeImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   421
                          #'activeHelpKey:' #editResize
400
228524287573 intitial checkin
tz
parents:
diff changeset
   422
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   423
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   424
                          #'label:' 'Magnify...'
228524287573 intitial checkin
tz
parents:
diff changeset
   425
                          #'value:' #magnifyImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   426
                          #'activeHelpKey:' #editMagnifyImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   427
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   428
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   429
                          #'label:' 'Rotate...'
228524287573 intitial checkin
tz
parents:
diff changeset
   430
                          #'value:' #rotateImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   431
                          #'activeHelpKey:' #editRotate
400
228524287573 intitial checkin
tz
parents:
diff changeset
   432
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   433
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   434
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   435
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   436
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   437
                          #'label:' 'Negative'
228524287573 intitial checkin
tz
parents:
diff changeset
   438
                          #'value:' #negativeImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   439
                          #'activeHelpKey:' #editNegate
400
228524287573 intitial checkin
tz
parents:
diff changeset
   440
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   441
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   442
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   443
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   444
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   445
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   446
                #'label:' 'Color Map'
228524287573 intitial checkin
tz
parents:
diff changeset
   447
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   448
                #'submenu:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   449
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   450
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   451
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   452
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   453
                          #'label:' '8-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   454
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   455
                          #'argument:' '8-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   456
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   457
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   458
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   459
                          #'label:' '4-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   460
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   461
                          #'argument:' '4-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   462
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   463
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   464
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   465
                          #'label:' '2-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   466
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   467
                          #'argument:' '2-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   468
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   469
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   470
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   471
                          #'label:' '1-Plane'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   472
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   473
                          #'argument:' '1-plane'
228524287573 intitial checkin
tz
parents:
diff changeset
   474
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   475
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   476
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   477
                          #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   478
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   479
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   480
                          #'label:' '8-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   481
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   482
                          #'argument:' '8-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   483
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   484
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   485
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   486
                          #'label:' '4-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   487
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   488
                          #'argument:' '4-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   489
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   490
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   491
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   492
                          #'label:' '2-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   493
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   494
                          #'argument:' '2-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   495
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   496
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   497
                       #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   498
                          #'label:' '1-Plane + Mask'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   499
                          #'activeHelpKey:' #colorMap
400
228524287573 intitial checkin
tz
parents:
diff changeset
   500
                          #'argument:' '1-plane + mask'
228524287573 intitial checkin
tz
parents:
diff changeset
   501
                          #'indication:' #'colorMapMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   502
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   503
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   504
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   505
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   506
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   507
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   508
                #'label:' 'History'
228524287573 intitial checkin
tz
parents:
diff changeset
   509
                #'submenuChannel:' #menuHistory
228524287573 intitial checkin
tz
parents:
diff changeset
   510
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   511
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   512
                #'label:' 'Help'
228524287573 intitial checkin
tz
parents:
diff changeset
   513
                #'submenuChannel:' #menuHelp
228524287573 intitial checkin
tz
parents:
diff changeset
   514
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   515
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   516
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
   517
      )
228524287573 intitial checkin
tz
parents:
diff changeset
   518
!
228524287573 intitial checkin
tz
parents:
diff changeset
   519
228524287573 intitial checkin
tz
parents:
diff changeset
   520
menuColorAssignment
228524287573 intitial checkin
tz
parents:
diff changeset
   521
    "this window spec was automatically generated by the ST/X MenuEditor"
228524287573 intitial checkin
tz
parents:
diff changeset
   522
228524287573 intitial checkin
tz
parents:
diff changeset
   523
    "do not manually edit this - the builder may not be able to
228524287573 intitial checkin
tz
parents:
diff changeset
   524
     handle the specification if its corrupted."
228524287573 intitial checkin
tz
parents:
diff changeset
   525
228524287573 intitial checkin
tz
parents:
diff changeset
   526
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   527
     MenuEditor new openOnClass:ImageEditor andSelector:#menuColorAssignment
228524287573 intitial checkin
tz
parents:
diff changeset
   528
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuColorAssignment)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
   529
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   530
228524287573 intitial checkin
tz
parents:
diff changeset
   531
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
   532
228524287573 intitial checkin
tz
parents:
diff changeset
   533
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   534
     
228524287573 intitial checkin
tz
parents:
diff changeset
   535
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   536
          
228524287573 intitial checkin
tz
parents:
diff changeset
   537
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
   538
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   539
                #'label:' 'left'
228524287573 intitial checkin
tz
parents:
diff changeset
   540
                #'nameKey:' #leftMouseKeyButton
228524287573 intitial checkin
tz
parents:
diff changeset
   541
                #'argument:' '1'
228524287573 intitial checkin
tz
parents:
diff changeset
   542
                #'labelImage:' #(#ResourceRetriever nil #leftMouseKeyIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   543
                #'indication:' #'mouseKeyColorMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   544
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   545
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   546
                #'label:' 'right'
228524287573 intitial checkin
tz
parents:
diff changeset
   547
                #'nameKey:' #rightMouseKeyButton
228524287573 intitial checkin
tz
parents:
diff changeset
   548
                #'argument:' '2'
228524287573 intitial checkin
tz
parents:
diff changeset
   549
                #'labelImage:' #(#ResourceRetriever nil #rightMouseKeyIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   550
                #'indication:' #'mouseKeyColorMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   551
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   552
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   553
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
   554
      )
228524287573 intitial checkin
tz
parents:
diff changeset
   555
!
228524287573 intitial checkin
tz
parents:
diff changeset
   556
228524287573 intitial checkin
tz
parents:
diff changeset
   557
menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
   558
    "this window spec was automatically generated by the ST/X MenuEditor"
228524287573 intitial checkin
tz
parents:
diff changeset
   559
228524287573 intitial checkin
tz
parents:
diff changeset
   560
    "do not manually edit this - the builder may not be able to
228524287573 intitial checkin
tz
parents:
diff changeset
   561
     handle the specification if its corrupted."
228524287573 intitial checkin
tz
parents:
diff changeset
   562
228524287573 intitial checkin
tz
parents:
diff changeset
   563
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   564
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
   565
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
   566
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   567
228524287573 intitial checkin
tz
parents:
diff changeset
   568
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
   569
228524287573 intitial checkin
tz
parents:
diff changeset
   570
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   571
     
228524287573 intitial checkin
tz
parents:
diff changeset
   572
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   573
          
228524287573 intitial checkin
tz
parents:
diff changeset
   574
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
   575
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   576
                #'label:' 'newImage'
228524287573 intitial checkin
tz
parents:
diff changeset
   577
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   578
                #'value:' #newImage
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   579
                #'activeHelpKey:' #fileNewImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   580
                #'labelImage:' #(#ResourceRetriever nil #newImageIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   581
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   582
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   583
                #'label:' 'loadFromClass'
228524287573 intitial checkin
tz
parents:
diff changeset
   584
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   585
                #'value:' #loadFromClass
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   586
                #'activeHelpKey:' #fileLoadFromClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   587
                #'labelImage:' #(#ResourceRetriever nil #loadFromClassIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   588
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   589
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   590
                #'label:' 'loadFromFile'
228524287573 intitial checkin
tz
parents:
diff changeset
   591
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   592
                #'value:' #loadFromFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   593
                #'activeHelpKey:' #fileLoadFromFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   594
                #'labelImage:' #(#ResourceRetriever nil #loadFromFileIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   595
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   596
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   597
                #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   598
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   599
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   600
                #'label:' 'saveMethod'
228524287573 intitial checkin
tz
parents:
diff changeset
   601
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   602
                #'value:' #saveMethod
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   603
                #'activeHelpKey:' #fileSaveMethod
400
228524287573 intitial checkin
tz
parents:
diff changeset
   604
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   605
                #'labelImage:' #(#ResourceRetriever nil #saveAsMethodIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   606
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   607
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   608
                #'label:' 'saveFile'
228524287573 intitial checkin
tz
parents:
diff changeset
   609
                #'isButton:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   610
                #'value:' #saveImageFile
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   611
                #'activeHelpKey:' #fileSaveFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   612
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   613
                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
228524287573 intitial checkin
tz
parents:
diff changeset
   614
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   615
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   616
                #'label:' '-'
228524287573 intitial checkin
tz
parents:
diff changeset
   617
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   618
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   619
                #'label:' 'Point'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   620
                #'activeHelpKey:' #drawModePoint
400
228524287573 intitial checkin
tz
parents:
diff changeset
   621
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   622
                #'argument:' 'point'
228524287573 intitial checkin
tz
parents:
diff changeset
   623
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   624
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   625
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   626
                #'label:' 'Box'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   627
                #'activeHelpKey:' #drawModeBox
400
228524287573 intitial checkin
tz
parents:
diff changeset
   628
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   629
                #'argument:' 'box'
228524287573 intitial checkin
tz
parents:
diff changeset
   630
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   631
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   632
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   633
                #'label:' 'Filled Box'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   634
                #'activeHelpKey:' #drawModeFilledBox
400
228524287573 intitial checkin
tz
parents:
diff changeset
   635
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   636
                #'argument:' 'filledBox'
228524287573 intitial checkin
tz
parents:
diff changeset
   637
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   638
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   639
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   640
                #'label:' 'Fill'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   641
                #'activeHelpKey:' #drawModeFill
400
228524287573 intitial checkin
tz
parents:
diff changeset
   642
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   643
                #'argument:' 'fill'
228524287573 intitial checkin
tz
parents:
diff changeset
   644
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   645
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   646
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   647
                #'label:' 'Copy'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   648
                #'activeHelpKey:' #drawModeCopy
400
228524287573 intitial checkin
tz
parents:
diff changeset
   649
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   650
                #'argument:' 'copy'
228524287573 intitial checkin
tz
parents:
diff changeset
   651
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   652
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   653
             #(#MenuItem
228524287573 intitial checkin
tz
parents:
diff changeset
   654
                #'label:' 'Paste'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   655
                #'activeHelpKey:' #drawModePaste
400
228524287573 intitial checkin
tz
parents:
diff changeset
   656
                #'enabled:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   657
                #'argument:' 'paste'
228524287573 intitial checkin
tz
parents:
diff changeset
   658
                #'indication:' #'editMode:value:'
228524287573 intitial checkin
tz
parents:
diff changeset
   659
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   660
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   661
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
   662
      )
228524287573 intitial checkin
tz
parents:
diff changeset
   663
!
228524287573 intitial checkin
tz
parents:
diff changeset
   664
228524287573 intitial checkin
tz
parents:
diff changeset
   665
windowSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   666
    "this window spec was automatically generated by the ST/X UIPainter"
228524287573 intitial checkin
tz
parents:
diff changeset
   667
228524287573 intitial checkin
tz
parents:
diff changeset
   668
    "do not manually edit this - the painter/builder may not be able to
228524287573 intitial checkin
tz
parents:
diff changeset
   669
     handle the specification if its corrupted."
228524287573 intitial checkin
tz
parents:
diff changeset
   670
228524287573 intitial checkin
tz
parents:
diff changeset
   671
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   672
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   673
     ImageEditor new openInterface:#windowSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   674
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   675
    "ImageEditor open"
228524287573 intitial checkin
tz
parents:
diff changeset
   676
228524287573 intitial checkin
tz
parents:
diff changeset
   677
    <resource: #canvas>
228524287573 intitial checkin
tz
parents:
diff changeset
   678
228524287573 intitial checkin
tz
parents:
diff changeset
   679
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   680
     
228524287573 intitial checkin
tz
parents:
diff changeset
   681
       #(#FullSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   682
          #'window:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   683
           #(#WindowSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   684
              #'name:' 'Image Editor'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   685
              #'layout:' #(#LayoutFrame 70 0 346 0 569 0 691 0)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   686
              #'label:' 'Image Editor'
228524287573 intitial checkin
tz
parents:
diff changeset
   687
              #'min:' #(#Point 400 320)
228524287573 intitial checkin
tz
parents:
diff changeset
   688
              #'max:' #(#Point 1152 900)
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   689
              #'bounds:' #(#Rectangle 70 346 570 692)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   690
              #'menu:' #menu
228524287573 intitial checkin
tz
parents:
diff changeset
   691
              #'usePreferredExtent:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   692
          )
228524287573 intitial checkin
tz
parents:
diff changeset
   693
          #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   694
           #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   695
              #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   696
               #(
228524287573 intitial checkin
tz
parents:
diff changeset
   697
                 #(#MenuPanelSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   698
                    #'name:' 'menuToolbarView'
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
   699
                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   700
                    #'menu:' #menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
   701
                    #'style:' #(#FontDescription #helvetica #medium #roman 10)
228524287573 intitial checkin
tz
parents:
diff changeset
   702
                    #'showSeparatingLines:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   703
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   704
                 #(#VariableHorizontalPanelSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   705
                    #'name:' 'variableHorizontalPanel1'
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
   706
                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   707
                    #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   708
                     #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   709
                        #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   710
                         #(
228524287573 intitial checkin
tz
parents:
diff changeset
   711
                           #(#ViewSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   712
                              #'name:' 'view1'
228524287573 intitial checkin
tz
parents:
diff changeset
   713
                              #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   714
                               #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   715
                                  #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   716
                                   #(
228524287573 intitial checkin
tz
parents:
diff changeset
   717
                                     #(#FramedBoxSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   718
                                        #'name:' 'framedBox1'
228524287573 intitial checkin
tz
parents:
diff changeset
   719
                                        #'layout:' #(#LayoutFrame 1 0.0 3 0.0 110 0 65 0)
228524287573 intitial checkin
tz
parents:
diff changeset
   720
                                        #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   721
                                         #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   722
                                            #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   723
                                             #(
228524287573 intitial checkin
tz
parents:
diff changeset
   724
                                               #(#ArrowButtonSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   725
                                                  #'name:' 'magnifyDownButton'
228524287573 intitial checkin
tz
parents:
diff changeset
   726
                                                  #'layout:' #(#LayoutFrame 13 0 20 0 35 0 42 0)
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   727
                                                  #'activeHelpKey:' #magnifyImageDown
400
228524287573 intitial checkin
tz
parents:
diff changeset
   728
                                                  #'model:' #magnifyDown
228524287573 intitial checkin
tz
parents:
diff changeset
   729
                                                  #'enableChannel:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   730
                                                  #'isTriggerOnDown:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   731
                                                  #'direction:' #left
228524287573 intitial checkin
tz
parents:
diff changeset
   732
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   733
                                               #(#ArrowButtonSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   734
                                                  #'name:' 'magnifyUpButton'
228524287573 intitial checkin
tz
parents:
diff changeset
   735
                                                  #'layout:' #(#LayoutFrame 73 0 20 0 95 0 42 0)
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   736
                                                  #'activeHelpKey:' #magnifyImageUp
400
228524287573 intitial checkin
tz
parents:
diff changeset
   737
                                                  #'model:' #magnifyUp
228524287573 intitial checkin
tz
parents:
diff changeset
   738
                                                  #'enableChannel:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   739
                                                  #'isTriggerOnDown:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   740
                                                  #'direction:' #right
228524287573 intitial checkin
tz
parents:
diff changeset
   741
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   742
                                               #(#InputFieldSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   743
                                                  #'name:' 'magnificationInputField'
228524287573 intitial checkin
tz
parents:
diff changeset
   744
                                                  #'layout:' #(#LayoutFrame 36 0 20 0.0 72 0 42 0)
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   745
                                                  #'activeHelpKey:' #magnificationNumber
400
228524287573 intitial checkin
tz
parents:
diff changeset
   746
                                                  #'enableChannel:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   747
                                                  #'model:' #valueOfMagnification
228524287573 intitial checkin
tz
parents:
diff changeset
   748
                                                  #'type:' #number
228524287573 intitial checkin
tz
parents:
diff changeset
   749
                                                  #'acceptOnReturn:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   750
                                                  #'acceptOnTab:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   751
                                                  #'numChars:' 2
228524287573 intitial checkin
tz
parents:
diff changeset
   752
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   753
                                            )
228524287573 intitial checkin
tz
parents:
diff changeset
   754
                                        )
228524287573 intitial checkin
tz
parents:
diff changeset
   755
                                        #'label:' 'Magnification'
228524287573 intitial checkin
tz
parents:
diff changeset
   756
                                        #'labelPosition:' #topLeft
228524287573 intitial checkin
tz
parents:
diff changeset
   757
                                        #'style:' #(#FontDescription #helvetica #medium #roman 12)
228524287573 intitial checkin
tz
parents:
diff changeset
   758
                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   759
                                     #(#FramedBoxSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   760
                                        #'name:' 'framedBox2'
228524287573 intitial checkin
tz
parents:
diff changeset
   761
                                        #'layout:' #(#LayoutFrame 1 0.0 68 0 0 1.0 -66 1)
228524287573 intitial checkin
tz
parents:
diff changeset
   762
                                        #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   763
                                         #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   764
                                            #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   765
                                             #(
228524287573 intitial checkin
tz
parents:
diff changeset
   766
                                               #(#DataSetSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   767
                                                  #'name:' 'colorDataSetView'
228524287573 intitial checkin
tz
parents:
diff changeset
   768
                                                  #'layout:' #(#LayoutFrame 11 0.0 19 0.0 20 1.0 -10 1.0)
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   769
                                                  #'activeHelpKey:' #colorMapTable
400
228524287573 intitial checkin
tz
parents:
diff changeset
   770
                                                  #'model:' #selectionOfColor
228524287573 intitial checkin
tz
parents:
diff changeset
   771
                                                  #'style:' #(#FontDescription #helvetica #medium #roman 12)
228524287573 intitial checkin
tz
parents:
diff changeset
   772
                                                  #'hasHorizontalScrollBar:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   773
                                                  #'hasVerticalScrollBar:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   774
                                                  #'miniScrollerHorizontal:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   775
                                                  #'miniScrollerVertical:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   776
                                                  #'dataList:' #listOfColors
228524287573 intitial checkin
tz
parents:
diff changeset
   777
                                                  #'has3Dsepartors:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   778
                                                  #'verticalSpacing:' 1
228524287573 intitial checkin
tz
parents:
diff changeset
   779
                                                  #'columns:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   780
                                                   #(
228524287573 intitial checkin
tz
parents:
diff changeset
   781
                                                     #(#DataSetColumnSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   782
                                                        #'rendererType:' #rowSelector
228524287573 intitial checkin
tz
parents:
diff changeset
   783
                                                        #'backgroundSelector:' #yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   784
                                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   785
                                                     #(#DataSetColumnSpec
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
   786
                                                        #'label:' 'Red'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   787
                                                        #'model:' #rowRedByte
228524287573 intitial checkin
tz
parents:
diff changeset
   788
                                                        #'canSelect:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   789
                                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   790
                                                     #(#DataSetColumnSpec
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
   791
                                                        #'label:' 'Green'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   792
                                                        #'model:' #rowGreenByte
228524287573 intitial checkin
tz
parents:
diff changeset
   793
                                                        #'canSelect:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   794
                                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   795
                                                     #(#DataSetColumnSpec
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
   796
                                                        #'label:' 'Blue'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   797
                                                        #'model:' #rowBlueByte
228524287573 intitial checkin
tz
parents:
diff changeset
   798
                                                        #'canSelect:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   799
                                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   800
                                                  )
228524287573 intitial checkin
tz
parents:
diff changeset
   801
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   802
                                               #(#MenuPanelSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   803
                                                  #'name:' 'menuColorAssignmentPanel'
228524287573 intitial checkin
tz
parents:
diff changeset
   804
                                                  #'layout:' #(#LayoutFrame 11 0 -10 1 18 1 17 1)
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   805
                                                  #'activeHelpKey:' #mouseKeyColorMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
   806
                                                  #'enableChannel:' #imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
   807
                                                  #'menu:' #menuColorAssignment
228524287573 intitial checkin
tz
parents:
diff changeset
   808
                                                  #'style:' #(#FontDescription #helvetica #medium #roman 10)
228524287573 intitial checkin
tz
parents:
diff changeset
   809
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   810
                                            )
228524287573 intitial checkin
tz
parents:
diff changeset
   811
                                        )
228524287573 intitial checkin
tz
parents:
diff changeset
   812
                                        #'label:' 'Color Map'
228524287573 intitial checkin
tz
parents:
diff changeset
   813
                                        #'labelPosition:' #topLeft
228524287573 intitial checkin
tz
parents:
diff changeset
   814
                                        #'style:' #(#FontDescription #helvetica #medium #roman 12)
228524287573 intitial checkin
tz
parents:
diff changeset
   815
                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   816
                                     #(#VerticalPanelViewSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   817
                                        #'name:' 'verticalPanelView1'
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
   818
                                        #'layout:' #(#LayoutFrame 1 0.0 -68 1 83 0 0 1.0)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   819
                                        #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   820
                                         #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   821
                                            #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   822
                                             #(
228524287573 intitial checkin
tz
parents:
diff changeset
   823
                                               #(#LabelSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   824
                                                  #'name:' 'classNameLabel'
228524287573 intitial checkin
tz
parents:
diff changeset
   825
                                                  #'label:' 'Class:'
228524287573 intitial checkin
tz
parents:
diff changeset
   826
                                                  #'adjust:' #right
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
   827
                                                  #'extent:' #(#Point 82 21)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   828
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   829
                                               #(#LabelSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   830
                                                  #'name:' 'selectorLabel'
228524287573 intitial checkin
tz
parents:
diff changeset
   831
                                                  #'label:' 'Selector:'
228524287573 intitial checkin
tz
parents:
diff changeset
   832
                                                  #'adjust:' #right
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
   833
                                                  #'extent:' #(#Point 82 20)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   834
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   835
                                               #(#LabelSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   836
                                                  #'name:' 'fileNameLabel'
228524287573 intitial checkin
tz
parents:
diff changeset
   837
                                                  #'label:' 'File Name:'
228524287573 intitial checkin
tz
parents:
diff changeset
   838
                                                  #'adjust:' #right
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
   839
                                                  #'extent:' #(#Point 82 21)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   840
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   841
                                            )
228524287573 intitial checkin
tz
parents:
diff changeset
   842
                                        )
228524287573 intitial checkin
tz
parents:
diff changeset
   843
                                        #'horizontalLayout:' #fit
228524287573 intitial checkin
tz
parents:
diff changeset
   844
                                        #'verticalLayout:' #fit
228524287573 intitial checkin
tz
parents:
diff changeset
   845
                                        #'horizontalSpace:' 3
228524287573 intitial checkin
tz
parents:
diff changeset
   846
                                        #'verticalSpace:' 3
228524287573 intitial checkin
tz
parents:
diff changeset
   847
                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   848
                                     #(#VerticalPanelViewSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   849
                                        #'name:' 'verticalPanelView2'
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
   850
                                        #'layout:' #(#LayoutFrame 85 0.0 -68 1 -6 1 0 1.0)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   851
                                        #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   852
                                         #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   853
                                            #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   854
                                             #(
228524287573 intitial checkin
tz
parents:
diff changeset
   855
                                               #(#InputFieldSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   856
                                                  #'name:' 'resourceClassInputField'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   857
                                                  #'activeHelpKey:' #inputFieldOfClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   858
                                                  #'model:' #valueOfResourceClass
228524287573 intitial checkin
tz
parents:
diff changeset
   859
                                                  #'immediateAccept:' false
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   860
                                                  #'extent:' #(#Point 153 21)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   861
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   862
                                               #(#InputFieldSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   863
                                                  #'name:' 'resourceSelectorInputField'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   864
                                                  #'activeHelpKey:' #inputFieldOfSelector
400
228524287573 intitial checkin
tz
parents:
diff changeset
   865
                                                  #'model:' #valueOfResourceSelector
228524287573 intitial checkin
tz
parents:
diff changeset
   866
                                                  #'immediateAccept:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   867
                                                  #'acceptOnTab:' false
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   868
                                                  #'extent:' #(#Point 153 20)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   869
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   870
                                               #(#InputFieldSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   871
                                                  #'name:' 'fileNameInputField'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   872
                                                  #'activeHelpKey:' #inputFieldFileName
400
228524287573 intitial checkin
tz
parents:
diff changeset
   873
                                                  #'model:' #valueOfFileName
228524287573 intitial checkin
tz
parents:
diff changeset
   874
                                                  #'immediateAccept:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   875
                                                  #'acceptOnTab:' false
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   876
                                                  #'extent:' #(#Point 153 21)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   877
                                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   878
                                            )
228524287573 intitial checkin
tz
parents:
diff changeset
   879
                                        )
228524287573 intitial checkin
tz
parents:
diff changeset
   880
                                        #'horizontalLayout:' #fit
228524287573 intitial checkin
tz
parents:
diff changeset
   881
                                        #'verticalLayout:' #fit
228524287573 intitial checkin
tz
parents:
diff changeset
   882
                                        #'horizontalSpace:' 3
228524287573 intitial checkin
tz
parents:
diff changeset
   883
                                        #'verticalSpace:' 3
228524287573 intitial checkin
tz
parents:
diff changeset
   884
                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   885
                                     #(#ArbitraryComponentSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   886
                                        #'name:' 'imagePreView'
228524287573 intitial checkin
tz
parents:
diff changeset
   887
                                        #'layout:' #(#LayoutFrame 111 0.0 9 0.0 -6 1 60 0)
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   888
                                        #'activeHelpKey:' #previewView
400
228524287573 intitial checkin
tz
parents:
diff changeset
   889
                                        #'hasHorizontalScrollBar:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   890
                                        #'hasVerticalScrollBar:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   891
                                        #'miniScrollerHorizontal:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   892
                                        #'miniScrollerVertical:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   893
                                        #'component:' #ImageView
228524287573 intitial checkin
tz
parents:
diff changeset
   894
                                        #'hasBorder:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   895
                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   896
                                  )
228524287573 intitial checkin
tz
parents:
diff changeset
   897
                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   898
                              #'level:' -1
228524287573 intitial checkin
tz
parents:
diff changeset
   899
                          )
228524287573 intitial checkin
tz
parents:
diff changeset
   900
                           #(#ViewSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   901
                              #'name:' 'view2'
228524287573 intitial checkin
tz
parents:
diff changeset
   902
                              #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   903
                               #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   904
                                  #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   905
                                   #(
228524287573 intitial checkin
tz
parents:
diff changeset
   906
                                     #(#ArbitraryComponentSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   907
                                        #'name:' 'imageEditView'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   908
                                        #'layout:' #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   909
                                        #'hasHorizontalScrollBar:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   910
                                        #'hasVerticalScrollBar:' true
228524287573 intitial checkin
tz
parents:
diff changeset
   911
                                        #'component:' #ImageEditView
228524287573 intitial checkin
tz
parents:
diff changeset
   912
                                        #'hasBorder:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   913
                                    )
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   914
                                     #(#LabelSpec
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   915
                                        #'name:' 'coordLabel'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   916
                                        #'layout:' #(#LayoutFrame 2 0.0 -22 1 -4 1.0 0 1.0)
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   917
                                        #'level:' -1
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   918
                                        #'adjust:' #left
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   919
                                    )
400
228524287573 intitial checkin
tz
parents:
diff changeset
   920
                                  )
228524287573 intitial checkin
tz
parents:
diff changeset
   921
                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   922
                              #'level:' -1
228524287573 intitial checkin
tz
parents:
diff changeset
   923
                          )
228524287573 intitial checkin
tz
parents:
diff changeset
   924
                        )
228524287573 intitial checkin
tz
parents:
diff changeset
   925
                    )
468
bb4e776b9210 levels changed
tz
parents: 461
diff changeset
   926
                    #'level:' 1
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   927
                    #'handles:' #(#Any 0.5 1.0)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   928
                )
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   929
                 #(#UISubSpecification
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   930
                    #'name:' 'infoBarSubSpec'
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   931
                    #'layout:' #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0)
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   932
                    #'majorKey:' #ToolApplicationModel
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   933
                    #'minorKey:' #windowSpecForInfoBar
400
228524287573 intitial checkin
tz
parents:
diff changeset
   934
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   935
              )
228524287573 intitial checkin
tz
parents:
diff changeset
   936
          )
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
windowSpecForNewImage
228524287573 intitial checkin
tz
parents:
diff changeset
   941
    "this window spec was automatically generated by the ST/X UIPainter"
228524287573 intitial checkin
tz
parents:
diff changeset
   942
228524287573 intitial checkin
tz
parents:
diff changeset
   943
    "do not manually edit this - the painter/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
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpecForNewImage
228524287573 intitial checkin
tz
parents:
diff changeset
   948
     ImageEditor new openInterface:#windowSpecForNewImage
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: #canvas>
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
       #(#FullSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   956
          #'window:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   957
           #(#WindowSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   958
              #'name:' 'New Image'
228524287573 intitial checkin
tz
parents:
diff changeset
   959
              #'layout:' #(#LayoutFrame 194 0 152 0 461 0 248 0)
228524287573 intitial checkin
tz
parents:
diff changeset
   960
              #'label:' 'New Image'
228524287573 intitial checkin
tz
parents:
diff changeset
   961
              #'min:' #(#Point 10 10)
228524287573 intitial checkin
tz
parents:
diff changeset
   962
              #'max:' #(#Point 1152 900)
228524287573 intitial checkin
tz
parents:
diff changeset
   963
              #'bounds:' #(#Rectangle 194 152 462 249)
228524287573 intitial checkin
tz
parents:
diff changeset
   964
              #'usePreferredExtent:' false
228524287573 intitial checkin
tz
parents:
diff changeset
   965
          )
228524287573 intitial checkin
tz
parents:
diff changeset
   966
          #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   967
           #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   968
              #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   969
               #(
228524287573 intitial checkin
tz
parents:
diff changeset
   970
                 #(#ViewSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   971
                    #'name:' 'View'
228524287573 intitial checkin
tz
parents:
diff changeset
   972
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -38 1.0)
228524287573 intitial checkin
tz
parents:
diff changeset
   973
                    #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   974
                     #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   975
                        #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   976
                         #(
228524287573 intitial checkin
tz
parents:
diff changeset
   977
                           #(#FramedBoxSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   978
                              #'name:' 'framedBox1'
228524287573 intitial checkin
tz
parents:
diff changeset
   979
                              #'layout:' #(#LayoutFrame 1 0.0 1 0.0 0 0.4 55 0)
228524287573 intitial checkin
tz
parents:
diff changeset
   980
                              #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   981
                               #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
   982
                                  #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
   983
                                   #(
228524287573 intitial checkin
tz
parents:
diff changeset
   984
                                     #(#ComboBoxSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   985
                                        #'name:' 'defaultSizesComboBox'
228524287573 intitial checkin
tz
parents:
diff changeset
   986
                                        #'layout:' #(#LayoutFrame 15 0.0 16 0.0 15 1.0 16 1.0)
228524287573 intitial checkin
tz
parents:
diff changeset
   987
                                        #'model:' #selectionOfSize
228524287573 intitial checkin
tz
parents:
diff changeset
   988
                                        #'type:' #string
228524287573 intitial checkin
tz
parents:
diff changeset
   989
                                        #'comboList:' #listOfDefaultSizes
228524287573 intitial checkin
tz
parents:
diff changeset
   990
                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
   991
                                  )
228524287573 intitial checkin
tz
parents:
diff changeset
   992
                              )
228524287573 intitial checkin
tz
parents:
diff changeset
   993
                              #'label:' 'Size'
228524287573 intitial checkin
tz
parents:
diff changeset
   994
                              #'labelPosition:' #topLeft
228524287573 intitial checkin
tz
parents:
diff changeset
   995
                              #'style:' #(#FontDescription #helvetica #medium #roman 12)
228524287573 intitial checkin
tz
parents:
diff changeset
   996
                          )
228524287573 intitial checkin
tz
parents:
diff changeset
   997
                           #(#FramedBoxSpec
228524287573 intitial checkin
tz
parents:
diff changeset
   998
                              #'name:' 'framedBox2'
228524287573 intitial checkin
tz
parents:
diff changeset
   999
                              #'layout:' #(#LayoutFrame 0 0.4 1 0.0 -1 1.0 55 0)
228524287573 intitial checkin
tz
parents:
diff changeset
  1000
                              #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
  1001
                               #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
  1002
                                  #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
  1003
                                   #(
228524287573 intitial checkin
tz
parents:
diff changeset
  1004
                                     #(#ComboListSpec
228524287573 intitial checkin
tz
parents:
diff changeset
  1005
                                        #'name:' 'colorMapComboBox'
228524287573 intitial checkin
tz
parents:
diff changeset
  1006
                                        #'layout:' #(#LayoutFrame 15 0.0 16 0.0 15 1.0 16 1.0)
228524287573 intitial checkin
tz
parents:
diff changeset
  1007
                                        #'model:' #selectionOfColorMap
228524287573 intitial checkin
tz
parents:
diff changeset
  1008
                                        #'comboList:' #listOfColorMaps
228524287573 intitial checkin
tz
parents:
diff changeset
  1009
                                        #'useIndex:' false
228524287573 intitial checkin
tz
parents:
diff changeset
  1010
                                    )
228524287573 intitial checkin
tz
parents:
diff changeset
  1011
                                  )
228524287573 intitial checkin
tz
parents:
diff changeset
  1012
                              )
228524287573 intitial checkin
tz
parents:
diff changeset
  1013
                              #'label:' 'Color Map'
228524287573 intitial checkin
tz
parents:
diff changeset
  1014
                              #'labelPosition:' #topLeft
228524287573 intitial checkin
tz
parents:
diff changeset
  1015
                              #'style:' #(#FontDescription #helvetica #medium #roman 12)
228524287573 intitial checkin
tz
parents:
diff changeset
  1016
                          )
228524287573 intitial checkin
tz
parents:
diff changeset
  1017
                        )
228524287573 intitial checkin
tz
parents:
diff changeset
  1018
                    )
228524287573 intitial checkin
tz
parents:
diff changeset
  1019
                    #'level:' 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1020
                )
228524287573 intitial checkin
tz
parents:
diff changeset
  1021
                 #(#HorizontalPanelViewSpec
228524287573 intitial checkin
tz
parents:
diff changeset
  1022
                    #'name:' 'horizontalPanelView1'
228524287573 intitial checkin
tz
parents:
diff changeset
  1023
                    #'layout:' #(#LayoutFrame 0 0.0 -38 1 0 1.0 0 1.0)
228524287573 intitial checkin
tz
parents:
diff changeset
  1024
                    #'component:' 
228524287573 intitial checkin
tz
parents:
diff changeset
  1025
                     #(#SpecCollection
228524287573 intitial checkin
tz
parents:
diff changeset
  1026
                        #'collection:' 
228524287573 intitial checkin
tz
parents:
diff changeset
  1027
                         #(
228524287573 intitial checkin
tz
parents:
diff changeset
  1028
                           #(#ActionButtonSpec
228524287573 intitial checkin
tz
parents:
diff changeset
  1029
                              #'name:' 'actionButton2'
228524287573 intitial checkin
tz
parents:
diff changeset
  1030
                              #'label:' 'Cancel'
228524287573 intitial checkin
tz
parents:
diff changeset
  1031
                              #'model:' #cancel
228524287573 intitial checkin
tz
parents:
diff changeset
  1032
                              #'extent:' #(#Point 100 22)
228524287573 intitial checkin
tz
parents:
diff changeset
  1033
                          )
228524287573 intitial checkin
tz
parents:
diff changeset
  1034
                           #(#ActionButtonSpec
228524287573 intitial checkin
tz
parents:
diff changeset
  1035
                              #'name:' 'actionButton1'
228524287573 intitial checkin
tz
parents:
diff changeset
  1036
                              #'label:' 'OK'
228524287573 intitial checkin
tz
parents:
diff changeset
  1037
                              #'model:' #accept
228524287573 intitial checkin
tz
parents:
diff changeset
  1038
                              #'isDefault:' true
228524287573 intitial checkin
tz
parents:
diff changeset
  1039
                              #'extent:' #(#Point 100 22)
228524287573 intitial checkin
tz
parents:
diff changeset
  1040
                          )
228524287573 intitial checkin
tz
parents:
diff changeset
  1041
                        )
228524287573 intitial checkin
tz
parents:
diff changeset
  1042
                    )
228524287573 intitial checkin
tz
parents:
diff changeset
  1043
                    #'horizontalLayout:' #center
228524287573 intitial checkin
tz
parents:
diff changeset
  1044
                    #'verticalLayout:' #center
228524287573 intitial checkin
tz
parents:
diff changeset
  1045
                    #'horizontalSpace:' 2
228524287573 intitial checkin
tz
parents:
diff changeset
  1046
                    #'verticalSpace:' 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1047
                )
228524287573 intitial checkin
tz
parents:
diff changeset
  1048
              )
228524287573 intitial checkin
tz
parents:
diff changeset
  1049
          )
228524287573 intitial checkin
tz
parents:
diff changeset
  1050
      )
228524287573 intitial checkin
tz
parents:
diff changeset
  1051
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1052
228524287573 intitial checkin
tz
parents:
diff changeset
  1053
!ImageEditor class methodsFor:'resources'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1054
228524287573 intitial checkin
tz
parents:
diff changeset
  1055
leftMouseKeyIcon
228524287573 intitial checkin
tz
parents:
diff changeset
  1056
    "ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
  1057
228524287573 intitial checkin
tz
parents:
diff changeset
  1058
    <resource: #image>
228524287573 intitial checkin
tz
parents:
diff changeset
  1059
    ^(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 161 69 0 0 161 69 0 0 161 69 0 0 0 0 0 0 85 85 0 0 85 85 0 0 85 85 0 0 85 85 0 0 85 85 0 0 85 85 0 0 21 84 0 0 0 0 0 0 0 0 0]) ; 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:(#[0 0 0 0 15 240 31 248 31 248 31 248 31 248 31 248 31 248 31 248 31 248 31 248 31 248 15 240 7 224 0 0]) ; yourself); yourself
228524287573 intitial checkin
tz
parents:
diff changeset
  1060
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1061
228524287573 intitial checkin
tz
parents:
diff changeset
  1062
loadFromClassIcon
228524287573 intitial checkin
tz
parents:
diff changeset
  1063
    "ImageEditor openOnClass:self andSelector:#loadFromClassIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
  1064
228524287573 intitial checkin
tz
parents:
diff changeset
  1065
    <resource: #image>
228524287573 intitial checkin
tz
parents:
diff changeset
  1066
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[17 17 17 17 17 17 17 17 17 17 17 17 0 0 0 0 0 0 0 17 17 17 17 15 255 255 255 255 255 255 30 17 17 17 15 255 255 255 255 255 255 30 225 17 17 15 68 71 119 74 71 215 17 17 17 17 15 68 71 119 164 173 125 255 254 17 17 15 68 71 119 74 71 215 255 254 17 17 15 51 54 102 57 54 198 255 254 17 17 15 51 54 102 147 156 108 255 254 17 17 15 51 54 102 57 54 198 255 254 17 17 15 34 37 85 40 37 181 255 254 17 17 15 34 37 85 130 139 91 255 254 17 17 15 34 37 85 40 37 181 255 254 17 17 15 255 255 255 255 255 255 255 254 17 17 15 17 241 255 31 241 31 17 254 17 17 15 31 241 241 241 241 255 31 254 17 17 15 31 241 241 17 241 31 17 254 17 17 15 31 241 241 241 255 31 241 254 17 17 15 17 241 17 241 241 31 17 254 17 17 15 255 255 255 255 255 255 255 254 17 17 254 238 238 238 238 238 238 238 238 17 17 17 17 17 17 17 17 17 17 17 17]) ; 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:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself!
228524287573 intitial checkin
tz
parents:
diff changeset
  1067
228524287573 intitial checkin
tz
parents:
diff changeset
  1068
loadFromFileIcon
228524287573 intitial checkin
tz
parents:
diff changeset
  1069
    "ImageEditor openOnClass:self andSelector:#loadFromFileIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
  1070
228524287573 intitial checkin
tz
parents:
diff changeset
  1071
    <resource: #image>
228524287573 intitial checkin
tz
parents:
diff changeset
  1072
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[17 17 17 17 17 17 17 17 17 17 17 17 0 0 0 0 0 0 0 17 17 17 17 15 255 255 255 255 255 255 30 17 17 17 15 255 255 255 255 255 255 30 225 17 17 15 68 71 119 74 71 215 17 17 17 17 15 68 71 119 164 173 125 255 254 17 17 15 68 71 119 74 71 215 255 254 17 17 15 51 54 102 57 54 198 255 254 17 17 15 51 54 102 147 156 108 255 254 17 17 15 51 54 102 57 54 198 255 254 17 17 15 34 37 85 40 37 181 255 254 17 17 15 34 37 85 130 139 91 255 254 17 17 15 34 37 85 40 37 181 255 254 17 17 15 255 255 255 255 255 255 255 254 17 17 15 17 31 31 241 255 241 17 254 17 17 15 31 255 31 241 255 241 255 254 17 17 15 17 255 31 241 255 241 31 254 17 17 15 31 255 31 241 255 241 255 254 17 17 15 31 255 31 241 17 241 17 254 17 17 15 255 255 255 255 255 255 255 254 17 17 254 238 238 238 238 238 238 238 238 17 17 17 17 17 17 17 17 17 17 17 17]) ; 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:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself!
228524287573 intitial checkin
tz
parents:
diff changeset
  1073
228524287573 intitial checkin
tz
parents:
diff changeset
  1074
newImageIcon
228524287573 intitial checkin
tz
parents:
diff changeset
  1075
    "ImageEditor openOnClass:self andSelector:#newImageIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
  1076
228524287573 intitial checkin
tz
parents:
diff changeset
  1077
    <resource: #image>
228524287573 intitial checkin
tz
parents:
diff changeset
  1078
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[17 17 17 17 17 17 17 17 17 17 17 17 0 0 0 0 0 0 0 17 17 17 17 15 255 255 255 255 255 255 30 17 17 17 15 255 255 255 255 255 255 30 225 17 17 15 68 71 119 74 71 215 17 17 17 17 15 68 71 119 164 173 125 255 254 17 17 15 68 71 119 74 71 215 255 254 17 17 15 51 54 102 57 54 198 255 254 17 17 15 51 54 102 147 156 108 255 254 17 17 15 51 54 102 57 54 198 255 254 17 17 15 34 37 85 40 37 181 255 254 17 17 15 34 37 85 130 139 91 255 254 17 17 15 34 37 85 40 37 181 255 254 17 17 15 255 255 255 255 255 255 255 254 17 17 15 31 241 241 17 241 241 241 254 17 17 15 17 241 241 255 241 241 241 254 17 17 15 17 17 241 31 241 241 241 254 17 17 15 31 17 241 255 241 241 241 254 17 17 15 31 241 241 17 255 31 31 254 17 17 15 255 255 255 255 255 255 255 254 17 17 254 238 238 238 238 238 238 238 238 17 17 17 17 17 17 17 17 17 17 17 17]) ; 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:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself!
228524287573 intitial checkin
tz
parents:
diff changeset
  1079
228524287573 intitial checkin
tz
parents:
diff changeset
  1080
rightMouseKeyIcon
228524287573 intitial checkin
tz
parents:
diff changeset
  1081
    "ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
  1082
228524287573 intitial checkin
tz
parents:
diff changeset
  1083
    <resource: #image>
228524287573 intitial checkin
tz
parents:
diff changeset
  1084
    ^(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 82 138 0 0 82 138 0 0 82 138 0 0 0 0 0 0 85 85 0 0 85 85 0 0 85 85 0 0 85 85 0 0 85 85 0 0 85 85 0 0 21 84 0 0 0 0 0 0 0 0 0]) ; 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:(#[0 0 0 0 15 240 31 248 31 248 31 248 31 248 31 248 31 248 31 248 31 248 31 248 31 248 15 240 7 224 0 0]) ; yourself); yourself
228524287573 intitial checkin
tz
parents:
diff changeset
  1085
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1086
228524287573 intitial checkin
tz
parents:
diff changeset
  1087
saveAsMethodIcon
228524287573 intitial checkin
tz
parents:
diff changeset
  1088
    "ImageEditor openOnClass:self andSelector:#saveAsMethodIcon"
228524287573 intitial checkin
tz
parents:
diff changeset
  1089
228524287573 intitial checkin
tz
parents:
diff changeset
  1090
    <resource: #image>
228524287573 intitial checkin
tz
parents:
diff changeset
  1091
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 30 225 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 20 68 119 116 164 125 126 30 17 17 17 20 68 119 122 74 215 209 225 17 17 17 20 68 119 116 164 125 126 30 17 17 17 19 51 102 99 147 108 96 240 17 17 17 19 51 102 105 57 198 207 15 17 17 17 19 51 102 99 147 108 96 240 17 17 17 18 34 85 82 130 91 94 238 17 17 17 18 34 85 88 40 181 190 238 17 17 17 18 34 85 82 130 91 94 238]) ; 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:(#[0 0 0 32 0 0 0 0 0 35 51 128 36 74 64 36 74 64 19 50 64 0 0 0 0 0 0 6 0 0 6 0 0 9 0 0 0 0 0 1 255 252 1 255 252 1 255 252 1 255 252 1 255 252 1 255 252 1 255 252 1 255 252 1 255 252]) ; yourself); yourself! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1092
228524287573 intitial checkin
tz
parents:
diff changeset
  1093
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1094
228524287573 intitial checkin
tz
parents:
diff changeset
  1095
image
228524287573 intitial checkin
tz
parents:
diff changeset
  1096
228524287573 intitial checkin
tz
parents:
diff changeset
  1097
    ^self imageEditView image
228524287573 intitial checkin
tz
parents:
diff changeset
  1098
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1099
228524287573 intitial checkin
tz
parents:
diff changeset
  1100
postOpenAction: anAction
228524287573 intitial checkin
tz
parents:
diff changeset
  1101
228524287573 intitial checkin
tz
parents:
diff changeset
  1102
    postOpenAction := anAction
228524287573 intitial checkin
tz
parents:
diff changeset
  1103
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1104
228524287573 intitial checkin
tz
parents:
diff changeset
  1105
!ImageEditor methodsFor:'accessing - views'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1106
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1107
coordLabel
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1108
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1109
    ^builder componentAt: #coordLabel
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1110
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1111
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1112
fileNameInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1113
228524287573 intitial checkin
tz
parents:
diff changeset
  1114
    ^builder componentAt: #fileNameInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1115
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1116
228524287573 intitial checkin
tz
parents:
diff changeset
  1117
imageEditView
228524287573 intitial checkin
tz
parents:
diff changeset
  1118
228524287573 intitial checkin
tz
parents:
diff changeset
  1119
    ^(builder componentAt: #imageEditView) subViews first 
228524287573 intitial checkin
tz
parents:
diff changeset
  1120
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1121
228524287573 intitial checkin
tz
parents:
diff changeset
  1122
imagePreView
228524287573 intitial checkin
tz
parents:
diff changeset
  1123
228524287573 intitial checkin
tz
parents:
diff changeset
  1124
    ^(builder componentAt: #imagePreView) subViews first 
228524287573 intitial checkin
tz
parents:
diff changeset
  1125
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1126
228524287573 intitial checkin
tz
parents:
diff changeset
  1127
resourceClassInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1128
228524287573 intitial checkin
tz
parents:
diff changeset
  1129
    ^builder componentAt: #resourceClassInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1130
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1131
228524287573 intitial checkin
tz
parents:
diff changeset
  1132
resourceSelectorInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1133
228524287573 intitial checkin
tz
parents:
diff changeset
  1134
    ^builder componentAt: #resourceSelectorInputField
228524287573 intitial checkin
tz
parents:
diff changeset
  1135
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1136
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1137
!ImageEditor methodsFor:'active help'!
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1138
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1139
defaultInfoLabel
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1140
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1141
    |usedColors|
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1142
    self image isNil ifTrue: [^'No image defined'].
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1143
    self image colorMap isNil ifTrue: [usedColors := '?'] ifFalse: [usedColors := self image usedColors size].
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1144
    ^self image width printString, 'x',
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1145
        self image height printString, 'x',
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1146
        (2 raisedTo: self image depth) printString,
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1147
        (self image mask notNil ifTrue: [' (mask + '] ifFalse: ['(']),
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1148
        usedColors printString,
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1149
        ' used colors)'
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1150
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1151
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1152
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1153
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1154
228524287573 intitial checkin
tz
parents:
diff changeset
  1155
imageIsLoaded
228524287573 intitial checkin
tz
parents:
diff changeset
  1156
228524287573 intitial checkin
tz
parents:
diff changeset
  1157
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1158
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1159
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1160
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1161
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1162
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1163
228524287573 intitial checkin
tz
parents:
diff changeset
  1164
listOfColors
228524287573 intitial checkin
tz
parents:
diff changeset
  1165
228524287573 intitial checkin
tz
parents:
diff changeset
  1166
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1167
    (holder := builder bindingAt:#listOfColors) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1168
        builder aspectAt:#listOfColors put:(holder :=  List new).
228524287573 intitial checkin
tz
parents:
diff changeset
  1169
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1170
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1171
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1172
228524287573 intitial checkin
tz
parents:
diff changeset
  1173
selectionOfColor
228524287573 intitial checkin
tz
parents:
diff changeset
  1174
228524287573 intitial checkin
tz
parents:
diff changeset
  1175
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1176
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1177
        builder aspectAt:#selectionOfColor put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  1178
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex).
228524287573 intitial checkin
tz
parents:
diff changeset
  1179
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1180
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1181
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1182
228524287573 intitial checkin
tz
parents:
diff changeset
  1183
valueOfCoordLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1184
228524287573 intitial checkin
tz
parents:
diff changeset
  1185
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1186
    (holder := builder bindingAt:#valueOfCoordLabel) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1187
        builder aspectAt:#valueOfCoordLabel put:(holder :=  ValueHolder new).
228524287573 intitial checkin
tz
parents:
diff changeset
  1188
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1189
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1190
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1191
228524287573 intitial checkin
tz
parents:
diff changeset
  1192
valueOfFileName
228524287573 intitial checkin
tz
parents:
diff changeset
  1193
228524287573 intitial checkin
tz
parents:
diff changeset
  1194
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1195
    (holder := builder bindingAt:#valueOfFileName) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1196
        builder aspectAt:#valueOfFileName put:(holder :=  '' asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1197
        holder addDependent: self
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
valueOfMagnification
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:#valueOfMagnification) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1206
        builder aspectAt:#valueOfMagnification put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  1207
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
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
valueOfResourceClass
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:#valueOfResourceClass) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1216
        builder aspectAt:#valueOfResourceClass put: (holder := '' asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1217
        holder addDependent: self
228524287573 intitial checkin
tz
parents:
diff changeset
  1218
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1219
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1220
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1221
228524287573 intitial checkin
tz
parents:
diff changeset
  1222
valueOfResourceSelector
228524287573 intitial checkin
tz
parents:
diff changeset
  1223
228524287573 intitial checkin
tz
parents:
diff changeset
  1224
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1225
    (holder := builder bindingAt:#valueOfResourceSelector) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1226
        builder aspectAt:#valueOfResourceSelector put: (holder := '' asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1227
        holder addDependent: self
228524287573 intitial checkin
tz
parents:
diff changeset
  1228
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1229
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1230
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1231
228524287573 intitial checkin
tz
parents:
diff changeset
  1232
!ImageEditor methodsFor:'change & update'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1233
228524287573 intitial checkin
tz
parents:
diff changeset
  1234
update:something with:aParameter from:changedObject
228524287573 intitial checkin
tz
parents:
diff changeset
  1235
228524287573 intitial checkin
tz
parents:
diff changeset
  1236
    something == #value
228524287573 intitial checkin
tz
parents:
diff changeset
  1237
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1238
    [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1239
        (changedObject = self valueOfResourceClass)
228524287573 intitial checkin
tz
parents:
diff changeset
  1240
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1241
        [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1242
            |s what m|
228524287573 intitial checkin
tz
parents:
diff changeset
  1243
            s := self resourceClassInputField contents withoutSpaces.
228524287573 intitial checkin
tz
parents:
diff changeset
  1244
            what := Smalltalk classnameCompletion:s.
228524287573 intitial checkin
tz
parents:
diff changeset
  1245
            self resourceClassInputField contents:what first.
228524287573 intitial checkin
tz
parents:
diff changeset
  1246
            (what at:2) size ~~ 1 ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1247
                Display beep
228524287573 intitial checkin
tz
parents:
diff changeset
  1248
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1249
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1250
        (changedObject = self valueOfResourceClass) | (changedObject = self valueOfResourceSelector)
228524287573 intitial checkin
tz
parents:
diff changeset
  1251
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1252
        [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1253
            self loadFromMessage: self resourceClassInputField contents, ' ', self resourceSelectorInputField contents
228524287573 intitial checkin
tz
parents:
diff changeset
  1254
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1255
        (changedObject = self valueOfFileName)
228524287573 intitial checkin
tz
parents:
diff changeset
  1256
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1257
        [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1258
            self loadFromFile: self fileNameInputField contents
228524287573 intitial checkin
tz
parents:
diff changeset
  1259
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1260
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1261
228524287573 intitial checkin
tz
parents:
diff changeset
  1262
    super update:something with:aParameter from:changedObject
228524287573 intitial checkin
tz
parents:
diff changeset
  1263
228524287573 intitial checkin
tz
parents:
diff changeset
  1264
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1265
228524287573 intitial checkin
tz
parents:
diff changeset
  1266
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1267
228524287573 intitial checkin
tz
parents:
diff changeset
  1268
colorMapMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1269
228524287573 intitial checkin
tz
parents:
diff changeset
  1270
    ^colorMapMode = aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1271
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1272
228524287573 intitial checkin
tz
parents:
diff changeset
  1273
colorMapMode: aMode value: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1274
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1275
    |depth newColorMap newImage image newColors realColorMap oldFileName| 
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1276
228524287573 intitial checkin
tz
parents:
diff changeset
  1277
    newColorMap := self class listOfColorMaps at: aMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1278
    depth := (newColorMap size log: 2) asInteger. 
228524287573 intitial checkin
tz
parents:
diff changeset
  1279
    newImage := (Image implementorForDepth: depth) new.  
228524287573 intitial checkin
tz
parents:
diff changeset
  1280
    oldFileName := self image fileName.
228524287573 intitial checkin
tz
parents:
diff changeset
  1281
    Object errorSignal handle:
228524287573 intitial checkin
tz
parents:
diff changeset
  1282
    [:ex|
228524287573 intitial checkin
tz
parents:
diff changeset
  1283
        Object errorSignal handle:
228524287573 intitial checkin
tz
parents:
diff changeset
  1284
        [:ex|
228524287573 intitial checkin
tz
parents:
diff changeset
  1285
            ^self warn: 'Convertation failed!!'
228524287573 intitial checkin
tz
parents:
diff changeset
  1286
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1287
        do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1288
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1289
            self image colorsFromX:0 y:0 toX:(self image width-1) y:(self image height-1) do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1290
            [:x :y :clr |
228524287573 intitial checkin
tz
parents:
diff changeset
  1291
                (newColorMap includes: clr)
228524287573 intitial checkin
tz
parents:
diff changeset
  1292
                    ifTrue: [self image colorAtX:x y:y put:clr]
228524287573 intitial checkin
tz
parents:
diff changeset
  1293
                    ifFalse: [self image colorAtX:x y:y put: self image colorMap first]
228524287573 intitial checkin
tz
parents:
diff changeset
  1294
            ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1295
            image := newImage fromImage: self image.
228524287573 intitial checkin
tz
parents:
diff changeset
  1296
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1297
    ] 
228524287573 intitial checkin
tz
parents:
diff changeset
  1298
    do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1299
    [ 
228524287573 intitial checkin
tz
parents:
diff changeset
  1300
        image := newImage fromImage: self image
228524287573 intitial checkin
tz
parents:
diff changeset
  1301
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1302
    (String fromString: aMode) reverse readStream nextWord reverse = 'mask'
228524287573 intitial checkin
tz
parents:
diff changeset
  1303
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1304
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1305
        image mask isNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1306
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1307
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  1308
            image mask: (Depth1Image fromImage: (image asThresholdMonochromeImage: 0.1)). 
228524287573 intitial checkin
tz
parents:
diff changeset
  1309
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1310
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1311
    ifFalse:
228524287573 intitial checkin
tz
parents:
diff changeset
  1312
    [ 
228524287573 intitial checkin
tz
parents:
diff changeset
  1313
        image mask: nil.
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1314
    ]. 
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1315
    realColorMap := OrderedCollection new.
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1316
    image realColorMap do:
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1317
    [:clr|
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1318
        (realColorMap includes: clr) ifFalse: [realColorMap add: clr]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1319
    ].
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1320
    newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1321
    newColorMap do:
228524287573 intitial checkin
tz
parents:
diff changeset
  1322
    [:clr|
228524287573 intitial checkin
tz
parents:
diff changeset
  1323
        ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
228524287573 intitial checkin
tz
parents:
diff changeset
  1324
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1325
        [      
228524287573 intitial checkin
tz
parents:
diff changeset
  1326
            newColors add: clr
228524287573 intitial checkin
tz
parents:
diff changeset
  1327
        ]
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
  1328
    ].       
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1329
    image colorMap: newColors.
228524287573 intitial checkin
tz
parents:
diff changeset
  1330
    colorMapMode := aMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1331
    (self imageEditView image: image) notNil
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
        self image fileName: oldFileName.
228524287573 intitial checkin
tz
parents:
diff changeset
  1335
        self listOfColors contents: image colorMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  1336
        self findColorMapMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1337
        self updateInputFieldsAndLabelsAndHistory.
228524287573 intitial checkin
tz
parents:
diff changeset
  1338
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1339
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1340
228524287573 intitial checkin
tz
parents:
diff changeset
  1341
editMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1342
228524287573 intitial checkin
tz
parents:
diff changeset
  1343
    ^self imageEditView editMode = aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1344
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1345
228524287573 intitial checkin
tz
parents:
diff changeset
  1346
editMode: aMode value: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1347
228524287573 intitial checkin
tz
parents:
diff changeset
  1348
    self imageEditView editMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1349
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1350
228524287573 intitial checkin
tz
parents:
diff changeset
  1351
mouseKeyColorMode: aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1352
228524287573 intitial checkin
tz
parents:
diff changeset
  1353
    ^self imageEditView mouseKeyColorMode = aMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1354
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1355
228524287573 intitial checkin
tz
parents:
diff changeset
  1356
mouseKeyColorMode: aMode value: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1357
228524287573 intitial checkin
tz
parents:
diff changeset
  1358
    self imageEditView mouseKeyColorMode: aMode.
228524287573 intitial checkin
tz
parents:
diff changeset
  1359
228524287573 intitial checkin
tz
parents:
diff changeset
  1360
    self selectionOfColor value: (self listOfColors indexOf: self imageEditView selectedColor).
228524287573 intitial checkin
tz
parents:
diff changeset
  1361
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1362
228524287573 intitial checkin
tz
parents:
diff changeset
  1363
!ImageEditor methodsFor:'private'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1364
228524287573 intitial checkin
tz
parents:
diff changeset
  1365
findColorMapMode
228524287573 intitial checkin
tz
parents:
diff changeset
  1366
228524287573 intitial checkin
tz
parents:
diff changeset
  1367
    self image depth > 8 ifTrue: [colorMapMode := ''. self listOfColors removeAll. ^nil].
228524287573 intitial checkin
tz
parents:
diff changeset
  1368
    colorMapMode := self image depth printString, '-plane'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1369
    self listOfColors isEmpty
228524287573 intitial checkin
tz
parents:
diff changeset
  1370
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1371
    [   
228524287573 intitial checkin
tz
parents:
diff changeset
  1372
         self colorMapMode: colorMapMode value: nil
228524287573 intitial checkin
tz
parents:
diff changeset
  1373
    ].       
228524287573 intitial checkin
tz
parents:
diff changeset
  1374
    self imageEditView selectColor: (Array with: (self listOfColors at: 1) with: (self listOfColors at: 2)).
228524287573 intitial checkin
tz
parents:
diff changeset
  1375
    self image mask notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1376
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1377
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1378
        colorMapMode := colorMapMode, ' + mask'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1379
        self listOfColors addFirst: (Color basicNew setColorId:0).
228524287573 intitial checkin
tz
parents:
diff changeset
  1380
        self imageEditView selectColor: (Array with: (self listOfColors at: 2) with: (self listOfColors at: 1)).
228524287573 intitial checkin
tz
parents:
diff changeset
  1381
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1382
    self selectionOfColor value: 0.
228524287573 intitial checkin
tz
parents:
diff changeset
  1383
    self selectionOfColor value: (self listOfColors indexOf: self imageEditView selectedColor).
228524287573 intitial checkin
tz
parents:
diff changeset
  1384
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1385
228524287573 intitial checkin
tz
parents:
diff changeset
  1386
sortColorColumn: aColumn
228524287573 intitial checkin
tz
parents:
diff changeset
  1387
228524287573 intitial checkin
tz
parents:
diff changeset
  1388
228524287573 intitial checkin
tz
parents:
diff changeset
  1389
228524287573 intitial checkin
tz
parents:
diff changeset
  1390
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1391
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1392
updateForNoneImage
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1393
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1394
    self imageIsLoaded value: false.
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1395
    self listOfColors removeAll.
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1396
    self imagePreView image: nil
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1397
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1398
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1399
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1400
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1401
!
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  1402
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1403
updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1404
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1405
    self valueOfInfoLabel value: self defaultInfoLabel
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1406
228524287573 intitial checkin
tz
parents:
diff changeset
  1407
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1408
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1409
updateInputFields
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1410
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1411
    self valueOfResourceSelector removeDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1412
    self valueOfResourceSelector value: self imageEditView resourceSelector.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1413
    self valueOfResourceSelector addDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1414
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1415
    self valueOfResourceClass removeDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1416
    self imageEditView resourceClass notNil
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1417
        ifTrue: [self valueOfResourceClass value: self imageEditView resourceClass]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1418
        ifFalse: [self valueOfResourceClass value: ''].
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1419
    self valueOfResourceClass addDependent: self.
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1420
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1421
!
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1422
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1423
updateInputFieldsAndLabelsAndHistory
228524287573 intitial checkin
tz
parents:
diff changeset
  1424
228524287573 intitial checkin
tz
parents:
diff changeset
  1425
    self imageIsLoaded value: self image notNil.
228524287573 intitial checkin
tz
parents:
diff changeset
  1426
228524287573 intitial checkin
tz
parents:
diff changeset
  1427
    self image isNil ifTrue: [^nil].
228524287573 intitial checkin
tz
parents:
diff changeset
  1428
228524287573 intitial checkin
tz
parents:
diff changeset
  1429
    self updateInfoLabel.
228524287573 intitial checkin
tz
parents:
diff changeset
  1430
228524287573 intitial checkin
tz
parents:
diff changeset
  1431
    self valueOfFileName removeDependent: self.
228524287573 intitial checkin
tz
parents:
diff changeset
  1432
    self valueOfFileName value: self image fileName.
228524287573 intitial checkin
tz
parents:
diff changeset
  1433
    self valueOfFileName addDependent: self.
228524287573 intitial checkin
tz
parents:
diff changeset
  1434
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1435
    self updateInputFields.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1436
228524287573 intitial checkin
tz
parents:
diff changeset
  1437
    self imageEditView resourceMessage asCollectionOfWords size = 2
228524287573 intitial checkin
tz
parents:
diff changeset
  1438
        ifTrue: [self addToHistory: self imageEditView resourceMessage -> #loadFromMessage:].
228524287573 intitial checkin
tz
parents:
diff changeset
  1439
228524287573 intitial checkin
tz
parents:
diff changeset
  1440
    self image fileName notNil
228524287573 intitial checkin
tz
parents:
diff changeset
  1441
        ifTrue: [self addToHistory: self image fileName -> #loadFromFile:].
228524287573 intitial checkin
tz
parents:
diff changeset
  1442
228524287573 intitial checkin
tz
parents:
diff changeset
  1443
228524287573 intitial checkin
tz
parents:
diff changeset
  1444
228524287573 intitial checkin
tz
parents:
diff changeset
  1445
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1446
228524287573 intitial checkin
tz
parents:
diff changeset
  1447
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1448
228524287573 intitial checkin
tz
parents:
diff changeset
  1449
magnification
228524287573 intitial checkin
tz
parents:
diff changeset
  1450
228524287573 intitial checkin
tz
parents:
diff changeset
  1451
    (builder componentAt: #imageEditView) isNil ifTrue: [^1].
228524287573 intitial checkin
tz
parents:
diff changeset
  1452
    ^self imageEditView magnification x
228524287573 intitial checkin
tz
parents:
diff changeset
  1453
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1454
228524287573 intitial checkin
tz
parents:
diff changeset
  1455
magnification: aValue
228524287573 intitial checkin
tz
parents:
diff changeset
  1456
228524287573 intitial checkin
tz
parents:
diff changeset
  1457
    |magnification|
228524287573 intitial checkin
tz
parents:
diff changeset
  1458
    magnification := aValue asInteger asPoint.
228524287573 intitial checkin
tz
parents:
diff changeset
  1459
    (magnification = self imageEditView magnification) | (magnification = (0@0)) ifTrue: [^nil].
228524287573 intitial checkin
tz
parents:
diff changeset
  1460
    self imageEditView magnification: magnification
228524287573 intitial checkin
tz
parents:
diff changeset
  1461
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1462
228524287573 intitial checkin
tz
parents:
diff changeset
  1463
selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  1464
228524287573 intitial checkin
tz
parents:
diff changeset
  1465
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  1466
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1467
228524287573 intitial checkin
tz
parents:
diff changeset
  1468
selectedColorIndex: anIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  1469
228524287573 intitial checkin
tz
parents:
diff changeset
  1470
    selectedColorIndex := anIndex.    
228524287573 intitial checkin
tz
parents:
diff changeset
  1471
    self imageEditView selectedColor: (self listOfColors at: anIndex ifAbsent: [^nil])
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
!ImageEditor methodsFor:'startup / release'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1476
228524287573 intitial checkin
tz
parents:
diff changeset
  1477
closeRequest
228524287573 intitial checkin
tz
parents:
diff changeset
  1478
228524287573 intitial checkin
tz
parents:
diff changeset
  1479
    self imageEditView checkModified ifTrue:[super closeRequest]
228524287573 intitial checkin
tz
parents:
diff changeset
  1480
228524287573 intitial checkin
tz
parents:
diff changeset
  1481
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1482
228524287573 intitial checkin
tz
parents:
diff changeset
  1483
open
228524287573 intitial checkin
tz
parents:
diff changeset
  1484
228524287573 intitial checkin
tz
parents:
diff changeset
  1485
    super open.
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  1486
420
7fd01e47c912 unnecessary spec selectors removed
tz
parents: 415
diff changeset
  1487
    self imageEditView masterApplication: self.
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  1488
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1489
    self resourceClassInputField entryCompletionBlock:
228524287573 intitial checkin
tz
parents:
diff changeset
  1490
    [:value|
228524287573 intitial checkin
tz
parents:
diff changeset
  1491
        |what|
228524287573 intitial checkin
tz
parents:
diff changeset
  1492
        what := Smalltalk classnameCompletion: value withoutSpaces.
228524287573 intitial checkin
tz
parents:
diff changeset
  1493
        self resourceClassInputField contents:what first.
228524287573 intitial checkin
tz
parents:
diff changeset
  1494
        (what at:2) size ~~ 1 ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1495
            Display beep
228524287573 intitial checkin
tz
parents:
diff changeset
  1496
        ]
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  1497
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1498
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1499
228524287573 intitial checkin
tz
parents:
diff changeset
  1500
postOpenWith:aBuilder
228524287573 intitial checkin
tz
parents:
diff changeset
  1501
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
  1502
    self imageEditView masterApplication: self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1503
    postOpenAction notNil ifTrue: [postOpenAction value].
228524287573 intitial checkin
tz
parents:
diff changeset
  1504
    super postOpenWith:aBuilder.
228524287573 intitial checkin
tz
parents:
diff changeset
  1505
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1506
228524287573 intitial checkin
tz
parents:
diff changeset
  1507
reOpen
228524287573 intitial checkin
tz
parents:
diff changeset
  1508
228524287573 intitial checkin
tz
parents:
diff changeset
  1509
    self imageEditView checkModified ifTrue:[super reOpen]
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:'user actions - editing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1514
228524287573 intitial checkin
tz
parents:
diff changeset
  1515
browseClass
228524287573 intitial checkin
tz
parents:
diff changeset
  1516
228524287573 intitial checkin
tz
parents:
diff changeset
  1517
    SystemBrowser openInClass: (Smalltalk at: self imageEditView resourceClass ifAbsent: [^nil]) class selector: self imageEditView resourceSelector
228524287573 intitial checkin
tz
parents:
diff changeset
  1518
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1519
228524287573 intitial checkin
tz
parents:
diff changeset
  1520
flipHorizontal
228524287573 intitial checkin
tz
parents:
diff changeset
  1521
228524287573 intitial checkin
tz
parents:
diff changeset
  1522
    self imageEditView flipHorizontal
228524287573 intitial checkin
tz
parents:
diff changeset
  1523
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1524
228524287573 intitial checkin
tz
parents:
diff changeset
  1525
flipVertical
228524287573 intitial checkin
tz
parents:
diff changeset
  1526
228524287573 intitial checkin
tz
parents:
diff changeset
  1527
    self imageEditView flipVertical
228524287573 intitial checkin
tz
parents:
diff changeset
  1528
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1529
228524287573 intitial checkin
tz
parents:
diff changeset
  1530
magnifyDown
228524287573 intitial checkin
tz
parents:
diff changeset
  1531
228524287573 intitial checkin
tz
parents:
diff changeset
  1532
    self valueOfMagnification value > 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1533
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1534
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1535
        self valueOfMagnification value: self valueOfMagnification value - 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1536
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1537
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1538
228524287573 intitial checkin
tz
parents:
diff changeset
  1539
magnifyImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1540
228524287573 intitial checkin
tz
parents:
diff changeset
  1541
    self imageEditView magnifyImage.   
228524287573 intitial checkin
tz
parents:
diff changeset
  1542
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1543
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1544
228524287573 intitial checkin
tz
parents:
diff changeset
  1545
magnifyUp
228524287573 intitial checkin
tz
parents:
diff changeset
  1546
228524287573 intitial checkin
tz
parents:
diff changeset
  1547
    self valueOfMagnification value < 99
228524287573 intitial checkin
tz
parents:
diff changeset
  1548
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1549
    [
228524287573 intitial checkin
tz
parents:
diff changeset
  1550
        self valueOfMagnification value: self valueOfMagnification value + 1
228524287573 intitial checkin
tz
parents:
diff changeset
  1551
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  1552
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1553
228524287573 intitial checkin
tz
parents:
diff changeset
  1554
negativeImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1555
228524287573 intitial checkin
tz
parents:
diff changeset
  1556
    self imageEditView negativeImage.
228524287573 intitial checkin
tz
parents:
diff changeset
  1557
    self listOfColors removeAll.
228524287573 intitial checkin
tz
parents:
diff changeset
  1558
    self findColorMapMode.     
228524287573 intitial checkin
tz
parents:
diff changeset
  1559
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1560
228524287573 intitial checkin
tz
parents:
diff changeset
  1561
resizeImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1562
228524287573 intitial checkin
tz
parents:
diff changeset
  1563
    self imageEditView resizeImage.   
228524287573 intitial checkin
tz
parents:
diff changeset
  1564
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1565
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1566
228524287573 intitial checkin
tz
parents:
diff changeset
  1567
rotateImage
228524287573 intitial checkin
tz
parents:
diff changeset
  1568
228524287573 intitial checkin
tz
parents:
diff changeset
  1569
    self imageEditView rotateImage.
228524287573 intitial checkin
tz
parents:
diff changeset
  1570
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  1571
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1572
228524287573 intitial checkin
tz
parents:
diff changeset
  1573
undo
228524287573 intitial checkin
tz
parents:
diff changeset
  1574
228524287573 intitial checkin
tz
parents:
diff changeset
  1575
    self imageEditView undo
228524287573 intitial checkin
tz
parents:
diff changeset
  1576
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1577
228524287573 intitial checkin
tz
parents:
diff changeset
  1578
!ImageEditor methodsFor:'user actions - loading'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1579
228524287573 intitial checkin
tz
parents:
diff changeset
  1580
loadFromClass
228524287573 intitial checkin
tz
parents:
diff changeset
  1581
228524287573 intitial checkin
tz
parents:
diff changeset
  1582
    self loadFromInClassesOf: #Object.
228524287573 intitial checkin
tz
parents:
diff changeset
  1583
   
228524287573 intitial checkin
tz
parents:
diff changeset
  1584
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1585
228524287573 intitial checkin
tz
parents:
diff changeset
  1586
loadFromClassWithSuperclass
228524287573 intitial checkin
tz
parents:
diff changeset
  1587
228524287573 intitial checkin
tz
parents:
diff changeset
  1588
    |box|
228524287573 intitial checkin
tz
parents:
diff changeset
  1589
    box := EnterBox new.
228524287573 intitial checkin
tz
parents:
diff changeset
  1590
    box title:'Name of superclass:'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1591
    box okText:'OK'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1592
    box abortText:'Cancel'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1593
    box initialText: 'ApplicationModel'.
228524287573 intitial checkin
tz
parents:
diff changeset
  1594
    box showAtPointer.
228524287573 intitial checkin
tz
parents:
diff changeset
  1595
    box accepted
228524287573 intitial checkin
tz
parents:
diff changeset
  1596
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  1597
    [            
228524287573 intitial checkin
tz
parents:
diff changeset
  1598
        self loadFromInClassesOf: box contents asSymbol
461
aed297a2d395 load errors removed
tz
parents: 460
diff changeset
  1599
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1600
228524287573 intitial checkin
tz
parents:
diff changeset
  1601
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1602
228524287573 intitial checkin
tz
parents:
diff changeset
  1603
loadFromFile
228524287573 intitial checkin
tz
parents:
diff changeset
  1604
228524287573 intitial checkin
tz
parents:
diff changeset
  1605
    self loadFromFile:
228524287573 intitial checkin
tz
parents:
diff changeset
  1606
        (FileSelectionBrowser
228524287573 intitial checkin
tz
parents:
diff changeset
  1607
            request: 'Load Image From' 
228524287573 intitial checkin
tz
parents:
diff changeset
  1608
            fileFilters: FileSelectionBrowser loadImageFileNameFilters)
228524287573 intitial checkin
tz
parents:
diff changeset
  1609
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1610
228524287573 intitial checkin
tz
parents:
diff changeset
  1611
loadFromFile: aFileName