ImageEditor.st
author Claus Gittinger <cg@exept.de>
Fri, 04 Sep 1998 13:32:06 +0200
changeset 980 bd21079f40e1
parent 976 abd5f51e3e64
child 982 2dda94c7ff25
permissions -rw-r--r--
show waitCursor while loading from file.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
400
228524287573 intitial checkin
tz
parents:
diff changeset
     1
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
     2
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
     4
228524287573 intitial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
     7
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
     9
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    11
"
228524287573 intitial checkin
tz
parents:
diff changeset
    12
228524287573 intitial checkin
tz
parents:
diff changeset
    13
ToolApplicationModel subclass:#ImageEditor
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
    14
	instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
    15
		selectedColorIndex postOpenAction'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    16
	classVariableNames:''
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    17
	poolDictionaries:''
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    18
	category:'Interface-UIPainter'
400
228524287573 intitial checkin
tz
parents:
diff changeset
    19
!
228524287573 intitial checkin
tz
parents:
diff changeset
    20
228524287573 intitial checkin
tz
parents:
diff changeset
    21
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    22
228524287573 intitial checkin
tz
parents:
diff changeset
    23
copyright
228524287573 intitial checkin
tz
parents:
diff changeset
    24
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    25
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    26
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
    27
228524287573 intitial checkin
tz
parents:
diff changeset
    28
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    30
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    32
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    33
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    34
"
228524287573 intitial checkin
tz
parents:
diff changeset
    35
!
228524287573 intitial checkin
tz
parents:
diff changeset
    36
228524287573 intitial checkin
tz
parents:
diff changeset
    37
documentation
228524287573 intitial checkin
tz
parents:
diff changeset
    38
"
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
    39
    Image Editor allows you to create, design, modify or just inspect images.
400
228524287573 intitial checkin
tz
parents:
diff changeset
    40
228524287573 intitial checkin
tz
parents:
diff changeset
    41
    [start with:]
228524287573 intitial checkin
tz
parents:
diff changeset
    42
        ImageEditor open
941
6d75430a8120 fixed start call in docu
tz
parents: 937
diff changeset
    43
        ImageEditor openOnClass:Icon andSelector:#startIcon
400
228524287573 intitial checkin
tz
parents:
diff changeset
    44
228524287573 intitial checkin
tz
parents:
diff changeset
    45
    [see also:]
228524287573 intitial checkin
tz
parents:
diff changeset
    46
        ImageEditView Image
228524287573 intitial checkin
tz
parents:
diff changeset
    47
228524287573 intitial checkin
tz
parents:
diff changeset
    48
    [author:]
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
    49
        Thomas Zwick, eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    50
"
228524287573 intitial checkin
tz
parents:
diff changeset
    51
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    52
228524287573 intitial checkin
tz
parents:
diff changeset
    53
!ImageEditor class methodsFor:'instance creation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    54
228524287573 intitial checkin
tz
parents:
diff changeset
    55
openModalOnClass: aClass andSelector: aSelector
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    56
    "opens modal a Image Editor on aClass and aSelector"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    57
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    58
     self openModalOnClass: self andSelector: #leftMouseKeyIcon
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    59
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    60
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    61
    |imageEditor imageEditView className resourceClassName resourceSelector| 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    62
400
228524287573 intitial checkin
tz
parents:
diff changeset
    63
    imageEditor := self new.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    64
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    65
    aClass isClass  ifTrue: [className := aClass name].
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    66
    aClass isString ifTrue: [className := aClass].      
903
63203d996e61 openModal bug fixed
tz
parents: 901
diff changeset
    67
    aClass isNil    ifTrue: [className := ''].      
400
228524287573 intitial checkin
tz
parents:
diff changeset
    68
688
788fe83ab3c0 time clock removed
tz
parents: 679
diff changeset
    69
    imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector].
400
228524287573 intitial checkin
tz
parents:
diff changeset
    70
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
    71
688
788fe83ab3c0 time clock removed
tz
parents: 679
diff changeset
    72
    resourceClassName := imageEditView resourceClass.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    73
    resourceSelector  := imageEditView resourceSelector.
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    74
815
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    75
    ((className asString ~= resourceClassName) 
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    76
    or:[aSelector asString ~= resourceSelector])
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    77
        ifTrue: [^resourceClassName, ' ', resourceSelector]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    78
        ifFalse:[^nil]
400
228524287573 intitial checkin
tz
parents:
diff changeset
    79
!
228524287573 intitial checkin
tz
parents:
diff changeset
    80
228524287573 intitial checkin
tz
parents:
diff changeset
    81
openOnClass: aClass andSelector: aSelector
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    82
    "opens a Image Editor on aClass and aSelector"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    83
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    84
     self openOnClass: self andSelector: #leftMouseKeyIcon
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    85
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    86
228524287573 intitial checkin
tz
parents:
diff changeset
    87
    ^self open loadFromMessage: aClass name, ' ', aSelector
228524287573 intitial checkin
tz
parents:
diff changeset
    88
!
228524287573 intitial checkin
tz
parents:
diff changeset
    89
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    90
openOnFile: aFileName
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    91
    "opens a Image Editor on aFileName"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    92
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    93
     self openOnFile: 'bitmaps/SmalltalkX.xbm'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    94
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    95
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    96
    ^self open loadFromFile: aFileName
400
228524287573 intitial checkin
tz
parents:
diff changeset
    97
!
228524287573 intitial checkin
tz
parents:
diff changeset
    98
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    99
openOnImage: anImage
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
   100
    "opens a Image Editor on anImage"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   101
    "
895
69269bc88320 checkin from browser
tz
parents: 880
diff changeset
   102
     self openOnImage: Icon startIcon
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   103
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
   104
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   105
    ^self open loadFromImage: anImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   106
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   107
228524287573 intitial checkin
tz
parents:
diff changeset
   108
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
   109
228524287573 intitial checkin
tz
parents:
diff changeset
   110
listOfColorMaps
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   111
    "returns the list of default color maps for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   112
228524287573 intitial checkin
tz
parents:
diff changeset
   113
    |colorMap|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   114
