ImageEditor.st
author Claus Gittinger <cg@exept.de>
Wed, 02 Oct 2002 15:13:42 +0200
changeset 1616 48f66b7aeb32
parent 1613 1d4f11252d3b
child 1637 2b0f24d74f8e
permissions -rw-r--r--
*** empty log message ***
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
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
    13
"{ Package: 'stx:libtool2' }"
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
    14
400
228524287573 intitial checkin
tz
parents:
diff changeset
    15
ToolApplicationModel subclass:#ImageEditor
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
    16
	instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
    17
		selectedColorIndex postOpenAction imageSeqNr'
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
    18
	classVariableNames:'LastDirectory MaskClipboard'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    19
	poolDictionaries:''
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    20
	category:'Interface-UIPainter'
400
228524287573 intitial checkin
tz
parents:
diff changeset
    21
!
228524287573 intitial checkin
tz
parents:
diff changeset
    22
228524287573 intitial checkin
tz
parents:
diff changeset
    23
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    24
228524287573 intitial checkin
tz
parents:
diff changeset
    25
copyright
228524287573 intitial checkin
tz
parents:
diff changeset
    26
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    27
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    28
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
    29
228524287573 intitial checkin
tz
parents:
diff changeset
    30
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    32
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    34
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    35
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    36
"
228524287573 intitial checkin
tz
parents:
diff changeset
    37
!
228524287573 intitial checkin
tz
parents:
diff changeset
    38
228524287573 intitial checkin
tz
parents:
diff changeset
    39
documentation
228524287573 intitial checkin
tz
parents:
diff changeset
    40
"
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
    41
    Image Editor allows you to create, design, modify or just inspect images.
400
228524287573 intitial checkin
tz
parents:
diff changeset
    42
228524287573 intitial checkin
tz
parents:
diff changeset
    43
    [start with:]
228524287573 intitial checkin
tz
parents:
diff changeset
    44
        ImageEditor open
941
6d75430a8120 fixed start call in docu
tz
parents: 937
diff changeset
    45
        ImageEditor openOnClass:Icon andSelector:#startIcon
400
228524287573 intitial checkin
tz
parents:
diff changeset
    46
228524287573 intitial checkin
tz
parents:
diff changeset
    47
    [see also:]
228524287573 intitial checkin
tz
parents:
diff changeset
    48
        ImageEditView Image
228524287573 intitial checkin
tz
parents:
diff changeset
    49
228524287573 intitial checkin
tz
parents:
diff changeset
    50
    [author:]
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
    51
        Thomas Zwick, eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    52
"
228524287573 intitial checkin
tz
parents:
diff changeset
    53
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    54
228524287573 intitial checkin
tz
parents:
diff changeset
    55
!ImageEditor class methodsFor:'instance creation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    56
228524287573 intitial checkin
tz
parents:
diff changeset
    57
openModalOnClass: aClass andSelector: aSelector
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    58
    "opens modal a Image Editor on aClass and aSelector"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    59
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    60
     self openModalOnClass: self andSelector: #leftMouseKeyIcon
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    61
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    62
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    63
    |imageEditor imageEditView className resourceClassName resourceSelector| 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    64
400
228524287573 intitial checkin
tz
parents:
diff changeset
    65
    imageEditor := self new.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    66
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    67
    aClass isClass  ifTrue: [className := aClass name].
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    68
    aClass isString ifTrue: [className := aClass].      
903
63203d996e61 openModal bug fixed
tz
parents: 901
diff changeset
    69
    aClass isNil    ifTrue: [className := ''].      
400
228524287573 intitial checkin
tz
parents:
diff changeset
    70
688
788fe83ab3c0 time clock removed
tz
parents: 679
diff changeset
    71
    imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector].
400
228524287573 intitial checkin
tz
parents:
diff changeset
    72
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
    73
688
788fe83ab3c0 time clock removed
tz
parents: 679
diff changeset
    74
    resourceClassName := imageEditView resourceClass.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    75
    resourceSelector  := imageEditView resourceSelector.
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    76
815
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    77
    ((className asString ~= resourceClassName) 
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    78
    or:[aSelector asString ~= resourceSelector])
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    79
        ifTrue: [^resourceClassName, ' ', resourceSelector]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    80
        ifFalse:[^nil]
400
228524287573 intitial checkin
tz
parents:
diff changeset
    81
!
228524287573 intitial checkin
tz
parents:
diff changeset
    82
228524287573 intitial checkin
tz
parents:
diff changeset
    83
openOnClass: aClass andSelector: aSelector
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    84
    "opens a Image Editor on aClass and aSelector"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    85
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    86
     self openOnClass: self andSelector: #leftMouseKeyIcon
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    87
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    88
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    89
    |editor|
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    90
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    91
    editor := self new.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    92
    editor allButOpen.
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    93
    aSelector notNil ifTrue:[
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    94
        editor loadFromMessage: aClass name, ' ', aSelector.
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    95
    ] ifFalse:[
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    96
        editor resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    97
    ].
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    98
    editor openWindow
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    99
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   100
    "Modified: / 16.3.1999 / 21:33:49 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   101
!
228524287573 intitial checkin
tz
parents:
diff changeset
   102
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   103
openOnFile: aFileName
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
   104
    "opens a Image Editor on aFileName"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   105
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   106
     self openOnFile: 'bitmaps/SmalltalkX.xbm'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   107
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
   108
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   109
    |editor|
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   110
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   111
    editor := self new.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   112
    editor allButOpen.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   113
    editor loadFromFile: aFileName.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   114
    editor openWindow
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   115
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   116
    "Modified: / 16.3.1999 / 21:33:25 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   117
!
228524287573 intitial checkin
tz
parents:
diff changeset
   118
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   119
openOnImage: anImage
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
   120
    "opens a Image Editor on anImage"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   121
    "
895
69269bc88320 checkin from browser
tz
parents: 880
diff changeset
   122
     self openOnImage: Icon startIcon
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   123
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
   124
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   125
    |editor|
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   126
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   127
    editor := self new.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   128
    editor allButOpen.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   129
    editor loadFromImage: anImage.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   130
    editor openWindow
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   131
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   132
    "Modified: / 11.3.1999 / 16:18:33 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   133
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   134
228524287573 intitial checkin
tz
parents:
diff changeset
   135
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
   136
228524287573 intitial checkin
tz
parents:
diff changeset
   137
listOfColorMaps
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   138
    "returns the list of default color maps for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   139
228524287573 intitial checkin
tz
parents:
diff changeset
   140
    |colorMap|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   141