400
228524287573 intitial checkin
tz
parents:
diff changeset
   115
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   116
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   117
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   118
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   119
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   120
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   121
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   122
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   123
        add: Color magenta;
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   124
        add: (Color redByte: 127 greenByte:   0 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   125
        add: (Color redByte:   0 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   126
        add: (Color redByte:   0 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   127
        add: (Color redByte:   0 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   128
        add: (Color redByte: 127 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   129
        add: (Color redByte: 127 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   130
        add: (Color redByte: 127 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   131
        add: (Color redByte: 170 greenByte: 170 blueByte: 170).
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   132
400
228524287573 intitial checkin
tz
parents:
diff changeset
   133
    0 to: 5 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   134
    [:r|                                                    
228524287573 intitial checkin
tz
parents:
diff changeset
   135
        0 to: 5 do:         
228524287573 intitial checkin
tz
parents:
diff changeset
   136
        [:g|
228524287573 intitial checkin
tz
parents:
diff changeset
   137
            0 to: 5 do:                             
228524287573 intitial checkin
tz
parents:
diff changeset
   138
            [:b|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   139
                colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   140
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   141
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   142
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   143
228524287573 intitial checkin
tz
parents:
diff changeset
   144
    1 to: 25 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   145
    [:g|                             
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   146
        colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling)
400
228524287573 intitial checkin
tz
parents:
diff changeset
   147
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   148
228524287573 intitial checkin
tz
parents:
diff changeset
   149
    ^Dictionary new
228524287573 intitial checkin
tz
parents:
diff changeset
   150
        at: '8-plane' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   151
        at: '8-plane + mask' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   152
        at: '4-plane' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   153
        at: '4-plane + mask' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   154
        at: '2-plane' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   155
        at: '2-plane + mask' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   156
        at: '1-plane' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   157
        at: '1-plane + mask' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   158
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   159
!
228524287573 intitial checkin
tz
parents:
diff changeset
   160
228524287573 intitial checkin
tz
parents:
diff changeset
   161
listOfDefaultSizes
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   162
    "returns the list of default sizes for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   163
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   164
    ^#('8x8' '16x16' '22x22' '32x32' '48x48' '64x64')
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   165
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   166
    "Modified: / 31.7.1998 / 01:57:34 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   167
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   168
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   169
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   170
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   171
helpSpec
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   172
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   173
     by the UIHelpTool of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   174
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   175
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   176
     the UIHelpTool may not be able to read the specification."
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   177
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   178
    "
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   179
     UIHelpTool openOnClass:ImageEditor    
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   180
    "
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   181
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   182
    <resource: #help>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   183
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   184
    ^super helpSpec addPairsFrom:#(
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   185
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   186
#colorMap
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   187
'ColorMap functions.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   188
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   189
#colorMap1
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   190
'Convert to depth-1 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   191
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   192
#colorMap2
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   193
'Convert to depth-2 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   194
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   195
#colorMap4
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   196
'Convert to depth-4 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   197
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   198
#colorMap8
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   199
'Convert to depth-8 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   200
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   201
#colorMap1M
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   202
'Convert to depth-1 image plus mask.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   203
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   204
#colorMap2M
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   205
'Convert to depth-2 image plus mask.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   206
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   207
#colorMap4M
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   208
'Convert to depth-4 image plus mask.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   209
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   210
#colorMap8M
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   211
'Convert to depth-8 image plus mask.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   212
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   213
#compressColormap
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   214
'Remove unneeded entries from the colorMap.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   215
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   216
#colorMapTable
675
25a770a729fc some help text changed
tz
parents: 674
diff changeset
   217
'Shows a list of used colors of the image.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   218
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   219
#drawModeBox
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   220
'Switches to box-drawing mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   221
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   222
#drawModeCopy
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   223
'Switches to area-copy mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   224
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   225
#drawModeFill
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   226
'Switches to flood-fill mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   227
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   228
#drawModeFilledBox
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   229
'Switches to filled-box drawing mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   230
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   231
#drawModePaste
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   232
'Switches to paste mode.'
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   233
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   234
#drawModePasteUnder
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   235
'Switches to paste under mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   236
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   237
#drawModePoint
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   238
'Switches to point-drawing mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   239
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   240
#editFlipHorizontal
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   241
'Flips the image horizontally.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   242
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   243
#editFlipVertical
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   244
'Flips the image vertically.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   245
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   246
#editMagnifyImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   247
'Magnify the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   248
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   249
#editNegate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   250
'Invert the images colors.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   251
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   252
#editResize
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   253
'Resize the image (preserving the old image).'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   254
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   255
#editRotate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   256
'Rotate the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   257
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   258
#fileGrabImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   259
'Pick an image from the screen.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   260
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   261
#fileLoadFromClass
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   262
'Select and load an image from a resource method.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   263
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   264
#fileLoadFromFile
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   265
'Select and load an image from a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   266
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   267
#fileNewImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   268
'Create a new image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   269
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   270
#filePrint
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   271
'Print the image on a postscript printer.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   272
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   273
#fileSaveAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   274
'Save the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   275
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   276
#fileSaveMaskAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   277
'Save the mask of the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   278
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   279
#fileSaveMethod
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   280
'Save the image as resource method in the current class and selector.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   281
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   282
#fileSaveMethodAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   283
'Save the image as resource method in a class.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   284
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   285
#historyMenuItem
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   286
'Edit this image.'
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   287
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   288
#magnificationNumber
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   289
'Shows the current magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   290
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   291
#magnifyImageDown
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   292
'Decrease magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   293
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   294
#magnifyImageUp
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   295
'Increase magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   296
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   297
#mouseKeyColorMode
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   298
'Toggles between left and right mouse button color.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   299
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   300
#previewView
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   301
'Shows a preview of the image.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   302
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   303
#settingsGridMagnification
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   304
'Change the grid magnification of the edit view.'
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   305
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   306
)
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   307
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   308
    "Modified: / 29.7.1998 / 22:27:36 / cg"
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   309
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   310
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   311
!ImageEditor class methodsFor:'image specs'!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   312
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   313
leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   314
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   315
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   316
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   317
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   318
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   319
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   320
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   321
     ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   322
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   323
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   324
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   325
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   326
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   327
        constantNamed:#'ImageEditor leftMouseKeyIcon'
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   328
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JEE@@B!!QP@@(TT@@@@@@@AUUP@@UUT@@EUU@@AUUP@@UUT@@EUU@@@UU@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   329
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   330
rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   331
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   332
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   333
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   334
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   335
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   336
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   337
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   338
     ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   339
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   340
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   341
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   342
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   343
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   344
        constantNamed:#'ImageEditor rightMouseKeyIcon'
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   345
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EEJ@@AQR @@TT(@@@@@@@AUUP@@UUT@@EUU@@AUUP@@UUT@@EUU@@@UU@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]! !
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   346
400
228524287573 intitial checkin
tz
parents:
diff changeset
   347
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
   348
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   349
dialogSpecForNewImage
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   350
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   351
     by the UIPainter of ST/X."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   352
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   353
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   354
     the UIPainter may not be able to read the specification."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   355
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   356
    "
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   357
     UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   358
     ImageEditor new openInterface:#dialogSpecForNewImage
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   359
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   360
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   361
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   362
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   363
    ^
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   364
     
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   365
       #(#FullSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   366
          #window: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   367
           #(#WindowSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   368
              #name: 'New Image'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   369
              #layout: #(#LayoutFrame 81 0 288 0 381 0 406 0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   370
              #label: 'New Image'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   371
              #min: #(#Point 10 10)
738210a2fa06 revised version
tz
parents: 651
diff changeset
   372
              #max: #(#Point 1152 900)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   373
              #bounds: #(#Rectangle 81 288 382 407)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   374
              #usePreferredExtent: false
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   375
          )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   376
          #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   377
           #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   378
              #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   379
               #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   380
                 #(#ViewSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   381
                    #name: 'View'
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   382
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -35 1.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   383
                    #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   384
                     #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   385
                        #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   386
                         #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   387
                           #(#FramedBoxSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   388
                              #name: 'framedBox1'
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   389
                              #layout: #(#LayoutFrame 1 0.0 7 0.0 0 0.4 76 0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   390
                              #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   391
                               #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   392
                                  #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   393
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   394
                                     #(#ComboBoxSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   395
                                        #name: 'defaultSizesComboBox'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   396
                                        #layout: #(#LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   397
                                        #model: #selectionOfSize
738210a2fa06 revised version
tz
parents: 651
diff changeset
   398
                                        #type: #string
738210a2fa06 revised version
tz
parents: 651
diff changeset
   399
                                        #comboList: #listOfDefaultSizes
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   400
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   401
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   402
                              )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   403
                              #label: 'Size'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   404
                              #labelPosition: #topLeft
738210a2fa06 revised version
tz
parents: 651
diff changeset
   405
                              #style: #(#FontDescription #helvetica #medium #roman 12)
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   406
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   407
                           #(#FramedBoxSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   408
                              #name: 'framedBox2'
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   409
                              #layout: #(#LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   410
                              #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   411
                               #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   412
                                  #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   413
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   414
                                     #(#ComboListSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   415
                                        #name: 'colorMapComboBox'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   416
                                        #layout: #(#LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   417
                                        #model: #selectionOfColorMap
738210a2fa06 revised version
tz
parents: 651
diff changeset
   418
                                        #comboList: #listOfColorMaps
738210a2fa06 revised version
tz
parents: 651
diff changeset
   419
                                        #useIndex: false
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   420
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   421
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   422
                              )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   423
                              #label: 'Color Map'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   424
                              #labelPosition: #topLeft
738210a2fa06 revised version
tz
parents: 651
diff changeset
   425
                              #style: #(#FontDescription #helvetica #medium #roman 12)
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   426
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   427
                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   428
                    )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   429
                    #level: 1
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   430
                )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   431
                 #(#UISubSpecification
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   432
                    #name: 'windowSpecForCommitWithoutChannels'
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   433
                    #layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   434
                    #minorKey: #windowSpecForCommitWithoutChannels
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   435
                )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   436
              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   437
          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   438
      )
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   439
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   440
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   441
windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   442
    "This resource specification was automatically generated
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   443
     by the UIPainter of ST/X."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   444
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   445
    "Do not manually edit this!! If it is corrupted,
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   446
     the UIPainter may not be able to read the specification."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   447
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   448
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   449
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   450
     ImageEditor new openInterface:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   451
     ImageEditor open
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   452
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   453
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   454
    <resource: #canvas>
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   455
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   456
    ^
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   457
     
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   458
       #(#FullSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   459
          #window: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   460
           #(#WindowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   461
              #name: 'Image Editor'
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   462
              #layout: #(#LayoutFrame 176 0 156 0 675 0 501 0)
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   463
              #label: 'Image Editor'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   464
              #min: #(#Point 400 320)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   465
              #max: #(#Point 1152 900)
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   466
              #bounds: #(#Rectangle 176 156 676 502)
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   467
              #menu: #menu
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   468
              #usePreferredExtent: false
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   469
          )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   470
          #component: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   471
           #(#SpecCollection
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   472
              #collection: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   473
               #(
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   474
                 #(#MenuPanelSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   475
                    #name: 'menuToolbarView'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   476
                    #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   477
                    #menu: #menuToolbar
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   478
                    #style: #(#FontDescription #helvetica #medium #roman 10)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   479
                    #showSeparatingLines: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   480
                )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   481
                 #(#VariableHorizontalPanelSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   482
                    #name: 'variableHorizontalPanel1'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   483
                    #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   484
                    #component: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   485
                     #(#SpecCollection
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   486
                        #collection: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   487
                         #(
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   488
                           #(#ViewSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   489
                              #name: 'view1'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   490
                              #component: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   491
                               #(#SpecCollection
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   492
                                  #collection: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   493
                                   #(
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   494
                                     #(#VariableVerticalPanelSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   495
                                        #name: 'VariableVerticalPanel1'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   496
                                        #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   497
                                        #component: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   498
                                         #(#SpecCollection
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   499
                                            #collection: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   500
                                             #(
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   501
                                               #(#ViewSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   502
                                                  #name: 'View1'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   503
                                                  #component: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   504
                                                   #(#SpecCollection
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   505
                                                      #collection: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   506
                                                       #(
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   507
                                                         #(#MenuPanelSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   508
                                                            #name: 'MouseButtonColorToolBar'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   509
                                                            #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   510
                                                            #menu: #menuMouseButtonColors
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   511
                                                        )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   512
                                                         #(#DataSetSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   513
                                                            #name: 'colorDataSetView'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   514
                                                            #layout: #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   515
                                                            #activeHelpKey: #colorMapTable
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   516
                                                            #model: #selectionOfColor
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   517
                                                            #style: #(#FontDescription #helvetica #medium #roman 10)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   518
                                                            #hasHorizontalScrollBar: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   519
                                                            #hasVerticalScrollBar: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   520
                                                            #miniScrollerHorizontal: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   521
                                                            #miniScrollerVertical: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   522
                                                            #dataList: #listOfColors
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   523
                                                            #has3Dsepartors: true
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   524
                                                            #has3Dseparators: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   525
                                                            #verticalSpacing: 1
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   526
                                                            #columns: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   527
                                                             #(
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   528
                                                               #(#DataSetColumnSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   529
                                                                  #rendererType: #rowSelector
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   530
                                                                  #backgroundSelector: #yourself
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   531
                                                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   532
                                                               #(#DataSetColumnSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   533
                                                                  #label: 'R'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   534
                                                                  #labelAlignment: #left
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   535
                                                                  #columnAlignment: #right
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   536
                                                                  #editorType: #InputField
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   537
                                                                  #type: #number
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   538
                                                                  #model: #redFromColor:
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   539
                                                                  #writeSelector: #redAtColor:put:
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   540
                                                                  #selectSelector: #canSelectRedInColor:
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   541
                                                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   542
                                                               #(#DataSetColumnSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   543
                                                                  #label: 'G'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   544
                                                                  #labelAlignment: #left
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   545
                                                                  #columnAlignment: #right
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   546
                                                                  #editorType: #InputField
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   547
                                                                  #type: #number
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   548
                                                                  #model: #greenFromColor:
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   549
                                                                  #writeSelector: #greenAtColor:put:
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   550
                                                                  #selectSelector: #canSelectGreenInColor:
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   551
                                                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   552
                                                               #(#DataSetColumnSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   553
                                                                  #label: 'B'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   554
                                                                  #labelAlignment: #left
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   555
                                                                  #columnAlignment: #right
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   556
                                                                  #editorType: #InputField
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   557
                                                                  #type: #number
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   558
                                                                  #model: #blueFromColor:
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
   559
                                                                  #writeSelector: #blueAtColor:put:
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   560
                                                                  #selectSelector: #canSelectBlueInColor:
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   561
                                                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   562
                                                            )
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   563
                                                            #columnAdaptor: #colorColumnAdaptor
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   564
                                                        )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   565
                                                      )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   566
                                                  )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   567
                                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   568
                                               #(#ArbitraryComponentSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   569
                                                  #name: 'imagePreView'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   570
                                                  #activeHelpKey: #previewView
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   571
                                                  #hasHorizontalScrollBar: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   572
                                                  #hasVerticalScrollBar: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   573
                                                  #miniScrollerHorizontal: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   574
                                                  #miniScrollerVertical: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   575
                                                  #component: #ImageView
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   576
                                                  #hasBorder: false
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   577
                                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   578
                                            )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   579
                                        )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   580
                                        #handles: #(#Any 0.723776 1.0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   581
                                    )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   582
                                  )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   583
                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   584
                          )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   585
                           #(#ViewSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   586
                              #name: 'view2'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   587
                              #component: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   588
                               #(#SpecCollection
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   589
                                  #collection: 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   590
                                   #(
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   591
                                     #(#ArbitraryComponentSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   592
                                        #name: 'imageEditView'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   593
                                        #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   594
                                        #hasHorizontalScrollBar: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   595
                                        #hasVerticalScrollBar: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   596
                                        #component: #ImageEditView
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   597
                                        #hasBorder: false
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   598
                                    )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   599
                                     #(#LabelSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   600
                                        #name: 'coordLabel'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   601
                                        #layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   602
                                        #labelChannel: #imageInfoHolder
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   603
                                        #level: -1
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   604
                                        #adjust: #left
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   605
                                        #resizeForLabel: false
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   606
                                    )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   607
                                     #(#ArrowButtonSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   608
                                        #name: 'magnifyDownButton'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   609
                                        #layout: #(#LayoutFrame -80 1 -22 1 -58 1 0 1)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   610
                                        #activeHelpKey: #magnifyImageDown
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   611
                                        #model: #doMagnifyDown
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   612
                                        #enableChannel: #imageIsLoaded
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   613
                                        #isTriggerOnDown: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   614
                                        #direction: #left
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   615
                                    )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   616
                                     #(#ArrowButtonSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   617
                                        #name: 'magnifyUpButton'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   618
                                        #layout: #(#LayoutFrame -24 1 -22 1 -2 1 0 1)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   619
                                        #activeHelpKey: #magnifyImageUp
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   620
                                        #model: #doMagnifyUp
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   621
                                        #enableChannel: #imageIsLoaded
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   622
                                        #isTriggerOnDown: true
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   623
                                        #direction: #right
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   624
                                    )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   625
                                     #(#InputFieldSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   626
                                        #name: 'magnificationInputField'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   627
                                        #layout: #(#LayoutFrame -57 1 -22 1 -26 1 0 1)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   628
                                        #activeHelpKey: #magnificationNumber
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   629
                                        #enableChannel: #imageIsLoaded
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   630
                                        #model: #valueOfMagnification
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   631
                                        #type: #numberInRange
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   632
                                        #acceptOnReturn: false
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   633
                                        #acceptOnTab: false
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   634
                                        #numChars: 2
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   635
                                        #minValue: 1
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   636
                                        #maxValue: 99
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   637
                                    )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   638
                                  )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   639
                              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   640
                              #level: -1
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   641
                          )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   642
                        )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   643
                    )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   644
                    #handles: #(#Any 0.276 1.0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   645
                )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   646
                 #(#UISubSpecification
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   647
                    #name: 'infoBarSubSpec'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   648
                    #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   649
                    #majorKey: #ToolApplicationModel
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   650
                    #minorKey: #windowSpecForInfoBar
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   651
                )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   652
              )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   653
          )
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   654
      )
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   655
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
   656
    "Modified: / 7.8.1998 / 22:52:28 / cg"
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   657
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   658
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   659
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   660
400
228524287573 intitial checkin
tz
parents:
diff changeset
   661