400
228524287573 intitial checkin
tz
parents:
diff changeset
   142
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   143
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   144
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   145
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   146
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   147
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   148
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   149
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   150
        add: Color magenta;
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   151
        add: (Color redByte: 127 greenByte:   0 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   152
        add: (Color redByte:   0 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   153
        add: (Color redByte:   0 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   154
        add: (Color redByte:   0 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   155
        add: (Color redByte: 127 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   156
        add: (Color redByte: 127 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   157
        add: (Color redByte: 127 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   158
        add: (Color redByte: 170 greenByte: 170 blueByte: 170).
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   159
400
228524287573 intitial checkin
tz
parents:
diff changeset
   160
    0 to: 5 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   161
    [:r|                                                    
228524287573 intitial checkin
tz
parents:
diff changeset
   162
        0 to: 5 do:         
228524287573 intitial checkin
tz
parents:
diff changeset
   163
        [:g|
228524287573 intitial checkin
tz
parents:
diff changeset
   164
            0 to: 5 do:                             
228524287573 intitial checkin
tz
parents:
diff changeset
   165
            [:b|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   166
                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
   167
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   168
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   169
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   170
228524287573 intitial checkin
tz
parents:
diff changeset
   171
    1 to: 25 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   172
    [:g|                             
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   173
        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
   174
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   175
228524287573 intitial checkin
tz
parents:
diff changeset
   176
    ^Dictionary new
228524287573 intitial checkin
tz
parents:
diff changeset
   177
        at: '8-plane' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   178
        at: '8-plane + mask' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   179
        at: '4-plane' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   180
        at: '4-plane + mask' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   181
        at: '2-plane' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   182
        at: '2-plane + mask' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   183
        at: '1-plane' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   184
        at: '1-plane + mask' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   185
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   186
!
228524287573 intitial checkin
tz
parents:
diff changeset
   187
228524287573 intitial checkin
tz
parents:
diff changeset
   188
listOfDefaultSizes
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   189
    "returns the list of default sizes for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   190
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   191
    ^#('8x8' '16x16' '22x22' '32x32' '48x48' '64x64')
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   192
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   193
    "Modified: / 31.7.1998 / 01:57:34 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   194
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   195
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   196
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   197
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   198
flyByHelpSpec
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   199
    <resource: #help>
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   200
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   201
    ^super flyByHelpSpec addPairsFrom:#(
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   202
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   203
#drawModeBox
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   204
'Rectangle'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   205
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   206
#drawModeCopy
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   207
'Copy'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   208
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   209
#drawModeFill
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   210
'Flood-fill'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   211
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   212
#drawModeFilledBox
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   213
'Fill Rectangle'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   214
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   215
#drawModePaste
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   216
'Paste'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   217
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   218
#drawModePasteUnder
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   219
'Paste under'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   220
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   221
#drawModePoint
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   222
'Point'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   223
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   224
#fileGrabImage
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   225
'Pick from screen.'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   226
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   227
#fileLoadFromClass
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   228
'Load from Method'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   229
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   230
#fileLoadFromFile
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   231
'Load from File.'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   232
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   233
#fileNewImage
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   234
'New image'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   235
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   236
#filePrint
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   237
'Print'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   238
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   239
#fileSaveAs
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   240
'Save to file.'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   241
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   242
#fileSaveMaskAs
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   243
'Save to file.'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   244
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   245
#fileSaveMethod
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   246
'Save as method'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   247
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   248
#fileSaveMethodAs
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   249
'Save as method'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   250
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   251
)
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   252
!
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   253
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   254
helpSpec
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   255
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   256
     by the UIHelpTool of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   257
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   258
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   259
     the UIHelpTool may not be able to read the specification."
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   260
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   261
    "
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   262
     UIHelpTool openOnClass:ImageEditor    
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   263
    "
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   264
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   265
    <resource: #help>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   266
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   267
    ^super helpSpec addPairsFrom:#(
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   268
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   269
#colorMap
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   270
'ColorMap functions.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   271
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   272
#colorMap1
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   273
'Convert to depth-1 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   274
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   275
#colorMap1M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   276
'Convert to depth-1 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   277
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   278
#colorMap2
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   279
'Convert to depth-2 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   280
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   281
#colorMap2M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   282
'Convert to depth-2 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   283
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   284
#colorMap4
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   285
'Convert to depth-4 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   286
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   287
#colorMap4M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   288
'Convert to depth-4 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   289
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   290
#colorMap8
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   291
'Convert to depth-8 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   292
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   293
#colorMap8M
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   294
'Convert to depth-8 image plus mask.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   295
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   296
#colorMapTable
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   297
'Shows a list of used colors of the image.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   298
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   299
#compressColormap
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   300
'Remove unneeded entries from the colorMap.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   301
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   302
#cropAll
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   303
'Find and remove all borders.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   304
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   305
#cropBottom
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   306
'Find and remove bottom border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   307
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   308
#cropLeft
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   309
'Find and remove left border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   310
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   311
#cropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   312
'Specify border(s) to remove.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   313
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   314
#cropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   315
'Find and remove right border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   316
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   317
#cropTop
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   318
'Find and remove top border.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   319
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   320
#drawModeBox
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   321
'Switches to box-drawing mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   322
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   323
#drawModeCopy
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   324
'Switches to area-copy mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   325
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   326
#drawModeFill
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   327
'Switches to flood-fill mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   328
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   329
#drawModeFilledBox
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   330
'Switches to filled-box drawing mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   331
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   332
#drawModePaste
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   333
'Switches to paste mode.'
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   334
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   335
#drawModePasteUnder
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   336
'Switches to paste under mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   337
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   338
#drawModePoint
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   339
'Switches to point-drawing mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   340
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   341
#editFlipHorizontal
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   342
'Flips the image horizontally.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   343
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   344
#editFlipVertical
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   345
'Flips the image vertically.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   346
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   347
#editMagnifyImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   348
'Magnify the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   349
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   350
#editNegate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   351
'Invert the images colors.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   352
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   353
#editResize
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   354
'Resize the image (preserving the old image).'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   355
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   356
#editRotate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   357
'Rotate the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   358
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   359
#fileGrabImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   360
'Pick an image from the screen.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   361
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   362
#fileLoadFromClass
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   363
'Select and load an image from a resource method.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   364
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   365
#fileLoadFromFile
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   366
'Select and load an image from a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   367
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   368
#fileNewImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   369
'Create a new image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   370
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   371
#filePrint
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   372
'Print the image on a postscript printer.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   373
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   374
#fileSaveAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   375
'Save the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   376
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   377
#fileSaveMaskAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   378
'Save the mask of the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   379
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   380
#fileSaveButtonImageAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   381
'Save an image of a button with the image to a file (for html use).'
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   382
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   383
#fileSaveMethod
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   384
'Save the image as resource method in the current class and selector.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   385
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   386
#fileSaveMethodAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   387
'Save the image as resource method in a class.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   388
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   389
#magnificationNumber
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   390
'Shows the current magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   391
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   392
#magnifyImageDown
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   393
'Decrease magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   394
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   395
#magnifyImageUp
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   396
'Increase magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   397
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   398
#mouseKeyColorMode
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   399
'Toggles between left and right mouse button color.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   400
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   401
#previewView
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   402
'Shows a preview of the image.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   403
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   404
#settingsGridMagnification
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   405
'Change the grid magnification of the edit view.'
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   406
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   407
)
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   408
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   409
    "Modified: / 7.9.1998 / 18:20:26 / cg"
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   410
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   411
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   412
!ImageEditor class methodsFor:'image specs'!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   413
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   414
leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   415
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   416
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   417
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   418
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   419
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   420
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   421
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
   422
     self leftMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   423
     ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   424
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   425
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   426
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   427
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   428
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   429
        constantNamed:#'ImageEditor leftMouseKeyIcon'
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   430
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   431
!
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   432
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   433
rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   434
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   435
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   436
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   437
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   438
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   439
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   440
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
   441
     self rightMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   442
     ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   443
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   444
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   445
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   446
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   447
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   448
        constantNamed:#'ImageEditor rightMouseKeyIcon'
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   449
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   450
! !
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   451
400
228524287573 intitial checkin
tz
parents:
diff changeset
   452
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
   453
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   454
dialogSpecForNewImage
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   455
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   456
     by the UIPainter of ST/X."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   457
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   458
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   459
     the UIPainter may not be able to read the specification."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   460
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   461
    "
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   462
     UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   463
     ImageEditor new openInterface:#dialogSpecForNewImage
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   464
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   465
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   466
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   467
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   468
    ^
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   469
     
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   470
       #(#FullSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   471
          #window: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   472
           #(#WindowSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   473
              #name: 'New Image'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   474
              #layout: #(#LayoutFrame 81 0 288 0 381 0 406 0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   475
              #label: 'New Image'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   476
              #min: #(#Point 10 10)
738210a2fa06 revised version
tz
parents: 651
diff changeset
   477
              #max: #(#Point 1152 900)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   478
              #bounds: #(#Rectangle 81 288 382 407)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   479
              #usePreferredExtent: false
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   480
          )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   481
          #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   482
           #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   483
              #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   484
               #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   485
                 #(#ViewSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   486
                    #name: 'View'
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   487
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -35 1.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   488
                    #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   489
                     #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   490
                        #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   491
                         #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   492
                           #(#FramedBoxSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   493
                              #name: 'framedBox1'
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   494
                              #layout: #(#LayoutFrame 1 0.0 7 0.0 0 0.4 76 0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   495
                              #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   496
                               #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   497
                                  #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   498
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   499
                                     #(#ComboBoxSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   500
                                        #name: 'defaultSizesComboBox'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   501
                                        #layout: #(#LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   502
                                        #model: #selectionOfSize
738210a2fa06 revised version
tz
parents: 651
diff changeset
   503
                                        #type: #string
738210a2fa06 revised version
tz
parents: 651
diff changeset
   504
                                        #comboList: #listOfDefaultSizes
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   505
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   506
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   507
                              )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   508
                              #label: 'Size'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   509
                              #labelPosition: #topLeft
738210a2fa06 revised version
tz
parents: 651
diff changeset
   510
                              #style: #(#FontDescription #helvetica #medium #roman 12)
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   511
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   512
                           #(#FramedBoxSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   513
                              #name: 'framedBox2'
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   514
                              #layout: #(#LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   515
                              #component: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   516
                               #(#SpecCollection
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   517
                                  #collection: 
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   518
                                   #(
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   519
                                     #(#ComboListSpec
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   520
                                        #name: 'colorMapComboBox'
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   521
                                        #layout: #(#LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   522
                                        #model: #selectionOfColorMap
738210a2fa06 revised version
tz
parents: 651
diff changeset
   523
                                        #comboList: #listOfColorMaps
738210a2fa06 revised version
tz
parents: 651
diff changeset
   524
                                        #useIndex: false
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   525
                                    )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   526
                                  )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   527
                              )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   528
                              #label: 'Color Map'
738210a2fa06 revised version
tz
parents: 651
diff changeset
   529
                              #labelPosition: #topLeft
738210a2fa06 revised version
tz
parents: 651
diff changeset
   530
                              #style: #(#FontDescription #helvetica #medium #roman 12)
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   531
                          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   532
                        )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   533
                    )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   534
                    #level: 1
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   535
                )
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   536
                 #(#UISubSpecification
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
   537
                    #name: 'windowSpecForCommitWithoutChannels'
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   538
                    #layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0)
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
   539
                    #minorKey: #windowSpecForCommitWithoutChannels
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   540
                )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   541
              )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   542
          )
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   543
      )
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   544
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   545
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   546
gropDialogSpec
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   547
    "This resource specification was automatically generated
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   548
     by the UIPainter of ST/X."
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   549
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   550
    "Do not manually edit this!! If it is corrupted,
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   551
     the UIPainter may not be able to read the specification."
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   552
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   553
    "
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   554
     UIPainter new openOnClass:ImageEditor andSelector:#gropDialogSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   555
     ImageEditor new openInterface:#gropDialogSpec
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   556
    "
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   557
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   558
    <resource: #canvas>
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   559
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   560
    ^ 
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   561
     #(#FullSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   562
        #name: #gropDialogSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   563
        #window: 
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   564
       #(#WindowSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   565
          #label: 'Crop Border(s)'
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   566
          #name: 'Crop Border(s)'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   567
          #min: #(#Point 10 10)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   568
          #max: #(#Point 800 478)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   569
          #bounds: #(#Rectangle 16 46 261 229)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   570
        )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   571
        #component: 
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   572
       #(#SpecCollection
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   573
          #collection: #(
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   574
           #(#LabelSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   575
              #label: 'Left:'
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   576
              #name: 'GropLeftLabel'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   577
              #layout: #(#LayoutFrame 14 0 21 0 90 0 43 0)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   578
              #translateLabel: true
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   579
              #adjust: #right
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   580
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   581
           #(#InputFieldSpec
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   582
              #name: 'GropLeftEntryField'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   583
              #layout: #(#LayoutFrame 95 0 21 0 132 0 43 0)
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   584
              #tabable: true
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   585
              #model: #left
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   586
              #type: #number
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   587
              #acceptChannel: #acceptChannel
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   588
              #acceptOnPointerLeave: false
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   589
            )
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   590
           #(#ActionButtonSpec
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   591
              #label: 'Now'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   592
              #name: 'GropLeftNowButton'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   593
              #layout: #(#LayoutFrame 148 0 21 0 221 0 43 0)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   594
              #translateLabel: true
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   595
              #tabable: true
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   596
              #model: #gropLeftNow
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   597
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   598
           #(#LabelSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   599
              #label: 'Right:'
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   600
              #name: 'GropRightLabel'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   601
              #layout: #(#LayoutFrame 14 0 51 0 90 0 73 0)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   602
              #translateLabel: true
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   603
              #adjust: #right
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   604
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   605
           #(#InputFieldSpec
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   606
              #name: 'GropRightEntryField'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   607
              #layout: #(#LayoutFrame 95 0 51 0 132 0 73 0)
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   608
              #tabable: true
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   609
              #model: #right
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   610
              #type: #number
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   611
              #acceptChannel: #acceptChannel
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   612
              #acceptOnPointerLeave: false
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   613
            )
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   614
           #(#ActionButtonSpec
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   615
              #label: 'Now'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   616
              #name: 'GropRightButton'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   617
              #layout: #(#LayoutFrame 148 0 51 0 221 0 73 0)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   618
              #translateLabel: true
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   619
              #tabable: true
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   620
              #model: #gropRightNow
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   621
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   622
           #(#LabelSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   623
              #label: 'Top:'
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   624
              #name: 'GropTopLabel'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   625
              #layout: #(#LayoutFrame 14 0 81 0 90 0 103 0)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   626
              #translateLabel: true
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   627
              #adjust: #right
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   628
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   629
           #(#InputFieldSpec
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   630
              #name: 'GropTopEntryField'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   631
              #layout: #(#LayoutFrame 95 0 81 0 132 0 103 0)
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   632
              #tabable: true
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   633
              #model: #top
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   634
              #type: #number
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   635
              #acceptChannel: #acceptChannel
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   636
              #acceptOnPointerLeave: false
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   637
            )
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   638
           #(#ActionButtonSpec
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   639
              #label: 'Now'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   640
              #name: 'GropTopButton'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   641
              #layout: #(#LayoutFrame 148 0 81 0 221 0 103 0)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   642
              #translateLabel: true
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   643
              #tabable: true
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   644
              #model: #gropTopNow
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   645
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   646
           #(#LabelSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   647
              #label: 'Bottom:'
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   648
              #name: 'GropBottomLabel'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   649
              #layout: #(#LayoutFrame 14 0 111 0 90 0 133 0)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   650
              #translateLabel: true
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   651
              #adjust: #right
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   652
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   653
           #(#InputFieldSpec
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   654
              #name: 'GropBottomEntryField'
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   655
              #layout: #(#LayoutFrame 95 0 111 0 132 0 133 0)
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   656
              #tabable: true
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   657
              #model: #bottom
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   658
              #type: #number
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   659
              #acceptChannel: #acceptChannel
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   660
              #acceptOnPointerLeave: false
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   661
            )
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   662
           #(#ActionButtonSpec
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   663
              #label: 'Now'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   664
              #name: 'GropBottomButton'
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   665
              #layout: #(#LayoutFrame 148 0 111 0 221 0 133 0)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   666
              #translateLabel: true
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   667
              #tabable: true
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   668
              #model: #gropBottomNow
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   669
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   670
           #(#HorizontalPanelViewSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   671
              #name: 'HorizontalPanel1'
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   672
              #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   673
              #horizontalLayout: #fitSpace
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   674
              #verticalLayout: #center
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   675
              #horizontalSpace: 3
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   676
              #verticalSpace: 3
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   677
              #reverseOrderIfOKAtLeft: true
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   678
              #component: 
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   679
             #(#SpecCollection
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   680
                #collection: #(
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   681
                 #(#ActionButtonSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   682
                    #label: 'Cancel'
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   683
                    #name: 'Button1'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   684
                    #translateLabel: true
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   685
                    #tabable: true
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   686
                    #model: #cancel
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   687
                    #extent: #(#Point 77 22)
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   688
                  )
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   689
                 #(#ActionButtonSpec
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   690
                    #label: 'Apply'
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   691
                    #name: 'Button3'
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   692
                    #translateLabel: true
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   693
                    #tabable: true
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   694
                    #model: #applyAction
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   695
                    #extent: #(#Point 78 22)
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   696
                  )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   697
                 #(#ActionButtonSpec
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   698
                    #label: 'OK'
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   699
                    #name: 'Button2'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   700
                    #translateLabel: true
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
   701
                    #tabable: true
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   702
                    #model: #accept
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
   703
                    #extent: #(#Point 78 22)
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   704
                  )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   705
                 )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   706
               
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   707
              )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   708
            )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   709
           )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   710
         
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   711
        )
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   712
      )
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   713
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   714
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   715
shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   716
    "This resource specification was automatically generated
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   717
     by the UIPainter of ST/X."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   718
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   719
    "Do not manually edit this!! If it is corrupted,
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   720
     the UIPainter may not be able to read the specification."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   721
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   722
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   723
     UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   724
     ImageEditor new openInterface:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   725
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   726
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   727
    <resource: #canvas>
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   728
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   729
    ^ 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   730
     #(#FullSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   731
        #name: #shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   732
        #window: 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   733
       #(#WindowSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   734
          #label: 'Shift'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   735
          #name: 'Shift'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   736
          #min: #(#Point 10 10)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   737
          #max: #(#Point 800 478)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   738
          #bounds: #(#Rectangle 16 46 261 229)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   739
        )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   740
        #component: 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   741
       #(#SpecCollection
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   742
          #collection: #(
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   743
           #(#LabelSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   744
              #label: 'Amount:'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   745
              #name: 'AmountLabel'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   746
              #layout: #(#LayoutFrame 14 0 21 0 90 0 43 0)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   747
              #translateLabel: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   748
              #adjust: #right
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   749
            )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   750
           #(#InputFieldSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   751
              #name: 'AmountEntryField'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   752
              #layout: #(#LayoutFrame 95 0 21 0 132 0 43 0)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   753
              #tabable: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   754
              #model: #shiftAmount
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   755
              #type: #number
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   756
              #acceptChannel: #acceptChannel
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   757
              #acceptOnPointerLeave: false
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   758
            )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   759
           #(#HorizontalPanelViewSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   760
              #name: 'HorizontalPanel1'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   761
              #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   762
              #horizontalLayout: #fitSpace
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   763
              #verticalLayout: #center
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   764
              #horizontalSpace: 3
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   765
              #verticalSpace: 3
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   766
              #reverseOrderIfOKAtLeft: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   767
              #component: 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   768
             #(#SpecCollection
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   769
                #collection: #(
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   770
                 #(#ActionButtonSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   771
                    #label: 'Cancel'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   772
                    #name: 'Button1'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   773
                    #translateLabel: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   774
                    #tabable: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   775
                    #model: #cancel
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   776
                    #extent: #(#Point 118 22)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   777
                  )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   778
                 #(#ActionButtonSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   779
                    #label: 'OK'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   780
                    #name: 'Button2'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   781
                    #translateLabel: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   782
                    #tabable: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   783
                    #model: #accept
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   784
                    #extent: #(#Point 118 22)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   785
                  )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   786
                 )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   787
               
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   788
              )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   789
            )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   790
           #(#ArrowButtonSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   791
              #name: 'ArrowButton1'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   792
              #layout: #(#LayoutFrame 105 0 67 0 127 0 89 0)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   793
              #model: #shiftUpNow
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   794
              #isTriggerOnDown: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   795
              #actionValue: ''
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   796
              #direction: #up
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   797
            )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   798
           #(#ArrowButtonSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   799
              #name: 'ArrowButton2'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   800
              #layout: #(#LayoutFrame 88 0 86 0 110 0 108 0)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   801
              #model: #shiftLeftNow
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   802
              #isTriggerOnDown: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   803
              #actionValue: ''
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   804
              #direction: #left
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   805
            )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   806
           #(#ArrowButtonSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   807
              #name: 'ArrowButton3'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   808
              #layout: #(#LayoutFrame 122 0 86 0 144 0 108 0)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   809
              #model: #shiftRightNow
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   810
              #isTriggerOnDown: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   811
              #actionValue: ''
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   812
              #direction: #right
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   813
            )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   814
           #(#ArrowButtonSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   815
              #name: 'ArrowButton4'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   816
              #layout: #(#LayoutFrame 105 0 103 0 127 0 125 0)
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   817
              #model: #shiftDownNow
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   818
              #isTriggerOnDown: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   819
              #actionValue: ''
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   820
              #direction: #down
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   821
            )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   822
           )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   823
         
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   824
        )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   825
      )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   826
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
   827
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   828
ungropDialogSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   829
    "This resource specification was automatically generated
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   830
     by the UIPainter of ST/X."
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   831
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   832
    "Do not manually edit this!! If it is corrupted,
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   833
     the UIPainter may not be able to read the specification."
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   834
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   835
    "
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   836
     UIPainter new openOnClass:ImageEditor andSelector:#ungropDialogSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   837
     ImageEditor new openInterface:#ungropDialogSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   838
    "
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   839
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   840
    <resource: #canvas>
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   841
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   842
    ^ 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   843
     #(#FullSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   844
        #name: #ungropDialogSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   845
        #window: 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   846
       #(#WindowSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   847
          #label: 'Add Border(s)'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   848
          #name: 'Add Borders'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   849
          #min: #(#Point 10 10)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   850
          #max: #(#Point 800 478)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   851
          #bounds: #(#Rectangle 16 46 261 229)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   852
        )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   853
        #component: 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   854
       #(#SpecCollection
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   855
          #collection: #(
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   856
           #(#LabelSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   857
              #label: 'Left:'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   858
              #name: 'Label1'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   859
              #layout: #(#LayoutFrame 14 0 21 0 90 0 43 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   860
              #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   861
              #adjust: #right
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   862
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   863
           #(#InputFieldSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   864
              #name: 'EntryField1'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   865
              #layout: #(#LayoutFrame 95 0 21 0 132 0 43 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   866
              #model: #left
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   867
              #type: #number
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   868
              #acceptOnPointerLeave: false
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   869
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   870
           #(#LabelSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   871
              #label: 'Right:'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   872
              #name: 'Label2'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   873
              #layout: #(#LayoutFrame 14 0 51 0 90 0 73 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   874
              #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   875
              #adjust: #right
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   876
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   877
           #(#InputFieldSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   878
              #name: 'EntryField2'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   879
              #layout: #(#LayoutFrame 95 0 51 0 132 0 73 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   880
              #model: #right
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   881
              #type: #number
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   882
              #acceptOnPointerLeave: false
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   883
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   884
           #(#LabelSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   885
              #label: 'Top:'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   886
              #name: 'Label3'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   887
              #layout: #(#LayoutFrame 14 0 81 0 90 0 103 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   888
              #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   889
              #adjust: #right
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   890
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   891
           #(#InputFieldSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   892
              #name: 'EntryField3'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   893
              #layout: #(#LayoutFrame 95 0 81 0 132 0 103 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   894
              #model: #top
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   895
              #type: #number
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   896
              #acceptOnPointerLeave: false
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   897
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   898
           #(#LabelSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   899
              #label: 'Bottom:'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   900
              #name: 'Label4'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   901
              #layout: #(#LayoutFrame 14 0 111 0 90 0 133 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   902
              #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   903
              #adjust: #right
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   904
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   905
           #(#InputFieldSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   906
              #name: 'EntryField4'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   907
              #layout: #(#LayoutFrame 95 0 111 0 132 0 133 0)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   908
              #model: #bottom
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   909
              #type: #number
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   910
              #acceptOnPointerLeave: false
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   911
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   912
           #(#HorizontalPanelViewSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   913
              #name: 'HorizontalPanel1'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   914
              #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   915
              #horizontalLayout: #fitSpace
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   916
              #verticalLayout: #center
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   917
              #horizontalSpace: 3
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   918
              #verticalSpace: 3
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   919
              #reverseOrderIfOKAtLeft: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   920
              #component: 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   921
             #(#SpecCollection
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   922
                #collection: #(
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   923
                 #(#ActionButtonSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   924
                    #label: 'Cancel'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   925
                    #name: 'Button1'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   926
                    #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   927
                    #model: #cancel
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   928
                    #extent: #(#Point 118 22)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   929
                  )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   930
                 #(#ActionButtonSpec
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   931
                    #label: 'OK'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   932
                    #name: 'Button2'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   933
                    #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   934
                    #model: #accept
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   935
                    #extent: #(#Point 118 22)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   936
                  )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   937
                 )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   938
               
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   939
              )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   940
            )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   941
           )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   942
         
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   943
        )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   944
      )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   945
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
   946
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   947
windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   948
    "This resource specification was automatically generated
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   949
     by the UIPainter of ST/X."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   950
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   951
    "Do not manually edit this!! If it is corrupted,
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   952
     the UIPainter may not be able to read the specification."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   953
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   954
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   955
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   956
     ImageEditor new openInterface:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   957
     ImageEditor open
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   958
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   959
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   960
    <resource: #canvas>
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   961
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   962
    ^ 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   963
     #(#FullSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   964
        #name: #windowSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   965
        #window: 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   966
       #(#WindowSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   967
          #label: 'Image Editor'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   968
          #name: 'Image Editor'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   969
          #min: #(#Point 400 320)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   970
          #bounds: #(#Rectangle 16 42 514 386)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   971
          #menu: #menu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   972
        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   973
        #component: 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   974
       #(#SpecCollection
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   975
          #collection: #(
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   976
           #(#MenuPanelSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   977
              #name: 'menuToolbarView'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   978
              #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   979
              #menu: #menuToolbar
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   980
              #style: #(#FontDescription #helvetica #medium #roman 10)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   981
              #showSeparatingLines: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   982
            )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   983
           #(#VariableHorizontalPanelSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   984
              #name: 'variableHorizontalPanel1'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   985
              #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   986
              #component: 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   987
             #(#SpecCollection
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   988
                #collection: #(
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   989
                 #(#ViewSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   990
                    #name: 'view1'
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   991
                    #component: 
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   992
                   #(#SpecCollection
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   993
                      #collection: #(
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   994
                       #(#VariableVerticalPanelSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   995
                          #name: 'VariableVerticalPanel1'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   996
                          #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   997
                          #component: 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   998
                         #(#SpecCollection
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
   999
                            #collection: #(
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1000
                             #(#ViewSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1001
                                #name: 'View1'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1002
                                #component: 
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1003
                               #(#SpecCollection
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1004
                                  #collection: #(
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1005
                                   #(#MenuPanelSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1006
                                      #name: 'MouseButtonColorToolBar'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1007
                                      #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1008
                                      #menu: #menuMouseButtonColors
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1009
                                    )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1010
                                   #(#DataSetSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1011
                                      #name: 'colorDataSetView'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1012
                                      #layout: #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1013
                                      #activeHelpKey: #colorMapTable
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1014
                                      #model: #selectionOfColor
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1015
                                      #menu: #colorMapMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1016
                                      #style: #(#FontDescription #helvetica #medium #roman 10)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1017
                                      #hasHorizontalScrollBar: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1018
                                      #hasVerticalScrollBar: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1019
                                      #miniScrollerHorizontal: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1020
                                      #miniScrollerVertical: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1021
                                      #dataList: #listOfColors
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1022
                                      #has3Dsepartors: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1023
                                      #has3Dseparators: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1024
                                      #verticalSpacing: 1
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1025
                                      #columns: 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1026
                                     #(#OrderedCollection
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1027
                                        
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1028
                                       #(#DataSetColumnSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1029
                                          #labelButtonType: #Button
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1030
                                          #rendererType: #rowSelector
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1031
                                          #backgroundSelector: #theColorItSelf:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1032
                                        ) 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1033
                                       #(#DataSetColumnSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1034
                                          #label: 'R'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1035
                                          #labelAlignment: #left
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1036
                                          #labelButtonType: #Button
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1037
                                          #columnAlignment: #right
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1038
                                          #editorType: #InputField
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1039
                                          #type: #number
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1040
                                          #model: #redFromColor:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1041
                                          #writeSelector: #redAtColor:put:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1042
                                          #selectSelector: #canSelectRedInColor:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1043
                                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1044
                                        
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1045
                                       #(#DataSetColumnSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1046
                                          #label: 'G'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1047
                                          #labelAlignment: #left
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1048
                                          #labelButtonType: #Button
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1049
                                          #columnAlignment: #right
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1050
                                          #editorType: #InputField
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1051
                                          #type: #number
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1052
                                          #model: #greenFromColor:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1053
                                          #writeSelector: #greenAtColor:put:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1054
                                          #selectSelector: #canSelectGreenInColor:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1055
                                        ) 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1056
                                       #(#DataSetColumnSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1057
                                          #label: 'B'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1058
                                          #labelAlignment: #left
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1059
                                          #labelButtonType: #Button
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1060
                                          #columnAlignment: #right
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1061
                                          #editorType: #InputField
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1062
                                          #type: #number
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1063
                                          #model: #blueFromColor:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1064
                                          #writeSelector: #blueAtColor:put:
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1065
                                          #selectSelector: #canSelectBlueInColor:
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1066
                                        )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1067
                                      )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1068
                                      #columnAdaptor: #colorColumnAdaptor
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1069
                                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1070
                                   )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1071
                                 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1072
                                )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1073
                              )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1074
                             #(#ArbitraryComponentSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1075
                                #name: 'imagePreView'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1076
                                #activeHelpKey: #previewView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1077
                                #menu: #previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1078
                                #hasHorizontalScrollBar: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1079
                                #hasVerticalScrollBar: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1080
                                #miniScrollerHorizontal: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1081
                                #miniScrollerVertical: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1082
                                #hasBorder: false
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1083
                                #component: #ImageView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1084
                              )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1085
                             )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1086
                           
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1087
                          )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1088
                          #handles: #(#Any 0.723776 1.0)
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1089
                        )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1090
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1091
                     
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1092
                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1093
                  )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1094
                 #(#ViewSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1095
                    #name: 'view2'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1096
                    #level: -1
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1097
                    #component: 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1098
                   #(#SpecCollection
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1099
                      #collection: #(
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1100
                       #(#ArbitraryComponentSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1101
                          #name: 'imageEditView'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1102
                          #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1103
                          #hasHorizontalScrollBar: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1104
                          #hasVerticalScrollBar: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1105
                          #hasBorder: false
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1106
                          #component: #ImageEditView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1107
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1108
                       #(#LabelSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1109
                          #name: 'coordLabel'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1110
                          #layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1111
                          #level: -1
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1112
                          #labelChannel: #imageInfoHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1113
                          #resizeForLabel: false
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1114
                          #adjust: #left
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1115
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1116
                       #(#ArrowButtonSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1117
                          #name: 'magnifyDownButton'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1118
                          #layout: #(#LayoutFrame -80 1 -22 1 -58 1 0 1)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1119
                          #activeHelpKey: #magnifyImageDown
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1120
                          #model: #doMagnifyDown
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1121
                          #enableChannel: #imageIsLoaded
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1122
                          #isTriggerOnDown: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1123
                          #direction: #left
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1124
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1125
                       #(#ArrowButtonSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1126
                          #name: 'magnifyUpButton'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1127
                          #layout: #(#LayoutFrame -24 1 -22 1 -2 1 0 1)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1128
                          #activeHelpKey: #magnifyImageUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1129
                          #model: #doMagnifyUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1130
                          #enableChannel: #imageIsLoaded
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1131
                          #isTriggerOnDown: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1132
                          #direction: #right
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1133
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1134
                       #(#InputFieldSpec
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1135
                          #name: 'magnificationInputField'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1136
                          #layout: #(#LayoutFrame -57 1 -22 1 -26 1 0 1)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1137
                          #activeHelpKey: #magnificationNumber
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1138
                          #enableChannel: #imageIsLoaded
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1139
                          #model: #valueOfMagnification
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1140
                          #type: #numberInRange
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1141
                          #acceptOnReturn: false
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1142
                          #acceptOnTab: false
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1143
                          #numChars: 2
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1144
                          #minValue: 1
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1145
                          #maxValue: 99
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1146
                          #acceptOnPointerLeave: false
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1147
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1148
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1149
                     
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1150
                    )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1151
                  )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1152
                 )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1153
               
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1154
              )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1155
              #handles: #(#Any 0.276 1.0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1156
            )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1157
           #(#UISubSpecification
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1158
              #name: 'infoBarSubSpec'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1159
              #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1160
              #majorKey: #ToolApplicationModel
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1161
              #minorKey: #windowSpecForInfoBar
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1162
            )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1163
           )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1164
         
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1165
        )
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1166
      )
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1167
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1168
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1169
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1170
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1171
colorMapMenu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1172
    "This resource specification was automatically generated
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1173
     by the MenuEditor of ST/X."
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1174
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1175
    "Do not manually edit this!! If it is corrupted,
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1176
     the MenuEditor may not be able to read the specification."
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1177
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1178
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1179
     MenuEditor new openOnClass:ImageEditor andSelector:#menuSpec
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1180
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuSpec)) startUp
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1181
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1182
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1183
    <resource: #menu>
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1184
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1185
    ^
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1186
     
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1187
       #(#Menu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1188
          
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1189
           #(
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1190
             #(#MenuItem
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1191
                #label: 'Add Color'
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1192
                #translateLabel: true
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1193
                #value: #addColorToColormap
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1194
            )
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1195
             #(#MenuItem
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1196
                #label: '-'
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1197
            )
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1198
             #(#MenuItem
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1199
                #label: 'Inspect Color'
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1200
                #translateLabel: true
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1201
                #value: #inspectColor
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1202
            )
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1203
"/             #(#MenuItem
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1204
"/                #label: 'Make Brighter'
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1205
"/                #translateLabel: true
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1206
"/                #value: #makeSelectedColorBrighter
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1207
"/            )
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1208
"/             #(#MenuItem
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1209
"/                #label: 'Make Darker'
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1210
"/                #translateLabel: true
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1211
"/                #value: #makeSelectedColorDarker
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  1212
"/            )
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1213
          ) nil
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1214
          nil
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1215
      )
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1216
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1217
    "Created: / 12.3.1999 / 00:19:00 / cg"
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1218
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1219
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1220
menu
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1221
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1222
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1223
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1224
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1225
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1226
228524287573 intitial checkin
tz
parents:
diff changeset
  1227
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1228
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
  1229
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  1230
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1231
228524287573 intitial checkin
tz
parents:
diff changeset
  1232
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  1233
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1234
    ^ 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1235
     #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1236
        #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1237
         #(#MenuItem
1489
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1238
            #label: '&File'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1239
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1240
            #activeHelpKey: #file
1489
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1241
            #shortcutKeyCharacter: #Cmdf
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1242
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1243
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1244
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1245
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1246
                  #label: 'New...'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1247
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1248
                  #value: #doNewImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1249
                  #activeHelpKey: #fileNewImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1250
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1251
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1252
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1253
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1254
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1255
                  #label: 'Load...'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1256
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1257
                  #value: #doLoadFromClass
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1258
                  #activeHelpKey: #fileLoadFromClass
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1259
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1260
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1261
                  #label: 'Load from File...'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1262
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1263
                  #value: #doLoadFromFile
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1264
                  #activeHelpKey: #fileLoadFromFile
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1265
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1266
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1267
                  #label: 'Grab from Screen'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1268
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1269
                  #value: #grabScreenImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1270
                  #activeHelpKey: #fileGrabImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1271
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1272
               #(#MenuItem
1496
15253ecf71c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1491
diff changeset
  1273
                  #label: 'Next in Sequence'
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1274
                  #translateLabel: true
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1275
                  #value: #nextImageInSequence
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1276
                  #enabled: #imageHasNextImage
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1277
                )
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1278
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1279
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1280
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1281
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1282
                  #label: 'Save'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1283
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1284
                  #value: #doSaveMethod
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1285
                  #activeHelpKey: #fileSaveMethod
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1286
                  #enabled: #imageIsLoadedAndClassDefined
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1287
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1288
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1289
                  #label: 'Save As...'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1290
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1291
                  #value: #doSaveMethodAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1292
                  #activeHelpKey: #fileSaveMethodAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1293
                  #enabled: #imageIsLoaded
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1294
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1295
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1296
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1297
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1298
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1299
                  #label: 'Save to File...'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1300
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1301
                  #value: #doSaveImageFileAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1302
                  #activeHelpKey: #fileSaveAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1303
                  #enabled: #imageIsLoaded
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1304
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1305
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1306
                  #label: 'Save Mask to File...'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1307
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1308
                  #value: #doSaveImageMaskFileAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1309
                  #activeHelpKey: #fileSaveMaskAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1310
                  #enabled: #imageIsLoaded
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1311
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1312
               #(#MenuItem
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1313
                  #label: 'Save As Button to File...'
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1314
                  #translateLabel: true
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1315
                  #value: #doSaveButtonImageToFileAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1316
                  #activeHelpKey: #fileSaveButtonImageAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1317
                  #enabled: #imageIsLoaded
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1318
                )
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1319
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1320
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1321
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1322
               #(#MenuItem
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1323
                  #label: 'Show storeString'
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1324
                  #translateLabel: true
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1325
                  #value: #doShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1326
                  #activeHelpKey: #fileShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1327
                  #enabled: #imageIsLoaded
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1328
                )
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1329
               #(#MenuItem
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1330
                  #label: 'Edit Mask'
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1331
                  #translateLabel: true
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1332
                  #value: #doEditMask
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1333
                  #activeHelpKey: #fileEditMask
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1334
                  #enabled: #imageIsLoaded
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1335
                )
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1336
               #(#MenuItem
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1337
                  #label: '-'
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1338
                )
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1339
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1340
                  #label: 'Print'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1341
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1342
                  #value: #doPrint
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1343
                  #activeHelpKey: #filePrint
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1344
                  #enabled: #imageIsLoaded
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1345
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1346
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1347
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1348
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1349
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1350
                  #label: 'Browse Class'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1351
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1352
                  #value: #doBrowseClass
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1353
                  #activeHelpKey: #fileBrowseClass
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1354
                  #enabled: #hasClassDefined
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1355
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1356
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1357
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1358
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1359
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1360
                  #label: 'Exit'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1361
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1362
                  #value: #closeRequest
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1363
                  #activeHelpKey: #fileExit
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1364
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1365
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1366
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1367
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1368
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1369
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1370
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1371
            #label: 'Edit'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1372
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1373
            #activeHelpKey: #edit
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1374
            #enabled: #imageIsLoaded
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1375
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1376
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1377
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1378
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1379
                  #label: 'Undo'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1380
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1381
                  #value: #doUndo
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1382
                  #activeHelpKey: #editUndo
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1383
                  #enabled: #valueOfCanUndo
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1384
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1385
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1386
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1387
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1388
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1389
                  #label: 'Flip - Vertical'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1390
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1391
                  #value: #doFlipVertical
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1392
                  #activeHelpKey: #editFlipVertical
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1393
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1394
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1395
                  #label: 'Flip - Horizontal'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1396
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1397
                  #value: #doFlipHorizontal
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1398
                  #activeHelpKey: #editFlipHorizontal
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1399
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1400
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1401
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1402
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1403
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1404
                  #label: 'Resize...'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1405
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1406
                  #value: #doResizeImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1407
                  #activeHelpKey: #editResize
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1408
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1409
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1410
                  #label: 'Magnify...'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1411
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1412
                  #value: #doMagnifyImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1413
                  #activeHelpKey: #editMagnifyImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1414
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1415
               #(#MenuItem
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1416
                  #label: 'Magnify By...'
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1417
                  #translateLabel: true
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1418
                  #value: #doMagnifyImageBy
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1419
                  #activeHelpKey: #editMagnifyImage
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1420
                )
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1421
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1422
                  #label: 'Rotate...'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1423
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1424
                  #value: #doRotateImage
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1425
                  #activeHelpKey: #editRotate
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1426
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1427
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1428
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1429
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1430
               #(#MenuItem