menu
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   662
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   663
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
   664
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   665
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   666
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
   667
228524287573 intitial checkin
tz
parents:
diff changeset
   668
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   669
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
   670
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
   671
    "
228524287573 intitial checkin
tz
parents:
diff changeset
   672
228524287573 intitial checkin
tz
parents:
diff changeset
   673
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
   674
228524287573 intitial checkin
tz
parents:
diff changeset
   675
    ^
228524287573 intitial checkin
tz
parents:
diff changeset
   676
     
228524287573 intitial checkin
tz
parents:
diff changeset
   677
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   678
          
228524287573 intitial checkin
tz
parents:
diff changeset
   679
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
   680
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   681
                #label: 'About'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   682
                #translateLabel: true
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   683
                #activeHelpKey: #about
738210a2fa06 revised version
tz
parents: 651
diff changeset
   684
                #labelImage: #(#ResourceRetriever nil #menuIcon)
738210a2fa06 revised version
tz
parents: 651
diff changeset
   685
                #submenuChannel: #menuAbout
400
228524287573 intitial checkin
tz
parents:
diff changeset
   686
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   687
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   688
                #label: 'File'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   689
                #translateLabel: true
738210a2fa06 revised version
tz
parents: 651
diff changeset
   690
                #activeHelpKey: #file
738210a2fa06 revised version
tz
parents: 651
diff changeset
   691
                #submenu: 
400
228524287573 intitial checkin
tz
parents:
diff changeset
   692
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   693
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   694
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   695
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   696
                          #label: 'New...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   697
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   698
                          #value: #doNewImage
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   699
                          #activeHelpKey: #fileNewImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   700
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   701
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   702
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   703
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   704
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   705
                          #label: 'Load...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   706
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   707
                          #value: #doLoadFromClass
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   708
                          #activeHelpKey: #fileLoadFromClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
   709
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   710
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   711
                          #label: 'Load From File...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   712
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   713
                          #value: #doLoadFromFile
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   714
                          #activeHelpKey: #fileLoadFromFile
400
228524287573 intitial checkin
tz
parents:
diff changeset
   715
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   716
                       #(#MenuItem
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   717
                          #label: 'Grab From Screen'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   718
                          #translateLabel: true
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   719
                          #value: #grabScreenImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   720
                          #activeHelpKey: #fileGrabImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   721
                      )
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   722
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   723
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   724
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   725
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   726
                          #label: 'Save'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   727
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   728
                          #value: #doSaveMethod
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   729
                          #activeHelpKey: #fileSaveMethod
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
   730
                          #enabled: #imageIsLoadedAndClassDefined