1146
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1431
                  #label: 'Invert'
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1432
                  #translateLabel: true
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1433
                  #value: #doNegativeImage
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1434
                )
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1435
               #(#MenuItem
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1436
                  #label: '-'
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1437
                )
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1438
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1439
                  #label: 'Crop'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1440
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1441
                  #submenu: 
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1442
                 #(#Menu
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1443
                    #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1444
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1445
                        #label: 'All'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1446
                        #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1447
                        #value: #doCropAll
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1448
                        #activeHelpKey: #cropAll
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1449
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1450
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1451
                        #label: '-'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1452
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1453
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1454
                        #label: 'Left'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1455
                        #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1456
                        #value: #doCropLeft
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1457
                        #activeHelpKey: #cropLeft
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1458
                      )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1459
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1460
                        #label: 'Right'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1461
                        #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1462
                        #value: #doCropRight
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1463
                        #activeHelpKey: #cropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1464
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1465
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1466
                        #label: 'Top'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1467
                        #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1468
                        #value: #doCropTop
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1469
                        #activeHelpKey: #cropTop
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1470
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1471
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1472
                        #label: 'Bottom'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1473
                        #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1474
                        #value: #doCropBottom
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1475
                        #activeHelpKey: #cropBottom
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1476
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1477
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1478
                        #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1479
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1480
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1481
                        #label: 'Manual...'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1482
                        #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1483
                        #value: #doCropManual
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1484
                        #activeHelpKey: #cropManual
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1485
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1486
                     )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1487
                    nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1488
                    nil
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1489
                  )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1490
                )
1489
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1491
               #(#MenuItem
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1492
                  #label: 'Shift...'
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1493
                  #translateLabel: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1494
                  #value: #doShiftManual
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1495
                  #activeHelpKey: #shiftManual
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1496
                )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1497
               #(#MenuItem
1489
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1498
                  #label: 'Ungrop (Add Border)...'
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1499
                  #translateLabel: true
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1500
                  #value: #doUnCropManual
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1501
                  #activeHelpKey: #uncropManual
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1502
                )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1503
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1504
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1505
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1506
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1507
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1508
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1509
            #label: 'ColorMap'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1510
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1511
            #activeHelpKey: #colorMap
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1512
            #enabled: #imageIsLoaded
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1513
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1514
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1515
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1516
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1517
                  #label: '8-Plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1518
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1519
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1520
                  #activeHelpKey: #colorMap8
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1521
                  #argument: '8-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1522
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1523
                  #choiceValue: '8-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1524
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1525
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1526
                  #label: '4-Plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1527
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1528
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1529
                  #activeHelpKey: #colorMap4
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1530
                  #argument: '4-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1531
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1532
                  #choiceValue: '4-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1533
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1534
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1535
                  #label: '2-Plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1536
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1537
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1538
                  #activeHelpKey: #colorMap2
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1539
                  #argument: '2-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1540
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1541
                  #choiceValue: '2-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1542
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1543
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1544
                  #label: '1-Plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1545
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1546
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1547
                  #activeHelpKey: #colorMap1
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1548
                  #argument: '1-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1549
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1550
                  #choiceValue: '1-plane'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1551
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1552
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1553
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1554
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1555
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1556
                  #label: '8-Plane + Mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1557
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1558
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1559
                  #activeHelpKey: #colorMap8M
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1560
                  #argument: '8-plane + mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1561
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1562
                  #choiceValue: '8-plane + mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1563
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1564
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1565
                  #label: '4-Plane + Mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1566
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1567
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1568
                  #activeHelpKey: #colorMap4M
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1569
                  #argument: '4-plane + mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1570
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1571
                  #choiceValue: '4-plane + mask'
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1572
                )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1573
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1574
                  #label: '2-Plane + Mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1575
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1576
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1577
                  #activeHelpKey: #colorMap2M
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1578
                  #argument: '2-plane + mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1579
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1580
                  #choiceValue: '2-plane + mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1581
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1582
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1583
                  #label: '1-Plane + Mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1584
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1585
                  #value: #colorMapMode:
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1586
                  #activeHelpKey: #colorMap1M
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1587
                  #argument: '1-plane + mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1588
                  #choice: #colorMapMode
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1589
                  #choiceValue: '1-plane + mask'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1590
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1591
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1592
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1593
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1594
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1595
                  #label: 'Compress Colormap'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1596
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1597
                  #value: #compressColorMap
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1598
                  #activeHelpKey: #compressColormap
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1599
                  #enabled: #hasColormap
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1600
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1601
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1602
                  #label: 'Sort Colormap'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1603
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1604
                  #value: #sortColorMap
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1605
                  #enabled: #hasColormap
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1606
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1607
               #(#MenuItem
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1608
                  #label: 'Reduce Number of Colors...'
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  1609
                  #translateLabel: true
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1610
                  #value: #reduceNumberOfColors
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  1611
                )
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  1612
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1613
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1614
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1615
               #(#MenuItem
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1616
                  #label: 'Make GrayScale'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1617
                  #translateLabel: true
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1618
                  #value: #makeGrayScale
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1619
                )
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  1620
               #(#MenuItem
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1621
                  #label: 'Make Brighter'
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1622
                  #translateLabel: true
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1623
                  #value: #makeBrighter
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1624
                )
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1625
               #(#MenuItem
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1626
                  #label: 'Make Darker'
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  1627
                  #translateLabel: true
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1628
                  #value: #makeDarker
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1629
                )
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1630
               #(#MenuItem
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1631
                  #label: 'Make Inverse'
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1632
                  #translateLabel: true
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1633
                  #value: #makeInverse
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  1634
                )
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1635
               #(#MenuItem
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1636
                  #label: '-'
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1637
                )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1638
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1639
                  #label: 'Copy Mask'
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1640
                  #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1641
                  #value: #copyMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1642
                  #activeHelpKey: #copyMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1643
                  #enabled: #hasMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1644
                )
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1645
               #(#MenuItem
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1646
                  #label: 'Paste Mask'
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1647
                  #translateLabel: true
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1648
                  #value: #pasteMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1649
                  #activeHelpKey: #pasteMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1650
                  #enabled: #hasMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1651
                )
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1652
               #(#MenuItem
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1653
                  #label: 'Clear Masked Pixels'
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1654
                  #translateLabel: true
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1655
                  #value: #clearMaskedPixels
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1656
                )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1657
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1658
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1659
              nil
756
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
  1660
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1661
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1662
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1663
            #label: 'Settings'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1664
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1665
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1666
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1667
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1668
               #(#MenuItem
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  1669
                  #label: 'Grid Magnification Limit...'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1670
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1671
                  #value: #doChangeGridMagnification
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1672
                  #activeHelpKey: #settingsGridMagnification
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1673
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1674
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1675
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1676
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1677
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1678
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1679
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1680
            #label: 'History'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1681
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1682
            #activeHelpKey: #history
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1683
            #submenuChannel: #menuHistory
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1684
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1685
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1686
            #label: 'Help'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1687
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1688
            #startGroup: #right
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1689
            #activeHelpKey: #help
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1690
            #submenuChannel: #menuHelp
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1691
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1692
         )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1693
        nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1694
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1695
      )
228524287573 intitial checkin
tz
parents:
diff changeset
  1696
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1697
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1698
menuMouseButtonColors
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1699
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1700
     by the MenuEditor of ST/X."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1701
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1702
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1703
     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
  1704
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1705
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1706
     MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1707
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1708
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1709
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1710
    <resource: #menu>
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1711
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1712
    ^
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1713
     
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1714
       #(#Menu
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1715
          
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1716
           #(
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1717
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1718
                #label: 'Left Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1719
                #nameKey: #leftMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1720
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1721
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1722
                #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1723
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1724
                #choiceValue: 1
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1725
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1726
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1727
                #label: 'Right Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1728
                #nameKey: #rightMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1729
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1730
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1731
                #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1732
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  1733
                #choiceValue: 2
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1734
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1735
          ) nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1736
          nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1737
      )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1738
!
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  1739
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1740
menuToolbar
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1741
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1742
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1743
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1744
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1745
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1746
228524287573 intitial checkin
tz
parents:
diff changeset
  1747
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1748
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
  1749
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  1750
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1751
228524287573 intitial checkin
tz
parents:
diff changeset
  1752
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  1753
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1754
    ^ 
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1755
     #(#Menu
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1756
        #(
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1757
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1758
            #label: 'newImage'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1759
            #isButton: true
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1760
            #value: #doNewImage
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1761
            #activeHelpKey: #fileNewImage
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1762
            #labelImage: #(#ResourceRetriever #Icon #newIcon)
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1763
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1764
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1765
            #label: 'loadFromClass'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1766
            #isButton: true
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1767
            #value: #doLoadFromClass
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1768
            #activeHelpKey: #fileLoadFromClass
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1769
            #labelImage: #(#ResourceRetriever #Icon #loadIcon)
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1770
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1771
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1772
            #label: 'saveMethod'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1773
            #isButton: true
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1774
            #value: #doSaveMethod
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1775
            #activeHelpKey: #fileSaveMethod
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1776
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1777
            #labelImage: #(#ResourceRetriever #Icon #saveIcon)
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1778
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1779
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1780
            #label: ''
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1781
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1782
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1783
            #label: ''
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1784
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1785
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1786
            #label: ''
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1787
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1788
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1789
            #label: ''
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1790
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1791
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1792
            #label: 'Point'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1793
            #activeHelpKey: #drawModePoint
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1794
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1795
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1796
            #choiceValue: #point
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1797
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1798
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1799
            #label: 'Rect'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1800
            #activeHelpKey: #drawModeBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1801
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1802
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1803
            #choiceValue: #box
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1804
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1805
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1806
            #label: 'FillRect'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1807
            #activeHelpKey: #drawModeFilledBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1808
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1809
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1810
            #choiceValue: #filledBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1811
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1812
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1813
            #label: 'Fill'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1814
            #activeHelpKey: #drawModeFill
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1815
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1816
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1817
            #choiceValue: #fill
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1818
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1819
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1820
            #label: 'Copy'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1821
            #activeHelpKey: #drawModeCopy
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1822
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1823
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1824
            #choiceValue: #copy
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1825
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1826
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1827
            #label: 'Paste'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1828
            #activeHelpKey: #drawModePaste
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1829
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1830
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1831
            #choiceValue: #paste
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1832
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1833
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1834
            #label: 'Paste Under'
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1835
            #activeHelpKey: #drawModePasteUnder
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1836
            #enabled: #imageIsLoaded
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1837
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1838
            #choiceValue: #pasteUnder
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1839
          )
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  1840
         #(#MenuItem
1579
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  1841
            #label: 'Paste With Mask'
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  1842
            #activeHelpKey: #drawModePasteWithMask
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  1843
            #enabled: #imageIsLoaded
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  1844
            #choice: #editMode
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  1845
            #choiceValue: #pasteWithMask
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  1846
          )
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  1847
         #(#MenuItem
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  1848
            #label: 'Special'
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  1849
            #activeHelpKey: #drawModeSpecial
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  1850
            #enabled: #imageIsLoaded
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  1851
            #choice: #editMode
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  1852
            #choiceValue: #specialOperation
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  1853
          )
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1854
         )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1855
        nil
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  1856
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1857
      )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1858
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1859
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1860
previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1861
    "This resource specification was automatically generated
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1862
     by the MenuEditor of ST/X."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1863
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1864
    "Do not manually edit this!! If it is corrupted,
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1865
     the MenuEditor may not be able to read the specification."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1866
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1867
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1868
     MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1869
     (Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1870
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1871
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1872
    <resource: #menu>
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1873
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1874
    ^ 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1875
     #(#Menu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1876
        #(
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1877
         #(#MenuItem
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1878
            #label: 'TileMode'
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1879
            #translateLabel: true
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1880
            #indication: #tileModeHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1881
          )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1882
         )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1883
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1884
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1885
      )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1886
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1887
228524287573 intitial checkin
tz
parents:
diff changeset
  1888
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1889
228524287573 intitial checkin
tz
parents:
diff changeset
  1890
image
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1891
    "returns the current editing image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1892
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  1893
    ^ imageEditView image
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1894
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1895
228524287573 intitial checkin
tz
parents:
diff changeset
  1896
postOpenAction: anAction
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1897
   "sets an action which is evaluated after opening"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1898
228524287573 intitial checkin
tz
parents:
diff changeset
  1899
    postOpenAction := anAction
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  1900
!
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  1901
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  1902
resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  1903
    imageEditView resourceClass:aClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1904
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  1905
1398
284781677ae1 category changes
Claus Gittinger <cg@exept.de>
parents: 1393
diff changeset
  1906
!ImageEditor methodsFor:'accessing-views'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1907
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1908
colorDataSetView
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1909
    "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
  1910
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  1911
    ^(self componentAt: #colorDataSetView)
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1912
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1913
    "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
  1914
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1915
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1916
coordLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1917
    "returns the view the coord label"
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1918
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  1919
    ^self componentAt: #coordLabel
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1920
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  1921
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1922
imageEditView
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  1923
    "returns the view of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1924
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  1925
    imageEditView isNil ifTrue:[
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  1926
        imageEditView := (self componentAt: #imageEditView) scrolledView.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  1927
        imageEditView addDependent:self.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  1928
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  1929
    ^ imageEditView
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  1930
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  1931
    "Modified: / 10.2.2000 / 23:19:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1932
!
228524287573 intitial checkin
tz
parents:
diff changeset
  1933
228524287573 intitial checkin
tz
parents:
diff changeset
  1934
imagePreView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1935
    "returns the preview of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1936
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  1937
    ^ (self componentAt: #imagePreView) subViews first 
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1938
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  1939
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1940
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1941
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1942
activityInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1943
    ^ self valueOfInfoLabel
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1944
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1945
    "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
  1946
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1947
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1948
colorColumnAdaptor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1949
    ^ self
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1950
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1951
    "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
  1952
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1953
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1954
hasClassAndSelectorDefined
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1955
    ^ [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1956
        |clsName|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1957
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1958
        (clsName := imageEditView resourceClass) size > 0
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1959
        and:[(Smalltalk at:clsName ifAbsent:nil) notNil
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1960
        and:[imageEditView resourceSelector notNil]]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1961
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1962
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1963
    "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
  1964
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1965
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1966
hasClassDefined
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1967
    ^ [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1968
        |clsName|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1969
1443
ba75957c7bfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1436
diff changeset
  1970
        (clsName := imageEditView resourceClass) size > 0
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1971
        and:[(Smalltalk at:clsName ifAbsent:nil) notNil]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1972
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1973
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1974
    "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
  1975
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  1976
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  1977
hasColormap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  1978
    ^ [self image notNil and:[self image colorMap notNil]]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  1979
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  1980
    "Created: / 30.9.1998 / 23:53:55 / cg"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  1981
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  1982
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1983
imageHasNextImage
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1984
    "returns whether an image is loaded as value holder"
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1985
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1986
    ^ [self image notNil
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1987
       and:[self image imageSequence notNil]]
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1988
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1989
    "Created: / 31.7.1998 / 02:04:18 / cg"
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1990
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1991
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1992
imageInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1993
    |holder|
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1994
    (holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1995
        builder aspectAt:#imageInfoHolder put:(holder :=  '' asValue).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1996
    ].
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1997
    ^ holder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1998
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1999
    "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
  2000
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2001
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2002
imageIsLoaded
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2003
    "returns whether an image is loaded as value holder"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2004
228524287573 intitial checkin
tz
parents:
diff changeset
  2005
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2006
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2007
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  2008
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2009
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2010
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2011
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2012
imageIsLoadedAndClassDefined
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2013
    "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
  2014
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2015
    ^ [self hasClassAndSelectorDefined value
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2016
       and:[self imageIsLoaded value]]
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2017
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2018
    "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
  2019
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2020
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2021
listOfColors
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2022
    "returns the list of colors in a List"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2023
228524287573 intitial checkin
tz
parents:
diff changeset
  2024
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2025
    (holder := builder bindingAt:#listOfColors) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2026
        builder aspectAt:#listOfColors put:(holder :=  List new).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2027
        holder addDependent:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2028
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2029
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2030
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2031
228524287573 intitial checkin
tz
parents:
diff changeset
  2032
selectionOfColor
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2033
    "returns current selection of the edit color as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2034
228524287573 intitial checkin
tz
parents:
diff changeset
  2035
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2036
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2037
        builder aspectAt:#selectionOfColor put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  2038
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex).
228524287573 intitial checkin
tz
parents:
diff changeset
  2039
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2040
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2041
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2042
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2043
tileModeHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2044
    |holder|
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2045
    (holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2046
        builder aspectAt:#tileModeHolder put:(holder := false asValue).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2047
        holder addDependent:self.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2048
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2049
    ^ holder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2050
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2051
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2052
valueOfMagnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2053
    "returns current magnification of the image as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2054
228524287573 intitial checkin
tz
parents:
diff changeset
  2055
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2056
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2057
        builder aspectAt:#valueOfMagnification put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  2058
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
228524287573 intitial checkin
tz
parents:
diff changeset
  2059
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2060
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2061
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2062
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2063
!ImageEditor methodsFor:'change & update'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2064
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2065
findColorMapMode
899
43b744c647ba comment grammar
tz
parents: 898
diff changeset
  2066
    "finds the colorMapMode for a new image"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2067
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2068
    |image listOfColors|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2069
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2070
    image := self image.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2071
    image depth > 8 ifTrue: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2072
        colorMapMode value: ''. 
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2073
        self listOfColors removeAll. 
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2074
        ^ nil
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2075
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2076
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2077
    colorMapMode value:(image depth printString, '-plane').
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2078
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2079
    (listOfColors := self listOfColors) isEmpty ifTrue:[   
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2080
        self colorMapMode: colorMapMode value.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2081
        listOfColors := self listOfColors.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2082
        image := self image.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2083
    ].                               
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2084
    imageEditView drawingColors:(Array
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2085
                                    with: (listOfColors at:1) 
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2086
                                    with: (listOfColors at:2 ifAbsent:[listOfColors at:1])).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2087
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2088
    image mask notNil ifTrue: [             
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2089
        colorMapMode value:(colorMapMode value, ' + mask').
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2090
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2091
        (listOfColors detect: [:clr| clr = (Color colorId:0)] ifNone: nil) isNil
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2092
        ifTrue:[
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2093
            listOfColors addFirst:(Color colorId:0).
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2094
            imageEditView drawingColors: (Array 
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2095
                                            with:(listOfColors at:2 ifAbsent:[listOfColors at:1]) 
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2096
                                            with:(listOfColors at:1)).
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  2097
        ]
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2098
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2099
    self selectionOfColor 
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2100
        setValue: 0;
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2101
        value: (self listOfColors indexOf: imageEditView selectedColor).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2102
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2103
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2104
update:something with:aParameter from:changedObject
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2105
    |clrIndex img |
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2106
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2107
    img := self image.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2108
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2109
    changedObject == self tileModeHolder ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2110
        self imagePreView tileMode:(changedObject value) tileOffset:(img extent).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2111
        self imagePreView clear; invalidate.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2112
        ^ self
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2113
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2114
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2115
    changedObject == self listOfColors ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2116
        something == #at: ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2117
            "/ colormap entry changed at aParameter
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2118
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2119
            clrIndex := aParameter.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2120
            (self hasMask) ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2121
                clrIndex := clrIndex - 1.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2122
            ].
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2123
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2124
            img colorMap at:clrIndex put:(changedObject at:aParameter).
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2125
            self colorMapChanged.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2126
            ^ self
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2127
        ].
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2128
    ].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2129
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2130
    changedObject == imageEditView undoImages ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2131
        self valueOfCanUndo value:(changedObject notEmpty).
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2132
        ^ self.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2133
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2134
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2135
    changedObject == imageEditView ifTrue:[
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2136
        something == #imageColors ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2137
            self listOfColors contents:img colorMap.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2138
            self findColorMapMode.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2139
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2140
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2141
        something == #image ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2142
            self imagePreView image:img.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2143
            self listOfColors contents:img colorMap.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2144
            self findColorMapMode.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2145
            self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2146
                self imagePreView tileMode:true tileOffset:(img extent).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2147
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2148
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2149
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2150
        something == #subImageIn ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2151
            self imagePreView image ~~ img ifTrue:[
1406
6de5c78f5bcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  2152
                self halt:'should not happen'.
6de5c78f5bcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  2153
            ].
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2154
            self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2155
                self imagePreView invalidate.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2156
            ] ifFalse:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2157
                self imagePreView invalidate:aParameter.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2158
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2159
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2160
        ].
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2161
        something == #selectedColor ifTrue:[
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2162
            (aParameter = (Color colorId:0)) ifTrue:[
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2163
                self halt.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2164
            ].
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2165
            clrIndex := self listOfColors indexOf:aParameter.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2166
            self selectionOfColor value:clrIndex.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2167
            ^ self.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2168
        ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2169
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2170
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2171
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2172
    changedObject == imageEditView image ifTrue:[
1377
243baa3fce51 oops - leftover halts
Claus Gittinger <cg@exept.de>
parents: 1376
diff changeset
  2173
        self halt:'to be implemented'.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2174
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2175
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2176
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2177
    super update:something with:aParameter from:changedObject
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2178
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2179
    "Modified: / 10.2.2000 / 23:36:49 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2180
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2181
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2182
updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2183
    "updates channels and view, if image is loaded"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2184
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2185
    self imageIsLoaded value: false.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2186
    self listOfColors removeAll.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2187
    self imagePreView image: nil
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2188
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2189
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2190
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2191
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2192
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2193
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2194
updateLabelsAndHistory
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2195
    "updates labels and history, if something has changed"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2196
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2197
    self imageIsLoaded value: self image notNil.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2198
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2199
    self image isNil ifTrue: [^nil].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2200
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2201
    self updateInfoLabel.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2202
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2203
    imageEditView resourceMessage asCollectionOfWords size = 2
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2204
        ifTrue: [self addToHistory: imageEditView resourceMessage -> #loadFromMessage:].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2205
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2206
    self image fileName notNil
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2207
        ifTrue: [self addToHistory: self image fileName -> #loadFromFile:].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2208
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2209
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2210
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2211
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2212
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2213
!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
  2214
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2215
atColor:aOldColor put:aNewColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2216
    "a color changed to a new color
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2217
    "
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2218
    |index list|
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2219
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2220
    list  := self listOfColors.
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2221
    index := list identityIndexOf:aOldColor.
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2222
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2223
    index ~~ 0 ifTrue:[
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2224
        list at:index put:aNewColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2225
    ] ifFalse:[
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2226
        self halt:'should not happen'.
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2227
        list add:aNewColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2228
    ].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2229
!
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2230
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2231
blueAtColor:aColor put:newBlue
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2232
    "helper used to return a new row element, when blue is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2233
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2234
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2235
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2236
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2237
    byte := newBlue clampBetween:0 and:255.
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2238
    byte = aColor blueByte ifTrue:[^ self ].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2239
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2240
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2241
             put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2242
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2243
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2244
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
  2245
    "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
  2246
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2247
    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
  2248
    ^ 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
  2249
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2250
    "Created: / 26.7.1998 / 12:30:35 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2251
    "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
  2252
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2253
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2254
canSelectBlueInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2255
    ^ aColor blueByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2256
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2257
    "Created: / 7.8.1998 / 22:50:34 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2258
    "Modified: / 7.8.1998 / 22:52:57 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2259
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2260
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2261
canSelectGreenInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2262
    ^ aColor greenByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2263
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2264
    "Created: / 7.8.1998 / 22:50:22 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2265
    "Modified: / 7.8.1998 / 22:52:46 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2266
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2267
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2268
canSelectRedInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2269
    ^ aColor redByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2270
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2271
    "Created: / 7.8.1998 / 22:50:00 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2272
    "Modified: / 7.8.1998 / 22:51:03 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2273
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2274
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2275
greenAtColor:aColor put:newGreen
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2276
    "helper used to return a new row element, when green is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2277
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2278
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2279
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2280
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2281
    byte := newGreen clampBetween:0 and:255.
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2282
    byte = aColor greenByte ifTrue:[^ self].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2283
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2284
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2285
             put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2286
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2287
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2288
greenFromColor:aColor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2289
    "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
  2290
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2291
    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
  2292
    ^ aColor greenByte ? 'mask'
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2293
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2294
    "Created: / 26.7.1998 / 12:30:29 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2295
    "Modified: / 31.7.1998 / 01:11:31 / cg"
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2296
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2297
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2298
redAtColor:aColor put:newRed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2299
    "helper used to return a new row element, when red is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2300
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2301
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2302
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2303
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2304
    byte := newRed clampBetween:0 and:255.
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2305
    byte = aColor redByte ifTrue:[^ self].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2306
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2307
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2308
             put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2309
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2310
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2311
redFromColor:aColor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2312
    "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
  2313
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2314
    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
  2315
    ^ aColor redByte ? 'mask'
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2316
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2317
    "Modified: / 31.7.1998 / 01:11:35 / cg"
1449
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  2318
!
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  2319
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  2320
theColorItSelf:aColor
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  2321
    ^ aColor
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2322
! !
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2323
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  2324
!ImageEditor methodsFor:'help'!
738210a2fa06 revised version
tz
parents: 651
diff changeset
  2325
738210a2fa06 revised version
tz
parents: 651
diff changeset
  2326
defaultInfoLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2327
    "returns the default info label"
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  2328
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2329
    |resourceClass|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2330
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2331
    resourceClass := imageEditView resourceClass.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2332
    (resourceClass isSymbol and: [(Smalltalk at:resourceClass) isClass])
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2333
    ifTrue:[
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2334
        ^ resourceClass, ' >> ', imageEditView resourceSelector
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  2335
    ].
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2336
    ^ 'No class and selector defined.'
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  2337
!
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  2338
702
c9de7a9bc416 docu call changed
tz
parents: 694
diff changeset
  2339
openDocumentation
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2340
    "opens the documentation file of the Image Editor"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  2341
763
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  2342
    self openHTMLDocument: 'tools/uipainter/ImageEditor.html'
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  2343
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  2344
! !
738210a2fa06 revised version
tz
parents: 651
diff changeset
  2345
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2346
!ImageEditor methodsFor:'loading'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2347
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2348
loadFromFile: aFileName
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2349
    "loads an image from aFileName and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2350
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2351
    |img|
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2352
980
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2353
    self withCursor:Cursor wait do:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2354
        (imageEditView loadFromFile: aFileName) notNil ifTrue:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2355
            (img := self image) notNil ifTrue:[          
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2356
                img colorMap notNil ifTrue:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2357
                    self listOfColors contents:(img usedColors asSet asOrderedCollection).
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2358
                ] ifFalse:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2359
                    self listOfColors removeAll.
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2360
                ].
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2361
                self findColorMapMode.     
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  2362
                self updateLabelsAndHistory.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2363
                img := img onDevice:device.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2364
                imageEditView image:img.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2365
            ] ifFalse:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2366
                self updateForNoImage
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2367
            ].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2368
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2369
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2370
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2371
    "Modified: / 16.3.1999 / 21:44:26 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2372
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2373
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2374
loadFromImage:anImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2375
    "loads an image from anImage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2376
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2377
    |img|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2378
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2379
    anImage notNil ifTrue:[    
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2380
        img := anImage onDevice:device.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2381
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2382
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2383
    imageEditView image:img.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2384
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2385
    img notNil ifTrue:[    
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2386
        img colorMap notNil ifTrue:[
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2387
            self listOfColors contents:(img usedColors asSet asOrderedCollection).
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2388
        ] ifFalse:[
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2389
            self listOfColors removeAll.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2390
        ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2391
        self findColorMapMode.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2392
        self updateLabelsAndHistory.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2393
    ] ifFalse:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2394
        self updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2395
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2396
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2397
    "Modified: / 16.3.1999 / 21:43:56 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2398
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2399
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2400
loadFromMessage: aMessage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2401
    "loads an image by evaluating aMessage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2402
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2403
    |img|
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2404
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2405
    (imageEditView loadFromMessage: aMessage) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2406
        (img := self image) notNil ifTrue:[
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2407
            img := img onDevice:device.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2408
            self listOfColors contents:(img usedColors asSet asOrderedCollection).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2409
            self findColorMapMode.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2410
            self updateLabelsAndHistory.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2411
            imageEditView image:img.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2412
        ] ifFalse:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2413
            self updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2414
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2415
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2416
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2417
    "Modified: / 16.3.1999 / 21:44:41 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2418
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2419
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2420
loadFromOrPrepareForMessage: aMessage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2421
    "loads an image by evaluating aMessage;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2422
     if no image could extract from aMessage; do set the class and the selector from 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2423
     the aMessage for a saving at the end of editing"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2424
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2425
    (imageEditView loadFromMessage: aMessage) notNil
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2426
    ifTrue: [
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2427
        self listOfColors contents: self image usedColors asSet asOrderedCollection.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2428
        self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2429
    ] ifFalse: [
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2430
        imageEditView resourceMessage: aMessage.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2431
    ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2432
    self updateLabelsAndHistory.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2433
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2434
    "Modified: / 16.3.1999 / 21:45:07 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2435
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2436
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2437
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  2438
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2439
colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2440
    "returns colorMapMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2441
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2442
    colorMapMode isNil ifTrue: [colorMapMode := '' asValue].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2443
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2444
    ^colorMapMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2445
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2446
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2447
editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2448
    "returns editMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2449
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2450
    editMode isNil ifTrue: [
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2451
        editMode := #point asValue.
1329
a38c2e29d1fb use onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
  2452
        editMode onChangeEvaluate:[imageEditView editMode:(editMode value)]
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2453
    ].
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2454
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2455
    ^editMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2456
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2457
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2458
mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2459
    "returns mouseKeyColorMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2460
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2461
    mouseKeyColorMode isNil ifTrue:[
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2462
        mouseKeyColorMode := 1 asValue.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2463
        mouseKeyColorMode onChangeEvaluate: [
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2464
            imageEditView mouseKeyColorMode:mouseKeyColorMode value. 
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2465
            self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor).
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2466
        ]
956
dc4df8952e82 check whether imageEditView is nil
ca
parents: 951
diff changeset
  2467
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2468
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2469
    ^mouseKeyColorMode
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2470
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2471
    "Modified: / 10.2.2000 / 23:16:42 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2472
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2473
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2474
!ImageEditor methodsFor:'private'!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2475
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2476
updateImage
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2477
    |img|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2478
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2479
    img := imageEditView image.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2480
    imageEditView image:img.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2481
    self fetchImageData.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2482
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2483
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2484
updateImagePreView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2485
    self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2486
        self imagePreView tileMode:true tileOffset:(self image extent).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2487
    ]
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2488
! !
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2489
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2490
!ImageEditor methodsFor:'queries'!
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2491
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2492
hasMask
1556
92d3ec7850cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1545
diff changeset
  2493
    ^ colorMapMode value notNil and:[colorMapMode value endsWith:'mask']
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2494
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2495
    "Created: / 18.8.1998 / 17:17:38 / cg"
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2496
!
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2497
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2498
preferredExtent
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2499
    "returns the preferred extent"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2500
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2501
    ^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5)
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2502
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2503
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2504
! !
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  2505
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2506
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  2507
228524287573 intitial checkin
tz
parents:
diff changeset
  2508
magnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2509
    "returns the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2510
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2511
    self imageEditView isNil ifTrue: [^1].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2512
    ^imageEditView magnification x
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2513
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2514
228524287573 intitial checkin
tz
parents:
diff changeset
  2515
magnification: aValue
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2516
    "sets the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2517
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  2518
    |magnification|        
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  2519
    magnification := (aValue ? 1) asPoint.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2520
    (magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2521
    imageEditView magnification: magnification
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2522
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2523
228524287573 intitial checkin
tz
parents:
diff changeset
  2524
selectedColorIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2525
    "returns the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2526
228524287573 intitial checkin
tz
parents:
diff changeset
  2527
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  2528
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2529
228524287573 intitial checkin
tz
parents:
diff changeset
  2530
selectedColorIndex: anIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2531
    "sets the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2532
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2533
    |clr pixel|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2534
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2535
    selectedColorIndex := anIndex.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2536
    clr := self listOfColors at:anIndex ifAbsent:nil.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2537
    clr isNil ifTrue:[^ self].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2538
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  2539
    pixel := anIndex - 1.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2540
    (self listOfColors at:1) = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2541
        anIndex == 1 ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2542
            pixel := nil.       "/ mask
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2543
        ] ifFalse:[
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  2544
            pixel := pixel - 1
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2545
        ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2546
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2547
    imageEditView selectedColorIndex:pixel.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2548
    imageEditView selectedColor:clr.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2549
228524287573 intitial checkin
tz
parents:
diff changeset
  2550
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2551
228524287573 intitial checkin
tz
parents:
diff changeset
  2552
!ImageEditor methodsFor:'startup / release'!
228524287573 intitial checkin
tz
parents:
diff changeset
  2553
228524287573 intitial checkin
tz
parents:
diff changeset
  2554
closeRequest
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2555
    "close request"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2556
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2557
    imageEditView checkModified ifTrue:[super closeRequest]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2558
228524287573 intitial checkin
tz
parents:
diff changeset
  2559
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2560
228524287573 intitial checkin
tz
parents:
diff changeset
  2561
open
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2562
    "after opening, sets the masterApplication of the imageEditView to self"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2563
228524287573 intitial checkin
tz
parents:
diff changeset
  2564
    super open.
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  2565
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2566
    imageEditView := (self componentAt: #imageEditView) subViews first.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2567
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2568
228524287573 intitial checkin
tz
parents:
diff changeset
  2569
postOpenWith:aBuilder
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2570
    "after opening, sets the masterApplication of the imageEditView to self;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2571
     evaluate the postOpenAction"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2572
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2573
    imageEditView undoImages addDependent:self.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2574
    imageEditView imageInfoHolder:(self imageInfoHolder).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2575
    imageEditView activityInfoHolder:(self activityInfoHolder).
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2576
    imageEditView clickInfoCallBack:[:button :point | 
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2577
                        |mouseButtonColorToolBar|
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2578
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2579
                        mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2580
                        (mouseButtonColorToolBar itemAt:button) toggleIndication.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2581
                        mouseButtonColorToolBar do: [:i| i updateIndicators].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2582
                  ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2583
    imageEditView addDependent:self.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2584
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2585
    postOpenAction notNil ifTrue: [postOpenAction value].
228524287573 intitial checkin
tz
parents:
diff changeset
  2586
1250
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  2587
    super postOpenWith:aBuilder.
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  2588
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  2589
    aBuilder keyboardProcessor menuBar:nil.
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2590
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2591
    "Modified: / 10.2.2000 / 23:17:43 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2592
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2593
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2594
!ImageEditor methodsFor:'user actions - colormap'!
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2595
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2596
addColorToColormap
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2597
    |depth img cMap newColorMap newImage oldCListSize newMode|
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2598
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2599
    img := self image.
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2600
    img isNil ifTrue:[
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2601
        self warn:'No Image.'.
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2602
        ^ self
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2603
    ].
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2604
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2605
    depth := img depth.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2606
    cMap := img colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2607
    cMap isNil ifTrue:[
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2608
        self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2609
        ^ self
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2610
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2611
1583
c21cb650b2a0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1579
diff changeset
  2612
    ("(depth == 1)" false
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2613
    or:[cMap size == (1 bitShift:depth)]) ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2614
        depth >= 8 ifTrue:[
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2615
            self warn:'No space for more colors in colormap.'.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2616
            ^ self
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2617
        ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2618
        (self confirm:'No space for more colors in colormap.\Change depth first.' withCRs)
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2619
        ifFalse:[
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2620
            ^ self
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2621
        ].
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2622
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2623
        imageEditView makeUndo.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2624
        newMode := (depth*2) printString , (colorMapMode value copyFrom:2).
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2625
        self colorMapMode:newMode.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2626
    ] ifFalse:[
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2627
        imageEditView makeUndo.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2628
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2629
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2630
    cMap := cMap asArray.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2631
    oldCListSize := self listOfColors size.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2632
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2633
"/    (colorMapMode value asString endsWith:'mask') ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2634
"/        cMap last = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2635
"/            cMap := cMap copyWithoutLast:1
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2636
"/        ] ifFalse:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2637
"/            cMap first = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2638
"/                cMap := cMap copyFrom:2
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2639
"/            ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2640
"/        ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2641
"/    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2642
"/
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2643
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2644
    newColorMap := cMap copyWith:(Color black).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2645
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2646
    newImage := img species new
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2647
                    width:img width
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2648
                    height:img height
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2649
                    depth:depth
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2650
                    fromArray:img bits.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2651
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2652
    newImage colorMap:newColorMap.  
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2653
    newImage fileName:img fileName.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2654
    newImage mask:(img mask copy).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2655
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2656
    (imageEditView image:newImage) notNil ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2657
        self listOfColors contents: newImage colorMap.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2658
        self findColorMapMode.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2659
        "/ mhmh - somehow, we get two colors added ... (sigh findColorMapMode adds another one ...)
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2660
        self listOfColors size > (oldCListSize + 1) ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2661
            self listOfColors removeLast
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2662
        ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2663
        self selectionOfColor value:(self listOfColors size).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2664
        self updateLabelsAndHistory.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2665
    ]
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2666
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2667
    "Created: / 12.3.1999 / 00:20:28 / cg"
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2668
    "Modified: / 16.3.1999 / 21:57:26 / cg"
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2669
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2670
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2671
clearMaskedPixels
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2672
    "clear all masked pixels (to pixelValue 0)"
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2673
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2674
    |newImage oldImage| 
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2675
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2676
    oldImage := self image.
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2677
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2678
    imageEditView makeUndo.
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2679
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2680
    self withExecuteCursorDo:[
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2681
        newImage := oldImage clearMaskedPixels.
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2682
        0 to:newImage height - 1 do:[:y |
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2683
            0 to:newImage width - 1 do:[:x |
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2684
                (newImage maskAtX:x y:y) == 0 ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2685
                    newImage pixelAtX:x y:y put:0
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2686
                ]
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2687
            ]
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2688
        ].
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  2689
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2690
        (imageEditView image:newImage) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2691
            self fetchImageData.
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2692
        ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2693
    ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2694
!
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2695
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2696
colorMapChanged
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2697
    |img|
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2698
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2699
    img := self image.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2700
    img release.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2701
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2702
    self imageEditView invalidate.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2703
    self imagePreView invalidate.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2704
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2705
"/    (imageEditView image:img) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2706
"/        self updateLabelsAndHistory.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2707
"/        self imagePreView image:img
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2708
"/    ]
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2709
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2710
    "Created: / 7.8.1998 / 22:26:10 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2711
    "Modified: / 18.8.1998 / 17:08:55 / cg"
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2712
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2713
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2714
colorMapMode:aMode
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2715
    "calculates a new color map for the image from aMode"
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2716
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2717
    |depth numColors newColorMap newImage 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2718
     oldImage image newColors realColorMap oldFileName
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2719
     usedColors useNearest usageCounts tmpBits tmpMap quest
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2720
     prevMode maskThreshold maskImage| 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2721
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2722
    self withExecuteCursorDo:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2723
        oldImage := self image.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2724
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2725
        prevMode := colorMapMode value.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2726
        oldImage depth > 8 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2727
            prevMode := nil
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2728
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2729
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2730
        newColorMap := self class listOfColorMaps at:aMode.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2731
        depth       := (newColorMap size log: 2) asInteger. 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2732
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2733
        useNearest := false.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2734
        depth == 1 ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2735
            quest := 'Keep colormap (or use standard B&W)'
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2736
        ] ifFalse:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2737
            prevMode isNil ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2738
                quest := 'Compute colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2739
            ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2740
                quest := 'Keep colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2741
            ]
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2742
        ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2743
        ((prevMode = aMode)
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2744
        or:[depth > oldImage depth
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2745
        or:[self confirm:(resources string:quest)]]) ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2746
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2747
            "/ keep the colormap
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2748
            newColorMap atAllPut:Color black.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2749
            depth > oldImage depth ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2750
                "/ easy - simply copy the part
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2751
                numColors := 1 bitShift:oldImage depth.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2752
                0 to:numColors-1 do:[:pixel |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2753
                    newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2754
                ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2755
            ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2756
                "/ see if all used color fit the new colormap
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2757
                usedColors := oldImage usedColorsMax:(1 bitShift:depth).
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2758
                (usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2759
                    usedColors := oldImage realUsedColors
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2760
                ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2761
                (usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2762
                    "/ yea - just install them
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2763
                    usedColors asArray keysAndValuesDo:[:idx :clr |
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2764
                        newColorMap at:idx put:clr
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2765
                    ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2766
                ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2767
                    "/ copy over those that are most often used.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2768
                    oldImage depth < 8 ifTrue:[
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2769
                        tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2770
                        oldImage bits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2771
                            expandPixels:(oldImage depth)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2772
                            width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2773
                            height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2774
                            into:tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2775
                            mapping:nil.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2776
                    ] ifFalse:[
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2777
                        oldImage depth == 8 ifTrue:[
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2778
                            tmpBits := oldImage bits
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2779
                        ] ifFalse:[
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2780
                            colorMapMode value:prevMode.
1471
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  2781
                            self warn:('Too many used colors in image (', oldImage usedColors size printString , ').').
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2782
                            ^ self
1471
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  2783
"/                            (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs))
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  2784
"/                            ifFalse:[.
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  2785
"/                                ^ self
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  2786
"/                            ].
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  2787
"/                            self image: (Image newForDepth:depth) fromImage:oldImage.
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  2788
"/                            ^ self.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2789
                        ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2790
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2791
                    usageCounts := tmpBits usageCounts.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2792
                    tmpMap := Array new:usageCounts size.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2793
                    oldImage colorMap asArray keysAndValuesDo:[:i :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2794
                        tmpMap at:i put:clr
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2795
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2796
                    usageCounts sort:[:a :b | a > b] with:tmpMap.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2797
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2798
                    1 to:(1 bitShift:depth) do:[:idx |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2799
                        newColorMap at:idx put:(tmpMap at:idx)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2800
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2801
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2802
                    useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2803
                                        confirmWithCancel:(resources 
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2804
                                                              string:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?'
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2805
                                                              with:usedColors size
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2806
                                                              with:(1 bitShift:depth)) withCRs
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  2807
                                        labels:(resources array:#('Cancel' 'First' 'Nearest')).
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2808
                    useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  2809
                        colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2810
                        ^ self   "/ cancel
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2811
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2812
                ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2813
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2814
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2815
            "/ standard colormap
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2816
            usedColors := oldImage usedColors.
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2817
            (usedColors conform:[:clr | newColorMap includes:clr]) ifFalse:[
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2818
                useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2819
                                    confirmWithCancel:(resources 
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2820
                                                           string:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?'
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2821
                                                       ) withCRs
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  2822
                                    labels:(resources string:#('Cancel' 'First' 'Nearest')).
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2823
                useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  2824
                    colorMapMode value:prevMode.
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2825
                    ^ self   "/ cancel
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2826
                ].
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2827
            ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2828
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2829
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2830
        imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2831
1424
d7367ae7f85e fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
  2832
        newImage    := Image newForDepth:depth.
d7367ae7f85e fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
  2833
        newImage depth:depth.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2834
        oldFileName := oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2835
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2836
        Image imageErrorSignal handle:[:ex|
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2837
            Color colorErrorSignal handle:[:ex|
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  2838
                colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2839
                imageEditView undo.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2840
                ^ self warn:(resources string:'Conversion failed !!')
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2841
            ] do:[
1393
c4a11a7d407f use Image>>newForDepth:
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  2842
                newImage := Image newForDepth:depth.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2843
                newImage width:oldImage width height:oldImage height depth:depth.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2844
                newImage colorMap:newColorMap.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2845
                newImage photometric:#palette.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2846
                newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2847
            
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2848
                oldImage colorsFromX:0 y:0 toX:(oldImage width-1) y:(oldImage height-1) do:
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2849
                [:x :y :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2850
                    |newColor|
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2851
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2852
                    (newColorMap includes:clr)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2853
                        ifTrue: [newColor := clr]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2854
                        ifFalse: [
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2855
                            newColor := clr nearestIn:newColorMap.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2856
                            useNearest ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2857
                                (newColor deltaFrom:clr) > 0.5 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2858
                                    newColor := oldImage colorFromValue:0
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2859
                                ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2860
                            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2861
                        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2862
                    newImage colorAtX:x y:y put:newColor.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2863
                ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2864
                image := newImage
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2865
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2866
        ] do:[ 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2867
            image := newImage fromImage:oldImage
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2868
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2869
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2870
        (aMode asString endsWith:'mask') ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2871
            image mask isNil ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2872
                (self confirm:'Generate mask from black ?') ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2873
                    maskThreshold := 0.1.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2874
                    maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2875
                ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2876
                    maskImage := Depth1Image extent:image extent.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2877
                    maskImage data:(ByteArray 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2878
                                        new:(maskImage bytesPerRow * maskImage height)
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2879
                                        withAll:16rFF).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2880
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2881
"/                    maskImage fillRectangle:(image bounds) withColor:(Color colorId:1).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2882
                ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2883
                image mask:maskImage.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2884
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2885
        ] ifFalse:[ 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2886
            image mask: nil.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2887
        ]. 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2888
        realColorMap := OrderedCollection new.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2889
        image realColorMap do:[:clr|
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2890
            (realColorMap includes: clr) ifFalse: [realColorMap add: clr]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2891
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2892
        newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size).
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2893
        newColorMap do:[:clr|
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2894
            ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2895
            ifTrue:[      
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2896
                newColors add: clr
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2897
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2898
        ].                  
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2899
        image colorMap: newColors.   
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2900
        image fileName: oldFileName.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2901
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2902
        (imageEditView image: image) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2903
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2904
"/            self listOfColors contents: image colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2905
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2906
"/            self updateLabelsAndHistory.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2907
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2908
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2909
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2910
    "Modified: / 16.3.1999 / 21:55:39 / cg"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2911
!
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2912
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2913
compressColorMap
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2914
    "calculates a new color map for the image, using only used colors"
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2915
927
74a71f2c5ef8 obsolete locals removed
tz
parents: 926
diff changeset
  2916
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2917
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2918
    oldImage := self image.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2919
    depth := oldImage depth.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2920
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2921
    oldImage photometric ~~ #palette ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2922
        self information:'Compress colorMap: Only palette images have colormaps.'.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2923
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2924
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2925
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  2926
    usedColors := oldImage realUsedColors.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2927
    usedColors size == (1 bitShift:depth) ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2928
        self information:'Compress colorMap: All colors are used - no compression.'.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2929
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2930
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2931
    usedColors size == oldImage colorMap size ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2932
        self information:'Compress colorMap: Colormap already compressed - no compression.'.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2933
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2934
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2935
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2936
    imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2937
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2938
    self information:('Compress colorMap: %1 colors used.' bindWith:usedColors size).
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2939
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2940
    self withExecuteCursorDo:[
996
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2941
"/        newColorMap := Array new:usedColors size.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2942
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2943
        "/ translation table
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2944
        oldToNew := ByteArray new:(1 bitShift:depth).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2945
        newColorMap := usedColors asArray.
996
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2946
        newColorMap sort:[:a :b |
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2947
                                a redByte == b redByte ifTrue:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2948
                                    a greenByte == b greenByte ifTrue:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2949
                                        a blueByte < b blueByte
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2950
                                    ] ifFalse:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2951
                                        a greenByte < b greenByte 
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2952
                                    ]
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2953
                                ] ifFalse:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2954
                                    a redByte < b redByte 
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2955
                                ]
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2956
                          ].
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  2957
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2958
        oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2959
            |newPixel|
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2960
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2961
            (usedColors includes:clr) ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2962
                newPixel := newColorMap indexOf:clr.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2963
                oldToNew at:oldIdx put:newPixel-1.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2964
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2965
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2966
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2967
        oldBits := oldImage bits.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2968
        newBits := ByteArray new:(oldBits size).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2969
        depth ~~ 8 ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2970
            "/ expand/compress can only handle 8bits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2971
            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2972
            oldBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2973
                expandPixels:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2974
                width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2975
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2976
                into:tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2977
                mapping:oldToNew.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2978
            tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2979
                compressPixels:depth 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2980
                width:oldImage width 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2981
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2982
                into:newBits 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2983
                mapping:nil
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2984
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2985
            oldBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2986
                expandPixels:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2987
                width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2988
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2989
                into:newBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2990
                mapping:oldToNew.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2991
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2992
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2993
        newImage := oldImage species new
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2994
                        width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2995
                        height:oldImage height
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2996
                        depth:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2997
                        fromArray:newBits.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2998
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  2999
        newImage colorMap:newColorMap.  
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3000
        newImage fileName:oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3001
        newImage mask:(oldImage mask copy).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3002
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3003
        (imageEditView image:newImage) notNil ifTrue:
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3004
        [
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3005
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3006
"/            self listOfColors contents: newImage colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3007
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3008
"/            self updateLabelsAndHistory.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3009
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3010
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3011
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3012
    "Created: / 28.7.1998 / 20:03:11 / cg"
996
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3013
    "Modified: / 15.9.1998 / 17:53:32 / cg"
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3014
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3015
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3016
copyMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3017
    |mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3018
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3019
    mask := self image mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3020
    MaskClipboard := mask subImageIn: (0@0 extent:mask extent).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3021
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3022
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3023
fetchImageData
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3024
    |image|
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3025
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3026
    (image := imageEditView image) notNil ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3027
        self listOfColors contents:(image colorMap).
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3028
        self findColorMapMode.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3029
        self updateLabelsAndHistory.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3030
    ]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3031
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3032
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3033
inspectColor
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3034
    | img clrIndex|
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3035
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3036
    img := self image.
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3037
    img isNil ifTrue:[
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3038
        self warn:'No Image.'.
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3039
        ^ self
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3040
    ].
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3041
    clrIndex := self selectionOfColor value.
1603
fda6d834bb40 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1598
diff changeset
  3042
    img mask notNil ifTrue: [ clrIndex := clrIndex - 1 ].
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3043
    (img colorFromValue:clrIndex-1) inspect
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3044
!
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3045
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3046
makeBrighter
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3047
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3048
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3049
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3050
        anyChange := imageEditView makeBrighter.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3051
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3052
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3053
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3054
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3055
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3056
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3057
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3058
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3059
makeDarker
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3060
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3061
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3062
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3063
        anyChange := imageEditView makeDarker.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3064
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3065
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3066
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3067
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3068
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3069
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3070
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3071
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3072
makeGrayScale
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3073
    |anyChange|
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3074
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3075
    self withExecuteCursorDo:[
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3076
        anyChange := imageEditView makeGrayScale.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3077
        anyChange ifFalse:[
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3078
            Dialog warn:'Image unchanged'.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3079
        ] ifTrue:[
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3080
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3081
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3082
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3083
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3084
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3085
makeInverse
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3086
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3087
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3088
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3089
        anyChange := imageEditView makeInverse.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3090
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3091
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3092
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3093
            self updateImage.
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3094
        ]
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3095
    ].
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3096
!
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3097
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3098
makeSelectedColorBrighter
1559
31c19f47395b Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1558
diff changeset
  3099
    |img cMap newImage clr|
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3100
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3101
    img := self image.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3102
    cMap := img colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3103
    cMap isNil ifTrue:[
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3104
        self warn:'Image has no colormap\change colorMap mode first.' withCRs.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3105
        ^ self
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3106
    ].
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3107
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3108
    imageEditView makeUndo.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3109
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3110
    cMap := cMap asArray.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3111
    clr := cMap at:imageEditView selectedColorIndex.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3112
    cMap at:imageEditView selectedColorIndex put:clr lightened.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3113
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3114
    newImage := img species new
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3115
                    width:img width
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3116
                    height:img height
1559
31c19f47395b Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1558
diff changeset
  3117
                    depth:nil
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3118
                    fromArray:img bits.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3119
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3120
    newImage colorMap:cMap.  
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3121
    newImage fileName:img fileName.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3122
    newImage mask:(img mask copy).
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3123
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3124
    (imageEditView image:newImage) notNil ifTrue:[
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3125
        self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3126
"/        self listOfColors contents: newImage colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3127
"/        self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3128
"/        self updateLabelsAndHistory.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3129
    ]
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3130
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3131
    "Created: / 12.3.1999 / 00:20:28 / cg"
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3132
    "Modified: / 16.3.1999 / 21:57:26 / cg"
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3133
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3134
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3135
makeSelectedColorDarker
1559
31c19f47395b Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1558
diff changeset
  3136
    |img cMap clr newImage|
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3137
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3138
    img := self image.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3139
    cMap := img colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3140
    cMap isNil ifTrue:[
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3141
        self warn:'Image has no colormap\change colorMap mode first.' withCRs.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3142
        ^ self
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3143
    ].
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3144
    imageEditView makeUndo.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3145
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3146
    cMap := cMap asArray.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3147
    clr := cMap at:imageEditView selectedColorIndex.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3148
    cMap at:imageEditView selectedColorIndex put:clr darkened.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3149
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3150
    newImage := img species new
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3151
                    width:img width
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3152
                    height:img height
1559
31c19f47395b Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1558
diff changeset
  3153
                    depth:nil
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3154
                    fromArray:img bits.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3155
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3156
    newImage colorMap:cMap.  
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3157
    newImage fileName:img fileName.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3158
    newImage mask:(img mask copy).
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3159
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3160
    (imageEditView image:newImage) notNil ifTrue:[
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3161
        self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3162
"/        self listOfColors contents: newImage colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3163
"/        self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3164
"/        self updateLabelsAndHistory.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3165
    ]
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3166
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3167
    "Created: / 12.3.1999 / 00:20:28 / cg"
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3168
    "Modified: / 16.3.1999 / 21:57:26 / cg"
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3169
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3170
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3171
pasteMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3172
    |img mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3173
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3174
    imageEditView makeUndo.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3175
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3176
    img := self image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3177
    mask := img mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3178
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3179
    mask 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3180
         copyFrom:MaskClipboard
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3181
         x:0 y:0
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3182
         toX:0 y:0 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3183
         width:(mask width min:MaskClipboard width)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3184
         height:(mask height min:MaskClipboard height).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3185
    img mask:mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3186
    (imageEditView image:img copy) notNil ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3187
        self fetchImageData.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3188
    ]
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3189
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3190
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3191
reduceNumberOfColors
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3192
    |s n anyChange img|
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3193
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3194
    s := Dialog request:'Number of color bits to strip (1-7) ?'.
1435
f39893848245 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  3195
    s size == 0 ifTrue:[^ self].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3196
    n := Integer readFrom:s onError:0.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3197
    (n between:1 and:7) ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3198
        Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3199
        ^ self
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3200
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3201
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3202
    self withExecuteCursorDo:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3203
        anyChange := imageEditView reduceColorResolutionBy:n.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3204
        anyChange ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3205
            Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3206
        ] ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3207
            img := imageEditView image.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3208
            imageEditView image:img.
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3209
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3210
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3211
"/            self listOfColors contents:(img colorMap).
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3212
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3213
"/            self updateLabelsAndHistory.
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3214
            Dialog information:(img usedColors size printString , ' colors used.')
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3215
        ]
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3216
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3217
!
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3218
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3219
sortColorMap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3220
    "calculates a new color map for the image, sorting colors"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3221
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3222
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3223
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3224
    oldImage := self image.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3225
    depth := oldImage depth.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3226
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3227
    oldImage photometric ~~ #palette ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3228
        self information:'Compress colorMap: Only palette images have colormaps.'.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3229
        ^ self
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3230
    ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3231
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3232
    usedColors := oldImage realColorMap.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3233
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3234
    imageEditView makeUndo.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3235
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3236
    self withExecuteCursorDo:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3237
"/        newColorMap := Array new:usedColors size.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3238
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3239
        "/ translation table
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3240
        oldToNew := ByteArray new:(1 bitShift:depth).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3241
        newColorMap := usedColors asArray.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3242
        newColorMap sort:[:a :b |
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3243
                                a redByte == b redByte ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3244
                                    a greenByte == b greenByte ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3245
                                        a blueByte < b blueByte
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3246
                                    ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3247
                                        a greenByte < b greenByte 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3248
                                    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3249
                                ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3250
                                    a redByte < b redByte 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3251
                                ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3252
                          ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3253
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3254
        oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3255
            |newPixel|
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3256
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3257
            (usedColors includes:clr) ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3258
                newPixel := newColorMap indexOf:clr.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3259
                oldToNew at:oldIdx put:newPixel-1.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3260
            ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3261
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3262
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3263
        oldBits := oldImage bits.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3264
        newBits := ByteArray new:(oldBits size).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3265
        depth ~~ 8 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3266
            "/ expand/compress can only handle 8bits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3267
            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3268
            oldBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3269
                expandPixels:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3270
                width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3271
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3272
                into:tmpBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3273
                mapping:oldToNew.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3274
            tmpBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3275
                compressPixels:depth 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3276
                width:oldImage width 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3277
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3278
                into:newBits 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3279
                mapping:nil
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3280
        ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3281
            oldBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3282
                expandPixels:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3283
                width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3284
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3285
                into:newBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3286
                mapping:oldToNew.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3287
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3288
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3289
        newImage := oldImage species new
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3290
                        width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3291
                        height:oldImage height
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3292
                        depth:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3293
                        fromArray:newBits.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3294
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3295
        newImage colorMap:newColorMap.  
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3296
        newImage fileName:oldImage fileName.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3297
        newImage mask:(oldImage mask copy).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3298
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3299
        (imageEditView image:newImage) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3300
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3301
"/            self listOfColors contents: newImage colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3302
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3303
"/            self updateLabelsAndHistory.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3304
        ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3305
    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3306
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3307
    "Modified: / 15.9.1998 / 17:53:32 / cg"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3308
    "Created: / 30.9.1998 / 23:51:23 / cg"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3309
! !
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3310
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3311
!ImageEditor methodsFor:'user actions - editing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3312
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3313
doBrowseClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3314
    "opens a System Browser on the resourceClass and the resourceSelector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3315
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3316
    |cls|
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3317
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3318
    cls := Smalltalk at:(imageEditView resourceClass) ifAbsent:nil.
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3319
    cls isNil ifTrue:[^ self warn:'No Class specified'].
1488
cb1867473e3e UserPreference access
Claus Gittinger <cg@exept.de>
parents: 1481
diff changeset
  3320
    UserPreferences systemBrowserClass
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3321
        openInClass:cls class 
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3322
        selector:(imageEditView resourceSelector)
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3323
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3324
    "Modified: / 31.7.1998 / 02:01:15 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3325
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3326
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3327
doCropAll
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3328
    "find all borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3329
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3330
    imageEditView cropLeft:true right:true top:true bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3331
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3332
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3333
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3334
    "Created: / 7.9.1998 / 16:33:43 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3335
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3336
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3337
doCropBottom
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3338
    "find a bottom border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3339
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3340
    imageEditView cropLeft:false right:false top:false bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3341
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3342
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3343
    "Created: / 7.9.1998 / 13:00:20 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3344
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3345
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3346
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3347
doCropLeft
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3348
    "find a left border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3349
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3350
    imageEditView cropLeft:true right:false top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3351
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3352
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3353
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3354
    "Modified: / 7.9.1998 / 14:26:34 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3355
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3356
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3357
doCropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3358
    "let user specify borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3359
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3360
    |bindings left top right bottom img firstChange gropAction acceptChannel|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3361
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3362
    acceptChannel := TriggerValue new.
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  3363
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  3364
    firstChange := true.
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  3365
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3366
    gropAction := 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3367
        [:lV :rV :tV :bV | |l r t b|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3368
            acceptChannel value:true.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3369
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3370
            l := lV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3371
            r := rV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3372
            t := tV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3373
            b := bV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3374
            (l + r + t + b) == 0 ifTrue:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3375
                Screen current beep
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3376
            ] ifFalse:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3377
                img := imageEditView image.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3378
                firstChange ifTrue:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3379
                    imageEditView makeUndo.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3380
                    firstChange := false.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3381
                ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3382
                imageEditView
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3383
                    makeSubImageX:l y:t 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3384
                    width:(img width - l - r)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3385
                    height:(img height - t - b).
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3386
                self updateInfoLabel
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3387
            ].
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  3388
        ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3389
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3390
    bindings := IdentityDictionary new.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3391
    bindings at:#left put:(left := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3392
    bindings at:#right put:(right := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3393
    bindings at:#top put:(top := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3394
    bindings at:#bottom put:(bottom := 1 asValue).
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3395
    bindings at:#acceptChannel put:acceptChannel.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3396
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3397
    bindings at:#gropLeftNow   put:[ gropAction value:left value:0 value:0 value:0 ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3398
    bindings at:#gropRightNow  put:[ gropAction value:0 value:right value:0 value:0 ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3399
    bindings at:#gropTopNow    put:[ gropAction value:0 value:0 value:top value:0 ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3400
    bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3401
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3402
    bindings at:#applyAction   put:[ gropAction value:left value:right value:top value:bottom ].
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  3403
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  3404
    (self openDialogInterface:#gropDialogSpec withBindings:bindings) 
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3405
    ifFalse:[ 
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3406
        firstChange ~~ true ifTrue:[
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3407
            imageEditView undo.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3408
            self updateImagePreView.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3409
        ]
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  3410
    ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3411
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3412
    "Created: / 7.9.1998 / 18:16:07 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3413
    "Modified: / 7.9.1998 / 18:20:42 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3414
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3415
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3416
doCropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3417
    "find a right border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3418
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3419
    imageEditView cropLeft:false right:true top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3420
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3421
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3422
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3423
    "Modified: / 7.9.1998 / 14:26:44 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3424
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3425
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3426
doCropTop
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3427
    "find a top border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3428
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3429
    imageEditView cropLeft:false right:false top:true bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3430
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3431
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3432
    "Created: / 7.9.1998 / 13:00:19 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3433
    "Modified: / 7.9.1998 / 14:26:52 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3434
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3435
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  3436
doEditMask
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  3437
    ""
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  3438
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  3439
    self image mask edit
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  3440
!
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  3441
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3442
doFlipHorizontal
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3443
    "flips horizontally current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3444
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3445
    imageEditView flipHorizontal
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3446
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3447
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3448
doFlipVertical
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3449
    "flips vertically current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3450
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3451
    imageEditView flipVertical
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3452
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3453
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3454
doMagnifyDown
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3455
    "magnifies current image one step down"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3456
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3457
    |magHolder mag|
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3458
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3459
    magHolder := self valueOfMagnification.
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3460
    (mag := magHolder value) > 1 ifTrue: [
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3461
        magHolder value: mag - 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3462
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3463
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3464
    "Modified: / 26.7.1998 / 20:24:08 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3465
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3466
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3467
doMagnifyImage
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3468
    "magnifies the current image to a new size"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3469
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3470
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3471
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3472
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3473
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3474
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3475
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3476
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3477
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3478
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3479
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3480
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3481
    and: [(newSize := Object readFromString:(box contents) onError:nil) notNil])
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3482
    ifTrue:[
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3483
        newSize isPoint ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3484
            self warn:'please enter the new size as ''x @ y''.'.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3485
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3486
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3487
        imageEditView magnifyImageTo:newSize.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3488
    ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3489
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3490
    self updateInfoLabel
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3491
!
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3492
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3493
doMagnifyImageBy
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3494
    "magnifies the current image (by a scale)"
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3495
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3496
    |box oldSize newSize scale image|
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3497
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3498
    image := imageEditView image.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3499
    oldSize := image extent.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3500
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3501
    box := EnterBox new.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3502
    box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):').
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3503
    box okText:(resources string:'OK').
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3504
    box abortText:(resources string:'Cancel').
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3505
    box initialText:1 printString.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3506
    box showAtPointer.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3507
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3508
    (box accepted 
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3509
    and: [(scale := Object readFromString:(box contents) onError:nil) notNil])
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3510
    ifTrue:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3511
        scale isNumber ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3512
            self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3513
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3514
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  3515
        newSize := oldSize * scale.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3516
        imageEditView magnifyImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3517
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3518
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3519
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  3520
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3521
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3522
doMagnifyUp
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3523
    "magnifies current image one step up"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3524
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3525
    |magHolder mag|
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3526
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3527
    magHolder := self valueOfMagnification.
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3528
    (mag := magHolder value) < 99 ifTrue: [
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3529
        magHolder value: mag + 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3530
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3531
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3532
    "Modified: / 26.7.1998 / 20:23:52 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3533
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3534
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3535
doNegativeImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3536
    "negates current image by negating the color map"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3537
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3538
    self image depth ~~ 1 ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3539
        Dialog warn:'Only useful for depth 1 images'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3540
        ^ self
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3541
    ].
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3542
    imageEditView negativeImage.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3543
    self listOfColors removeAll.
901
ce482227787d several undos
tz
parents: 900
diff changeset
  3544
    self findColorMapMode.     
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3545
    imageEditView undoImages removeLast
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3546
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3547
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3548
doResizeImage
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3549
    "resizes the current image"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3550
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3551
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3552
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3553
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3554
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3555
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3556
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3557
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3558
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3559
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3560
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3561
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3562
    and: [(newSize := Object readFromString:(box contents) onError:nil) notNil])
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3563
    ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3564
        imageEditView resizeImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3565
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3566
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3567
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3568
doRotateImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3569
    "rotates current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3570
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3571
    |box rotation|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3572
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3573
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3574
    box title:(resources string:'Rotate by (degrees, clockwise):').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3575
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3576
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3577
    box initialText: '0'.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3578
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3579
    (box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil])
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3580
    ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3581
        imageEditView rotateImageBy:rotation.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3582
        self updateInfoLabel.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3583
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3584
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3585
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3586
doShiftManual
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3587
    "let user specify amount and shift"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3588
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3589
    |bindings amount img firstChange shiftAction acceptChannel|
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3590
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3591
    acceptChannel := TriggerValue new.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3592
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3593
    firstChange := true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3594
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3595
    shiftAction := 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3596
        [:shiftH :shiftV | 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3597
            acceptChannel value:true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3598
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3599
            img := imageEditView image.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3600
            firstChange ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3601
                imageEditView makeUndo.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3602
                firstChange := false.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3603
            ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3604
            imageEditView shiftImageHorizontal:shiftH value vertical:shiftV value.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3605
            self updateInfoLabel
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3606
        ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3607
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3608
    bindings := IdentityDictionary new.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3609
    bindings at:#shiftAmount put:(amount := 1 asValue).
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3610
    bindings at:#acceptChannel put:acceptChannel.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3611
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3612
    bindings at:#shiftLeftNow   put:[ shiftAction value:(-1*amount value) value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3613
    bindings at:#shiftRightNow  put:[ shiftAction value:amount value value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3614
    bindings at:#shiftUpNow     put:[ shiftAction value:0 value:(-1*amount value) ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3615
    bindings at:#shiftDownNow   put:[ shiftAction value:0 value:amount value ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3616
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3617
    (self openDialogInterface:#shiftDialogSpec withBindings:bindings) 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3618
    ifFalse:[ 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3619
        firstChange ~~ true ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3620
          imageEditView undo
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3621
        ]
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3622
    ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3623
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3624
    "Created: / 7.9.1998 / 18:16:07 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3625
    "Modified: / 7.9.1998 / 18:20:42 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3626
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  3627
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3628
doUnCropManual
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3629
    "let user specify borders and add them"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3630
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3631
    |bindings left top right bottom img|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3632
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3633
    bindings := IdentityDictionary new.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3634
    bindings at:#left put:(left := 0 asValue).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3635
    bindings at:#right put:(right := 0 asValue).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3636
    bindings at:#top put:(top := 0 asValue).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3637
    bindings at:#bottom put:(bottom := 0 asValue).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3638
    (self openDialogInterface:#ungropDialogSpec withBindings:bindings)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3639
    ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3640
        left := left value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3641
        right := right value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3642
        top := top value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3643
        bottom := bottom value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3644
        img := imageEditView image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3645
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3646
        imageEditView
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3647
            makeBorderedImageX:left y:top 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3648
            width:(img width + left + right)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3649
            height:(img height + top + bottom).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3650
        self updateInfoLabel
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3651
    ].
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3652
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3653
    "Created: / 7.9.1998 / 18:16:07 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3654
    "Modified: / 7.9.1998 / 18:20:42 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3655
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3656
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3657
doUndo
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3658
    "reverses last edit action"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3659
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3660
    imageEditView undo.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3661
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3662
228524287573 intitial checkin
tz
parents:
diff changeset
  3663
!ImageEditor methodsFor:'user actions - loading'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3664
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3665
doLoadFromClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3666
    "opens a dialog for loading an image from class and a (resource-) selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3667
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  3668
    |img|
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  3669
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3670
    (imageEditView loadFromClass) notNil ifTrue:[
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3671
        imageSeqNr := nil.
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  3672
        (img := self image) notNil ifTrue: [
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  3673
            self listOfColors contents: img usedColors asSet asOrderedCollection.
574
8d82e8f101c1 undo disabling
tz
parents: 573
diff changeset
  3674
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3675
            self updateLabelsAndHistory.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3676
        ] ifFalse: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3677
            self updateForNoImage
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3678
        ].
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  3679
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3680
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3681
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3682
doLoadFromFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3683
    "opens a dialog for loading an image from a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3684
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3685
    |img file dir filters|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3686
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3687
    imageSeqNr := nil.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3688
    img := self image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3689
    img notNil ifTrue: [
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3690
        file := img fileName
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3691
    ] ifFalse:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3692
        dir := LastDirectory
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3693
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3694
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3695
    filters := FileSelectionBrowser loadImageFileNameFilters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3696
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3697
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3698
        file := FileSelectionBrowser
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3699
                    request:'Load Image From'
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3700
                    fileName:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3701
                    withFileFilters:filters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3702
    ] ifFalse:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3703
        file := FileSelectionBrowser
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3704
                    request:'Load Image From'
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3705
                    inDirectory:dir
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3706
                    withFileFilters:filters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3707
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3708
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3709
        LastDirectory := file asFilename directoryName.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3710
        self loadFromFile:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3711
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3712
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3713
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3714
doNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3715
    "opens a dialog with choices of size and color map for creating a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3716
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3717
    |aspects width height cMap imageClass image szString|
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3718
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3719
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3720
    aspects  := IdentityDictionary new
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3721
        at:#listOfSizes         put: self class listOfDefaultSizes asValue;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3722
        at:#listOfColorMaps     put: self class listOfColorMaps keys asSortedCollection asValue;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3723
        at:#selectionOfSize     put: self class listOfDefaultSizes first copy asValue;
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3724
        at:#selectionOfColorMap put: self class listOfColorMaps keys asSortedCollection first asValue;
228524287573 intitial checkin
tz
parents:
diff changeset
  3725
        yourself.
228524287573 intitial checkin
tz
parents:
diff changeset
  3726
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3727
    (self openDialogInterface:#dialogSpecForNewImage withBindings:aspects)
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3728
    ifTrue:[
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3729
        szString := (aspects at:#selectionOfSize) value.
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3730
        width  := 128 min: (Integer readFromString: (szString upTo: $x) onError:[24]).
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3731
        height := 128 min: (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[24]).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3732
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3733
        cMap       := (self class listOfColorMaps at: (colorMapMode value: (aspects at:#selectionOfColorMap) value) value).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3734
        imageClass := Image implementorForDepth: ((cMap size log: 2) asInteger).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3735
        image      := imageClass width: width height: height fromArray: (ByteArray new: width*height).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3736
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3737
        (colorMapMode value endsWith: 'mask')
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3738
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  3739
        [
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3740
            image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3741
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  3742
        image colorMap: cMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  3743
        image fillRectangleX:0 y:0 width:width height:height with:Color white.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3744
        (imageEditView image: image) notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3745
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  3746
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  3747
            self listOfColors contents: cMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  3748
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3749
            self updateLabelsAndHistory.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3750
        ]
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3751
    ]
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3752
!
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3753
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3754
grabScreenImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3755
    "let user choose an area and grab that are for editing"
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3756
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  3757
    Processor 
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  3758
        addTimedBlock:[
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  3759
            |image d8image img|
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3760
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3761
            imageSeqNr := nil.
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  3762
            image := Image fromUser.
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3763
            image isNil ifFalse:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3764
                image depth > 8 ifTrue:[
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  3765
                    Object errorSignal handle:[:ex | |sig|
1537
e86a686eeba2 class based exceptions - no longer need to send #haltSígnal
Claus Gittinger <cg@exept.de>
parents: 1507
diff changeset
  3766
                        (sig := ex signal) == HaltInterrupt ifTrue:[ex reject].
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  3767
                        sig == Signal noHandlerSignal ifTrue:[ex reject].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3768
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3769
                        self warn:'Could not convert to depth8 image (too many colors)'.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3770
                        d8image := nil.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3771
                    ] do:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3772
                        d8image := Depth8Image new.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3773
                        d8image fromImage:image.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3774
                    ].
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3775
                    d8image notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3776
                        image := d8image
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3777
                    ]
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  3778
                ].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3779
                (imageEditView image:image) notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3780
                    self listOfColors contents:(image colorMap).
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3781
                    self findColorMapMode.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3782
                    self updateLabelsAndHistory.
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  3783
                ]
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3784
             ] 
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3785
        ] 
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  3786
        afterSeconds:1
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3787
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  3788
    "Created: / 29.7.1998 / 21:24:42 / cg"
1537
e86a686eeba2 class based exceptions - no longer need to send #haltSígnal
Claus Gittinger <cg@exept.de>
parents: 1507
diff changeset
  3789
    "Modified: / 16.11.2001 / 16:21:19 / cg"
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3790
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3791
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3792
nextImageInSequence
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3793
    "display the next image in the image sequence"
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3794
    |img seq frame listOfColors|
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3795
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3796
    imageEditView releaseUndos.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3797
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3798
    seq := self image imageSequence.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3799
    imageSeqNr isNil ifTrue:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3800
        imageSeqNr := 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3801
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3802
    imageSeqNr := imageSeqNr + 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3803
    imageSeqNr > seq size ifTrue:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3804
        self information:'Back to first image in sequence'.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3805
        imageSeqNr := 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3806
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3807
    frame := seq at:imageSeqNr.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3808
    imageEditView image:(frame image).
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3809
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3810
    (img := self image) notNil ifTrue:[          
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3811
        listOfColors := self listOfColors.
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3812
        img colorMap notNil ifTrue:[
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3813
            listOfColors contents:(img usedColors asSet asOrderedCollection).
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3814
        ] ifFalse:[
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  3815
            listOfColors removeAll.
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3816
        ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3817
        self findColorMapMode.     
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3818
        self updateLabelsAndHistory.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3819
        img := img onDevice:device.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3820
        imageEditView image:img.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3821
    ] ifFalse:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3822
        self updateForNoImage
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3823
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3824
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3825
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3826
228524287573 intitial checkin
tz
parents:
diff changeset
  3827
!ImageEditor methodsFor:'user actions - saving'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3828
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3829
doPrint
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3830
    "prints current image on the current printer"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3831
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3832
    imageEditView print
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3833
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3834
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  3835
doSaveButtonImageToFileAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  3836
    "opens a dialog for saving current image to a file"
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  3837
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  3838
    imageEditView saveButtonImageToFileAs.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  3839
    self updateLabelsAndHistory.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  3840
!
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  3841
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3842
doSaveImageFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3843
    "saves current image to current file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3844
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  3845
    imageEditView save.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3846
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3847
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3848
doSaveImageFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3849
    "opens a dialog for saving current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3850
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3851
    imageEditView saveImageFileAs.
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  3852
    self updateLabelsAndHistory.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3853
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3854
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3855
doSaveImageMaskFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3856
    "opens a dialog for saving mask of current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3857
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  3858
    imageEditView saveImageMaskFileAs.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3859
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3860
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3861
doSaveMethod
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3862
    "saves current image on current class and selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3863
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3864
    imageEditView saveMethod notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3865
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  3866
    [
694
88c7004cfb6c updateLabelsAndHistory
tz
parents: 688
diff changeset
  3867
        self updateLabelsAndHistory
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3868
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  3869
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3870
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3871
doSaveMethodAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3872
    "opens a dialog for saving current image on a class and a selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3873
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3874
    imageEditView saveMethodAs notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3875
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  3876
    [
694
88c7004cfb6c updateLabelsAndHistory
tz
parents: 688
diff changeset
  3877
        self updateLabelsAndHistory
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3878
    ]
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3879
!
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3880
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3881
doShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3882
    "opens a dialog showing the storeString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3883
     (sometimes useful to embed an image into source code)"
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3884
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3885
    |img|
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3886
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3887
    img := imageEditView image.
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  3888
    TextBox openOn:img storeString
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3889
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3890
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3891
!ImageEditor methodsFor:'user actions - settings'!
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3892
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3893
doChangeGridMagnification
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3894
    "change grid magnification"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3895
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3896
    |box oldGridLimit newGridLimit|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3897
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3898
    oldGridLimit := imageEditView class gridMagnificationLimit asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3899
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3900
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3901
    box title:(resources string:'Grid Magnification Limit:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3902
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3903
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3904
    box initialText:(oldGridLimit x printString).
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3905
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3906
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3907
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3908
    and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3909
    ) ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3910
        newGridLimit := (99 min: (2 max:newGridLimit)) asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3911
        imageEditView class gridMagnificationLimit:newGridLimit.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3912
        imageEditView invalidate
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3913
    ]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3914
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3915
! !
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  3916
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3917
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3918
228524287573 intitial checkin
tz
parents:
diff changeset
  3919
version
228524287573 intitial checkin
tz
parents:
diff changeset
  3920
    ^ '$Header$'
228524287573 intitial checkin
tz
parents:
diff changeset
  3921
! !