400
228524287573 intitial checkin
tz
parents:
diff changeset
   731
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   732
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   733
                          #label: 'Save As...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   734
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   735
                          #value: #doSaveMethodAs
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   736
                          #activeHelpKey: #fileSaveMethodAs
738210a2fa06 revised version
tz
parents: 651
diff changeset
   737
                          #enabled: #imageIsLoaded
738210a2fa06 revised version
tz
parents: 651
diff changeset
   738
                      )
738210a2fa06 revised version
tz
parents: 651
diff changeset
   739
                       #(#MenuItem
738210a2fa06 revised version
tz
parents: 651
diff changeset
   740
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   741
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   742
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   743
                          #label: 'Save To File...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   744
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   745
                          #value: #doSaveImageFileAs
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   746
                          #activeHelpKey: #fileSaveAs
738210a2fa06 revised version
tz
parents: 651
diff changeset
   747
                          #enabled: #imageIsLoaded
400
228524287573 intitial checkin
tz
parents:
diff changeset
   748
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   749
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   750
                          #label: 'Save Mask To File...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   751
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   752
                          #value: #doSaveImageMaskFileAs
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   753
                          #activeHelpKey: #fileSaveMaskAs
738210a2fa06 revised version
tz
parents: 651
diff changeset
   754
                          #enabled: #imageIsLoaded
400
228524287573 intitial checkin
tz
parents:
diff changeset
   755
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   756
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   757
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   758
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   759
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   760
                          #label: 'Print'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   761
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   762
                          #value: #doPrint
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   763
                          #activeHelpKey: #filePrint
738210a2fa06 revised version
tz
parents: 651
diff changeset
   764
                          #enabled: #imageIsLoaded
400
228524287573 intitial checkin
tz
parents:
diff changeset
   765
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   766
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   767
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   768
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   769
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   770
                          #label: 'Browse Class'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   771
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   772
                          #value: #doBrowseClass
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   773
                          #activeHelpKey: #fileBrowseClass
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
   774
                          #enabled: #hasClassDefined
400
228524287573 intitial checkin
tz
parents:
diff changeset
   775
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   776
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   777
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   778
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   779
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   780
                          #label: 'Exit'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   781
                          #translateLabel: true
738210a2fa06 revised version
tz
parents: 651
diff changeset
   782
                          #value: #closeRequest
738210a2fa06 revised version
tz
parents: 651
diff changeset
   783
                          #activeHelpKey: #fileExit
400
228524287573 intitial checkin
tz
parents:
diff changeset
   784
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   785
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   786
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   787
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   788
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   789
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   790
                #label: 'Edit'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   791
                #translateLabel: true
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   792
                #activeHelpKey: #edit
738210a2fa06 revised version
tz
parents: 651
diff changeset
   793
                #enabled: #imageIsLoaded
738210a2fa06 revised version
tz
parents: 651
diff changeset
   794
                #submenu: 
400
228524287573 intitial checkin
tz
parents:
diff changeset
   795
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   796
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   797
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   798
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   799
                          #label: 'Undo'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   800
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   801
                          #value: #doUndo
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   802
                          #activeHelpKey: #editUndo
738210a2fa06 revised version
tz
parents: 651
diff changeset
   803
                          #enabled: #valueOfCanUndo
400
228524287573 intitial checkin
tz
parents:
diff changeset
   804
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   805
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   806
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   807
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   808
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   809
                          #label: 'Flip - Vertical'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   810
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   811
                          #value: #doFlipVertical
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   812
                          #activeHelpKey: #editFlipVertical
400
228524287573 intitial checkin
tz
parents:
diff changeset
   813
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   814
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   815
                          #label: 'Flip - Horizontal'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   816
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   817
                          #value: #doFlipHorizontal
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   818
                          #activeHelpKey: #editFlipHorizontal
400
228524287573 intitial checkin
tz
parents:
diff changeset
   819
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   820
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   821
                          #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   822
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   823
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   824
                          #label: 'Resize...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   825
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   826
                          #value: #doResizeImage
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   827
                          #activeHelpKey: #editResize
400
228524287573 intitial checkin
tz
parents:
diff changeset
   828
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   829
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   830
                          #label: 'Magnify...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   831
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   832
                          #value: #doMagnifyImage
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   833
                          #activeHelpKey: #editMagnifyImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
   834
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   835
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   836
                          #label: 'Rotate...'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   837
                          #translateLabel: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   838
                          #value: #doRotateImage
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   839
                          #activeHelpKey: #editRotate
400
228524287573 intitial checkin
tz
parents:
diff changeset
   840
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   841
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   842
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   843
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   844
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   845
             #(#MenuItem
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   846
                #label: 'ColorMap'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   847
                #translateLabel: true
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   848
                #activeHelpKey: #colorMap
738210a2fa06 revised version
tz
parents: 651
diff changeset
   849
                #enabled: #imageIsLoaded
738210a2fa06 revised version
tz
parents: 651
diff changeset
   850
                #submenu: 
400
228524287573 intitial checkin
tz
parents:
diff changeset
   851
                 #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
   852
                    
228524287573 intitial checkin
tz
parents:
diff changeset
   853
                     #(
228524287573 intitial checkin
tz
parents:
diff changeset
   854
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   855
                          #label: '8-Plane'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   856
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   857
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   858
                          #activeHelpKey: #colorMap8
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   859
                          #argument: '8-plane'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   860
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   861
                          #choiceValue: '8-plane'
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   862
                      )
738210a2fa06 revised version
tz
parents: 651
diff changeset
   863
                       #(#MenuItem
738210a2fa06 revised version
tz
parents: 651
diff changeset
   864
                          #label: '4-Plane'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   865
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   866
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   867
                          #activeHelpKey: #colorMap4
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   868
                          #argument: '4-plane'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   869
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   870
                          #choiceValue: '4-plane'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   871
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   872
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   873
                          #label: '2-Plane'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   874
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   875
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   876
                          #activeHelpKey: #colorMap2
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   877
                          #argument: '2-plane'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   878
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   879
                          #choiceValue: '2-plane'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   880
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   881
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   882
                          #label: '1-Plane'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   883
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   884
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   885
                          #activeHelpKey: #colorMap1
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   886
                          #argument: '1-plane'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   887
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   888
                          #choiceValue: '1-plane'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   889
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   890
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   891
                          #label: '-'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   892
                      )
738210a2fa06 revised version
tz
parents: 651
diff changeset
   893
                       #(#MenuItem
738210a2fa06 revised version
tz
parents: 651
diff changeset
   894
                          #label: '8-Plane + Mask'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   895
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   896
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   897
                          #activeHelpKey: #colorMap8M
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   898
                          #argument: '8-plane + mask'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   899
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   900
                          #choiceValue: '8-plane + mask'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   901
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   902
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   903
                          #label: '4-Plane + Mask'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   904
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   905
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   906
                          #activeHelpKey: #colorMap4M
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   907
                          #argument: '4-plane + mask'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   908
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   909
                          #choiceValue: '4-plane + mask'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   910
                      )
228524287573 intitial checkin
tz
parents:
diff changeset
   911
                       #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   912
                          #label: '2-Plane + Mask'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   913
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   914
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   915
                          #activeHelpKey: #colorMap2M
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   916
                          #argument: '2-plane + mask'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   917
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   918
                          #choiceValue: '2-plane + mask'
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   919
                      )
738210a2fa06 revised version
tz
parents: 651
diff changeset
   920
                       #(#MenuItem
738210a2fa06 revised version
tz
parents: 651
diff changeset
   921
                          #label: '1-Plane + Mask'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   922
                          #translateLabel: true
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   923
                          #value: #colorMapMode:
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   924
                          #activeHelpKey: #colorMap1M
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   925
                          #argument: '1-plane + mask'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   926
                          #choice: #colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   927
                          #choiceValue: '1-plane + mask'
400
228524287573 intitial checkin
tz
parents:
diff changeset
   928
                      )
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   929
                       #(#MenuItem
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   930
                          #label: '-'
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   931
                      )
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   932
                       #(#MenuItem
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   933
                          #label: 'Compress colormap'
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   934
                          #translateLabel: true
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
   935
                          #value: #compressColorMap
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   936
                          #activeHelpKey: #compressColormap
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   937
                      )
400
228524287573 intitial checkin
tz
parents:
diff changeset
   938
                    ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   939
                    nil
228524287573 intitial checkin
tz
parents:
diff changeset
   940
                )
228524287573 intitial checkin
tz
parents:
diff changeset
   941
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   942
             #(#MenuItem
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   943
                #label: 'Settings'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   944
                #translateLabel: true
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   945
                #submenu: 
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   946
                 #(#Menu
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   947
                    
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   948
                     #(
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   949
                       #(#MenuItem
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   950
                          #label: 'Grid Magnification...'
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   951
                          #translateLabel: true
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   952
                          #value: #doChangeGridMagnification
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   953
                          #activeHelpKey: #settingsGridMagnification
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   954
                      )
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   955
                       #(#MenuItem
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   956
                          #label: '-'
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   957
                      )
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   958
                       #(#MenuItem
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   959
                          #label: 'Fonts'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   960
                          #translateLabel: true
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   961
                          #submenuChannel: #menuFont
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   962
                      )
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   963
                    ) nil
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   964
                    nil
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   965
                )
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   966
            )
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   967
             #(#MenuItem
756
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
   968
                #label: 'History'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   969
                #translateLabel: true
756
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
   970
                #activeHelpKey: #history
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
   971
                #submenuChannel: #menuHistory
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
   972
            )
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
   973
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   974
                #label: 'Help'
843
273d9a7c2712 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   975
                #translateLabel: true
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   976
                #startGroup: #right
738210a2fa06 revised version
tz
parents: 651
diff changeset
   977
                #activeHelpKey: #help
738210a2fa06 revised version
tz
parents: 651
diff changeset
   978
                #submenuChannel: #menuHelp
400
228524287573 intitial checkin
tz
parents:
diff changeset
   979
            )
228524287573 intitial checkin
tz
parents:
diff changeset
   980
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
   981
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
   982
      )
228524287573 intitial checkin
tz
parents:
diff changeset
   983
!
228524287573 intitial checkin
tz
parents:
diff changeset
   984
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   985
menuMouseButtonColors
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   986
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   987
     by the MenuEditor of ST/X."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   988
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   989
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   990
     the MenuEditor may not be able to read the specification."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   991
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   992
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   993
     MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   994
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   995
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   996
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   997
    <resource: #menu>
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   998
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
   999
    ^
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1000
     
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1001
       #(#Menu
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1002
          
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1003
           #(
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1004
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1005
                #label: 'Left Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1006
                #nameKey: #leftMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1007
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1008
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1009
                #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1010
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1011
                #choiceValue: 1
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1012
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1013
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1014
                #label: 'Right Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1015
                #nameKey: #rightMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1016
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1017
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1018
                #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1019
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1020
                #choiceValue: 2
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1021
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1022
          ) nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1023
          nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1024
      )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1025
!
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1026
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1027
menuToolbar
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1028
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1029
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1030
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1031
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1032
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1033
228524287573 intitial checkin
tz
parents:
diff changeset
  1034
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1035
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
  1036
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  1037
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1038
228524287573 intitial checkin
tz
parents:
diff changeset
  1039
    <resource: #menu>
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
       #(#Menu
228524287573 intitial checkin
tz
parents:
diff changeset
  1044
          
228524287573 intitial checkin
tz
parents:
diff changeset
  1045
           #(
228524287573 intitial checkin
tz
parents:
diff changeset
  1046
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1047
                #label: 'newImage'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1048
                #isButton: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1049
                #value: #doNewImage
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1050
                #activeHelpKey: #fileNewImage
880
a344e9ef09dc images moved to class Icon
tz
parents: 843
diff changeset
  1051
                #labelImage: #(#ResourceRetriever #Icon #newIcon)
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1052
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1053
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1054
                #label: 'loadFromClass'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1055
                #isButton: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1056
                #value: #doLoadFromClass
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1057
                #activeHelpKey: #fileLoadFromClass
880
a344e9ef09dc images moved to class Icon
tz
parents: 843
diff changeset
  1058
                #labelImage: #(#ResourceRetriever #Icon #loadIcon)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1059
            )
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1060
             #(#MenuItem
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1061
                #label: 'saveMethod'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1062
                #isButton: true
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1063
                #value: #doSaveMethod
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1064
                #activeHelpKey: #fileSaveMethod
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1065
                #enabled: #imageIsLoaded
880
a344e9ef09dc images moved to class Icon
tz
parents: 843
diff changeset
  1066
                #labelImage: #(#ResourceRetriever #Icon #saveIcon)
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1067
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1068
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1069
                #label: ''
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1070
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1071
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1072
                #label: ''
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1073
            )
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1074
             #(#MenuItem
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1075
                #label: ''
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1076
            )
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1077
             #(#MenuItem
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1078
                #label: ''
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1079
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1080
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1081
                #label: 'Point'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1082
                #activeHelpKey: #drawModePoint
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1083
                #enabled: #imageIsLoaded
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1084
                #choice: #editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1085
                #choiceValue: #point
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1086
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1087
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1088
                #label: 'Box'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1089
                #activeHelpKey: #drawModeBox
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1090
                #enabled: #imageIsLoaded
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1091
                #choice: #editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1092
                #choiceValue: #box
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1093
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1094
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1095
                #label: 'Filled Box'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1096
                #activeHelpKey: #drawModeFilledBox
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1097
                #enabled: #imageIsLoaded
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1098
                #choice: #editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1099
                #choiceValue: #filledBox
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1100
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1101
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1102
                #label: 'Fill'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1103
                #activeHelpKey: #drawModeFill
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1104
                #enabled: #imageIsLoaded
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1105
                #choice: #editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1106
                #choiceValue: #fill
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1107
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1108
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1109
                #label: 'Copy'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1110
                #activeHelpKey: #drawModeCopy
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1111
                #enabled: #imageIsLoaded
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1112
                #choice: #editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1113
                #choiceValue: #copy
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1114
            )
228524287573 intitial checkin
tz
parents:
diff changeset
  1115
             #(#MenuItem
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1116
                #label: 'Paste'
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1117
                #activeHelpKey: #drawModePaste
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1118
                #enabled: #imageIsLoaded
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1119
                #choice: #editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1120
                #choiceValue: #paste
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1121
            )
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  1122
             #(#MenuItem
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  1123
                #label: 'Paste Under'
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  1124
                #activeHelpKey: #drawModePasteUnder
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  1125
                #enabled: #imageIsLoaded
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1126
                #choice: #editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1127
                #choiceValue: #pasteUnder
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  1128
            )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1129
          ) nil
228524287573 intitial checkin
tz
parents:
diff changeset
  1130
          nil
228524287573 intitial checkin
tz
parents:
diff changeset
  1131
      )
228524287573 intitial checkin
tz
parents:
diff changeset
  1132
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1133
228524287573 intitial checkin
tz
parents:
diff changeset
  1134
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1135
228524287573 intitial checkin
tz
parents:
diff changeset
  1136
image
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1137
    "returns the current editing image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1138
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1139
    ^imageEditView image
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1140
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1141
228524287573 intitial checkin
tz
parents:
diff changeset
  1142
postOpenAction: anAction
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1143
   "sets an action which is evaluated after opening"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1144
228524287573 intitial checkin
tz
parents:
diff changeset
  1145
    postOpenAction := anAction
228524287573 intitial checkin
tz
parents:
diff changeset
  1146
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1147
228524287573 intitial checkin
tz
parents:
diff changeset
  1148
!ImageEditor methodsFor:'accessing - views'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1149
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1150
colorDataSetView
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1151
    "returns the view of the colormap"
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1152
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1153
    ^(builder componentAt: #colorDataSetView)
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1154
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1155
    "Created: / 26.7.1998 / 12:02:14 / cg"
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1156
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1157
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1158
coordLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1159
    "returns the view the coord label"
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1160
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1161
    ^builder componentAt: #coordLabel
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1162
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1163
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1164
imageEditView
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1165
    "returns the view of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1166
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1167
    ^imageEditView := (builder componentAt: #imageEditView) subViews first 
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1168
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1169
228524287573 intitial checkin
tz
parents:
diff changeset
  1170
imagePreView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1171
    "returns the preview of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1172
228524287573 intitial checkin
tz
parents:
diff changeset
  1173
    ^(builder componentAt: #imagePreView) subViews first 
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1174
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1175
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1176
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1177
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1178
activityInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1179
    ^ self valueOfInfoLabel
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1180
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1181
    "Modified: / 29.7.1998 / 18:49:03 / cg"
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1182
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1183
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1184
colorColumnAdaptor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1185
    ^ self
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1186
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1187
    "Created: / 26.7.1998 / 12:17:03 / cg"
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1188
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1189
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1190
hasClassAndSelectorDefined
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1191
    ^ [(Smalltalk at:(imageEditView resourceClass) ifAbsent:nil) notNil
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1192
       and:[imageEditView resourceSelector notNil]]
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1193
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1194
    "Created: / 31.7.1998 / 02:02:54 / cg"
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1195
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1196
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1197
hasClassDefined
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1198
    ^ [(Smalltalk at:(imageEditView resourceClass) ifAbsent:nil) notNil]
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1199
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1200
    "Created: / 31.7.1998 / 02:02:22 / cg"
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1201
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1202
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1203
imageInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1204
    |holder|
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1205
    (holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1206
        builder aspectAt:#imageInfoHolder put:(holder :=  '' asValue).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1207
    ].
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1208
    ^ holder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1209
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1210
    "Modified: / 29.7.1998 / 18:32:08 / cg"
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1211
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1212
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1213
imageIsLoaded
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1214
    "returns whether an image is loaded as value holder"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1215
228524287573 intitial checkin
tz
parents:
diff changeset
  1216
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1217
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1218
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  1219
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1220
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1221
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1222
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1223
imageIsLoadedAndClassDefined
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1224
    "returns whether an image is loaded as value holder"
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1225
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1226
    ^ [self hasClassAndSelectorDefined value
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1227
       and:[self imageIsLoaded value]]
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1228
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1229
    "Created: / 31.7.1998 / 02:04:18 / cg"
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1230
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1231
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1232
listOfColors
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1233
    "returns the list of colors in a List"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1234
228524287573 intitial checkin
tz
parents:
diff changeset
  1235
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1236
    (holder := builder bindingAt:#listOfColors) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1237
        builder aspectAt:#listOfColors put:(holder :=  List new).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1238
        holder addDependent:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1239
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1240
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1241
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1242
228524287573 intitial checkin
tz
parents:
diff changeset
  1243
selectionOfColor
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1244
    "returns current selection of the edit color as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1245
228524287573 intitial checkin
tz
parents:
diff changeset
  1246
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1247
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1248
        builder aspectAt:#selectionOfColor put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  1249
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex).
228524287573 intitial checkin
tz
parents:
diff changeset
  1250
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1251
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1252
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1253
228524287573 intitial checkin
tz
parents:
diff changeset
  1254
valueOfMagnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1255
    "returns current magnification of the image as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1256
228524287573 intitial checkin
tz
parents:
diff changeset
  1257
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  1258
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  1259
        builder aspectAt:#valueOfMagnification put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  1260
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
228524287573 intitial checkin
tz
parents:
diff changeset
  1261
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  1262
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  1263
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1264
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1265
!ImageEditor methodsFor:'change & update'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1266
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1267
findColorMapMode
899
43b744c647ba comment grammar
tz
parents: 898
diff changeset
  1268
    "finds the colorMapMode for a new image"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1269
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1270
    self image depth > 8 ifTrue: [colorMapMode value: ''. self listOfColors removeAll. ^nil].
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1271
976
abd5f51e3e64 use radio buttons (2)
tz
parents: 975
diff changeset
  1272
    colorMapMode value: self image depth printString, '-plane'.
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1273
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1274
    self listOfColors isEmpty
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1275
    ifTrue:
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1276
    [   
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1277
         self colorMapMode: colorMapMode value
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1278
    ].                               
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1279
    imageEditView selectColors: (Array with: (self listOfColors at: 1) with: (self listOfColors at: 2 ifAbsent: [self listOfColors at: 1])).
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  1280
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  1281
    self image mask notNil
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1282
    ifTrue:
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1283
    [             
976
abd5f51e3e64 use radio buttons (2)
tz
parents: 975
diff changeset
  1284
        colorMapMode value: colorMapMode value, ' + mask'.
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1285
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  1286
        (self listOfColors detect: [:clr| clr = (Color basicNew setColorId:0)] ifNone: nil) isNil
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  1287
        ifTrue:
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  1288
        [
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  1289
            self listOfColors addFirst: (Color basicNew setColorId:0).
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1290
            imageEditView selectColors: (Array with: (self listOfColors at: 2 ifAbsent: [self listOfColors at: 1]) with: (self listOfColors at: 1)).
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  1291
        ]
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1292
    ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1293
    self selectionOfColor value: 0.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1294
    self selectionOfColor value: (self listOfColors indexOf: imageEditView selectedColor).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1295
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1296
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1297
update:something with:aParameter from:changedObject
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1298
    |clrIndex|
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1299
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1300
    changedObject == self listOfColors ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1301
        something == #at: ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1302
            "/ colormap entry changed at aParameter
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1303
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1304
            clrIndex := aParameter.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1305
            (self hasMask) ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1306
                clrIndex := clrIndex - 1.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1307
            ].
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1308
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1309
            self image colorMap at:clrIndex put:(changedObject at:aParameter).
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1310
            self colorMapChanged.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1311
            ^ self
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1312
        ].
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1313
    ].
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1314
    super update:something with:aParameter from:changedObject
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1315
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1316
    "Modified: / 18.8.1998 / 17:18:42 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1317
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1318
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1319
updateForNoneImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1320
    "updates channels and view, if image is loaded"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1321
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1322
    self imageIsLoaded value: false.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1323
    self listOfColors removeAll.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1324
    self imagePreView image: nil
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1325
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1326
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1327
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1328
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1329
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1330
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1331
updateLabelsAndHistory
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1332
    "updates labels and history, if something has changed"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1333
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1334
    self imageIsLoaded value: self image notNil.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1335
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1336
    self image isNil ifTrue: [^nil].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1337
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1338
    self updateInfoLabel.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1339
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1340
    imageEditView resourceMessage asCollectionOfWords size = 2
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1341
        ifTrue: [self addToHistory: imageEditView resourceMessage -> #loadFromMessage:].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1342
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1343
    self image fileName notNil
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1344
        ifTrue: [self addToHistory: self image fileName -> #loadFromFile:].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1345
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1346
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1347
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1348
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1349
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1350
!ImageEditor methodsFor:'data access'!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1351
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1352
blueAtColor:aColor put:newBlue
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1353
    "helper used to return a new row element, when blue is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1354
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1355
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1356
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1357
    aColor isNil ifTrue:[^ aColor].  "/ mask cannot be changed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1358
    byte := newBlue clampBetween:0 and:255.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1359
    byte = aColor blueByte ifTrue:[^ aColor].
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1360
    ^ Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1361
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1362
    "Modified: / 18.8.1998 / 17:00:12 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1363
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1364
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1365
blueFromColor:aColor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1366
    "helper used to access a color as a row in the dataSet view"
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1367
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  1368
    aColor isNil ifTrue:[^ 'none'].
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1369
    ^ aColor blueByte ? 'mask'
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1370
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1371
    "Created: / 26.7.1998 / 12:30:35 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  1372
    "Modified: / 31.7.1998 / 01:11:18 / cg"
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1373
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1374
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1375
canSelectBlueInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1376
    ^ aColor blueByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1377
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1378
    "Created: / 7.8.1998 / 22:50:34 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1379
    "Modified: / 7.8.1998 / 22:52:57 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1380
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1381
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1382
canSelectGreenInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1383
    ^ aColor greenByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1384
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1385
    "Created: / 7.8.1998 / 22:50:22 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1386
    "Modified: / 7.8.1998 / 22:52:46 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1387
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1388
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1389
canSelectRedInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1390
    ^ aColor redByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1391
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1392
    "Created: / 7.8.1998 / 22:50:00 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1393
    "Modified: / 7.8.1998 / 22:51:03 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1394
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  1395
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1396
greenAtColor:aColor put:newGreen
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1397
    "helper used to return a new row element, when green is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1398
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1399
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1400
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1401
    aColor isNil ifTrue:[^ aColor].  "/ mask cannot be changed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1402
    byte := newGreen clampBetween:0 and:255.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1403
    byte = aColor greenByte ifTrue:[^ aColor].
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1404
    ^ Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1405
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1406
    "Modified: / 18.8.1998 / 17:00:38 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1407
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  1408
915
99f8e19aab3a better use a colum