ImageEditor.st
author werner
Fri, 02 Apr 2004 15:57:02 +0200
changeset 1822 75b0cdc3fa84
parent 1820 3d834d5e5bb4
child 1842 f04fe34d10ac
permissions -rw-r--r--
min/max
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
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
    17
		selectedColorIndex postOpenAction imageSeqNr drawingColormap'
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
    18
	classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
    19
		DefaultRelativeSizes'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    20
	poolDictionaries:''
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    21
	category:'Interface-UIPainter'
400
228524287573 intitial checkin
tz
parents:
diff changeset
    22
!
228524287573 intitial checkin
tz
parents:
diff changeset
    23
228524287573 intitial checkin
tz
parents:
diff changeset
    24
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    25
228524287573 intitial checkin
tz
parents:
diff changeset
    26
copyright
228524287573 intitial checkin
tz
parents:
diff changeset
    27
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    28
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    29
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
    30
228524287573 intitial checkin
tz
parents:
diff changeset
    31
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
    32
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    33
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    34
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    35
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    36
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    37
"
228524287573 intitial checkin
tz
parents:
diff changeset
    38
!
228524287573 intitial checkin
tz
parents:
diff changeset
    39
228524287573 intitial checkin
tz
parents:
diff changeset
    40
documentation
228524287573 intitial checkin
tz
parents:
diff changeset
    41
"
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
    42
    Image Editor allows you to create, design, modify or just inspect images.
400
228524287573 intitial checkin
tz
parents:
diff changeset
    43
228524287573 intitial checkin
tz
parents:
diff changeset
    44
    [start with:]
228524287573 intitial checkin
tz
parents:
diff changeset
    45
        ImageEditor open
941
6d75430a8120 fixed start call in docu
tz
parents: 937
diff changeset
    46
        ImageEditor openOnClass:Icon andSelector:#startIcon
400
228524287573 intitial checkin
tz
parents:
diff changeset
    47
228524287573 intitial checkin
tz
parents:
diff changeset
    48
    [see also:]
228524287573 intitial checkin
tz
parents:
diff changeset
    49
        ImageEditView Image
228524287573 intitial checkin
tz
parents:
diff changeset
    50
228524287573 intitial checkin
tz
parents:
diff changeset
    51
    [author:]
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
    52
        Thomas Zwick, eXept Software AG
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
    53
        Claus Gittinger, eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    54
"
228524287573 intitial checkin
tz
parents:
diff changeset
    55
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    56
228524287573 intitial checkin
tz
parents:
diff changeset
    57
!ImageEditor class methodsFor:'instance creation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    58
228524287573 intitial checkin
tz
parents:
diff changeset
    59
openModalOnClass: aClass andSelector: aSelector
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    60
    "opens modal a Image Editor on aClass and aSelector"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    61
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    62
     self openModalOnClass: self andSelector: #leftMouseKeyIcon
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    63
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    64
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    65
    |imageEditor imageEditView className resourceClassName resourceSelector| 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    66
400
228524287573 intitial checkin
tz
parents:
diff changeset
    67
    imageEditor := self new.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    68
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    69
    aClass isClass  ifTrue: [className := aClass name].
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    70
    aClass isString ifTrue: [className := aClass].      
903
63203d996e61 openModal bug fixed
tz
parents: 901
diff changeset
    71
    aClass isNil    ifTrue: [className := ''].      
400
228524287573 intitial checkin
tz
parents:
diff changeset
    72
688
788fe83ab3c0 time clock removed
tz
parents: 679
diff changeset
    73
    imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector].
400
228524287573 intitial checkin
tz
parents:
diff changeset
    74
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
    75
688
788fe83ab3c0 time clock removed
tz
parents: 679
diff changeset
    76
    resourceClassName := imageEditView resourceClass.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    77
    resourceSelector  := imageEditView resourceSelector.
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    78
815
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    79
    ((className asString ~= resourceClassName) 
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    80
    or:[aSelector asString ~= resourceSelector])
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    81
        ifTrue: [^resourceClassName, ' ', resourceSelector]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    82
        ifFalse:[^nil]
400
228524287573 intitial checkin
tz
parents:
diff changeset
    83
!
228524287573 intitial checkin
tz
parents:
diff changeset
    84
228524287573 intitial checkin
tz
parents:
diff changeset
    85
openOnClass: aClass andSelector: aSelector
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    86
    "opens a Image Editor on aClass and aSelector"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    87
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    88
     self openOnClass: self andSelector: #leftMouseKeyIcon
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    89
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    90
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    91
    |editor|
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    92
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    93
    editor := self new.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    94
    editor allButOpen.
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    95
    aSelector notNil ifTrue:[
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    96
        editor loadFromMessage: aClass name, ' ', aSelector.
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    97
    ] ifFalse:[
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    98
        editor resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
    99
    ].
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   100
    editor openWindow
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   101
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   102
    "Modified: / 16.3.1999 / 21:33:49 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   103
!
228524287573 intitial checkin
tz
parents:
diff changeset
   104
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   105
openOnFile: aFileName
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
   106
    "opens a Image Editor on aFileName"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   107
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   108
     self openOnFile: 'bitmaps/SmalltalkX.xbm'
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   109
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
   110
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   111
    |editor|
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   112
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   113
    editor := self new.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   114
    editor allButOpen.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   115
    editor loadFromFile: aFileName.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   116
    editor openWindow
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   117
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   118
    "Modified: / 16.3.1999 / 21:33:25 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   119
!
228524287573 intitial checkin
tz
parents:
diff changeset
   120
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   121
openOnImage: anImage
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
   122
    "opens a Image Editor on anImage"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   123
    "
895
69269bc88320 checkin from browser
tz
parents: 880
diff changeset
   124
     self openOnImage: Icon startIcon
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   125
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
   126
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   127
    |editor|
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   128
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   129
    editor := self new.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   130
    editor allButOpen.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   131
    editor loadFromImage: anImage.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   132
    editor openWindow
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   133
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   134
    "Modified: / 11.3.1999 / 16:18:33 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   135
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   136
228524287573 intitial checkin
tz
parents:
diff changeset
   137
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
   138
228524287573 intitial checkin
tz
parents:
diff changeset
   139
listOfColorMaps
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   140
    "returns the list of default color maps for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   141
228524287573 intitial checkin
tz
parents:
diff changeset
   142
    |colorMap|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   143
400
228524287573 intitial checkin
tz
parents:
diff changeset
   144
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   145
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   146
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   147
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   148
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   149
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   150
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   151
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   152
        add: Color magenta;
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   153
        add: (Color redByte: 127 greenByte:   0 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   154
        add: (Color redByte:   0 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   155
        add: (Color redByte:   0 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   156
        add: (Color redByte:   0 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   157
        add: (Color redByte: 127 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   158
        add: (Color redByte: 127 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   159
        add: (Color redByte: 127 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   160
        add: (Color redByte: 170 greenByte: 170 blueByte: 170).
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   161
400
228524287573 intitial checkin
tz
parents:
diff changeset
   162
    0 to: 5 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   163
    [:r|                                                    
228524287573 intitial checkin
tz
parents:
diff changeset
   164
        0 to: 5 do:         
228524287573 intitial checkin
tz
parents:
diff changeset
   165
        [:g|
228524287573 intitial checkin
tz
parents:
diff changeset
   166
            0 to: 5 do:                             
228524287573 intitial checkin
tz
parents:
diff changeset
   167
            [:b|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   168
                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
   169
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   170
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   171
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   172
228524287573 intitial checkin
tz
parents:
diff changeset
   173
    1 to: 25 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   174
    [:g|                             
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   175
        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
   176
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   177
228524287573 intitial checkin
tz
parents:
diff changeset
   178
    ^Dictionary new
228524287573 intitial checkin
tz
parents:
diff changeset
   179
        at: '8-plane' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   180
        at: '8-plane + mask' put: colorMap;
228524287573 intitial checkin
tz
parents:
diff changeset
   181
        at: '4-plane' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   182
        at: '4-plane + mask' put: (colorMap copyFrom: 1 to: 16);
228524287573 intitial checkin
tz
parents:
diff changeset
   183
        at: '2-plane' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   184
        at: '2-plane + mask' put: (colorMap copyFrom: 1 to: 4);
228524287573 intitial checkin
tz
parents:
diff changeset
   185
        at: '1-plane' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   186
        at: '1-plane + mask' put: (colorMap copyFrom: 1 to: 2);
228524287573 intitial checkin
tz
parents:
diff changeset
   187
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   188
!
228524287573 intitial checkin
tz
parents:
diff changeset
   189
228524287573 intitial checkin
tz
parents:
diff changeset
   190
listOfDefaultSizes
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   191
    "returns the list of default sizes for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   192
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   193
    ^#('8x8' '16x16' '22x22' '32x32' '48x48' '64x64')
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   194
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   195
    "Modified: / 31.7.1998 / 01:57:34 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   196
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   197
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   198
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   199
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   200
flyByHelpSpec
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   201
    <resource: #help>
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
    ^super flyByHelpSpec addPairsFrom:#(
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   204
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   205
#drawModeBox
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   206
'Rectangle'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   207
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   208
#drawModeCopy
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   209
'Copy'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   210
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   211
#drawModeFill
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   212
'Flood-Fill'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   213
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   214
#drawModeFilledBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   215
'Filled Rectangle'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   216
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   217
#drawModePaste
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   218
'Paste'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   219
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   220
#drawModePasteUnder
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   221
'Paste Under'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   222
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   223
#drawModePasteWithMask
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
   224
'Paste with Mask'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   225
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   226
#drawModePoint
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   227
'Point'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   228
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   229
#drawModeSpecial
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   230
'Special Operations'
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   231
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   232
#fileGrabImage
1748
a62052c6ee71 toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents: 1741
diff changeset
   233
'Pick from Screen'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   234
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   235
#fileLoadFromClass
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   236
'Load from Method'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   237
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   238
#fileLoadFromFile
1748
a62052c6ee71 toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents: 1741
diff changeset
   239
'Load from File'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   240
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   241
#fileNewImage
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   242
'New Image'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   243
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   244
#filePrint
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   245
'Print'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   246
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   247
#fileSaveAs
1748
a62052c6ee71 toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents: 1741
diff changeset
   248
'Save to File'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   249
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   250
#fileSaveMaskAs
1748
a62052c6ee71 toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents: 1741
diff changeset
   251
'Save to File'
1545
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
#fileSaveMethod
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   254
'Save as Method'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   255
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   256
#fileSaveMethodAs
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   257
'Save as Method'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   258
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   259
)
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   260
!
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   261
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   262
helpSpec
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   263
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   264
     by the UIHelpTool of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   265
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   266
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   267
     the UIHelpTool may not be able to read the specification."
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   268
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   269
    "
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   270
     UIHelpTool openOnClass:ImageEditor    
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   271
    "
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   272
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   273
    <resource: #help>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   274
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   275
    ^super helpSpec addPairsFrom:#(
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   276
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   277
#colorMap
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   278
'ColorMap functions.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   279
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   280
#colorMap1
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   281
'Convert to depth-1 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   282
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   283
#colorMap1M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   284
'Convert to depth-1 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   285
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   286
#colorMap2
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   287
'Convert to depth-2 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   288
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   289
#colorMap2M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   290
'Convert to depth-2 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   291
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   292
#colorMap4
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   293
'Convert to depth-4 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   294
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   295
#colorMap4M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   296
'Convert to depth-4 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   297
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   298
#colorMap8
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   299
'Convert to depth-8 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   300
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   301
#colorMap8M
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   302
'Convert to depth-8 image plus mask.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   303
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   304
#colorMapTable
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   305
'Shows a list of used colors of the image.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   306
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   307
#compressColormap
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   308
'Remove unneeded entries from the colorMap.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   309
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   310
#cropAll
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   311
'Find and remove all borders.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   312
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   313
#cropBottom
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   314
'Find and remove bottom border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   315
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   316
#cropLeft
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   317
'Find and remove left border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   318
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   319
#cropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   320
'Specify border(s) to remove.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   321
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   322
#cropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   323
'Find and remove right border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   324
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   325
#cropTop
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   326
'Find and remove top border.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   327
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   328
#drawModeBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   329
'Rectangle Drawing Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   330
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   331
#drawModeCopy
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   332
'Area Copy Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   333
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   334
#drawModeFill
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   335
'Flood Fill Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   336
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   337
#drawModeFilledBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   338
'Filled Rectangle Drawing Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   339
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   340
#drawModePaste
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   341
'Paste Mode.'
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   342
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   343
#drawModePasteUnder
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   344
'Paste-Under Mode.'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   345
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   346
#drawModePasteWithMask
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   347
'Paste-with-Mask Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   348
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   349
#drawModePoint
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   350
'Point Drawing Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   351
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   352
#drawModeSpecial
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   353
'Special Operations'
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   354
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   355
#editFlipHorizontal
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   356
'Flip the image horizontally.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   357
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   358
#editFlipVertical
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   359
'Flip the image vertically.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   360
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   361
#editMagnifyImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   362
'Magnify the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   363
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   364
#editNegate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   365
'Invert the images colors.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   366
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   367
#editResize
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   368
'Resize the image (preserving the old image).'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   369
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   370
#editRotate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   371
'Rotate the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   372
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   373
#fileGrabImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   374
'Pick an image from the screen.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   375
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   376
#fileLoadFromClass
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   377
'Select and load an image from a resource method.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   378
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   379
#fileLoadFromFile
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   380
'Select and load an image from a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   381
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   382
#fileNewImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   383
'Create a new image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   384
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   385
#filePrint
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   386
'Print the image on a postscript printer.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   387
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   388
#fileSaveAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   389
'Save the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   390
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   391
#fileSaveMaskAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   392
'Save the mask of the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   393
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   394
#fileSaveButtonImageAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   395
'Save an image of a button with the image to a file (for html use).'
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   396
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   397
#fileSaveMethod
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   398
'Save the image as resource method in the current class and selector.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   399
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   400
#fileSaveMethodAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   401
'Save the image as resource method in a class.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   402
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   403
#magnificationNumber
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   404
'Shows the current magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   405
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   406
#magnifyImageDown
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   407
'Decrease magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   408
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   409
#magnifyImageUp
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   410
'Increase magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   411
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   412
#mouseKeyColorMode
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   413
'Toggle between left and right mouse button color.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   414
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   415
#previewView
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   416
'Shows a preview of the image.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   417
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   418
#settingsGridMagnification
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   419
'Change the grid magnification of the edit view.'
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   420
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   421
)
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   422
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   423
    "Modified: / 7.9.1998 / 18:20:26 / cg"
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   424
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   425
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   426
!ImageEditor class methodsFor:'image specs'!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   427
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   428
copyIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   429
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   430
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   431
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   432
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   433
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   434
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   435
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   436
     self copyIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   437
     ImageEditor openOnClass:self andSelector:#copyIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   438
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   439
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   440
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   441
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   442
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   443
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   444
        constantNamed:#'ImageEditor class copyIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   445
        ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@** @@J)UUTB*Z*)@*&**PJ)**$B*Z*)@*&**PJ)**$@@Z*)@@F**P@AUUT@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O>@??3??O?<??3??O?<??3??@_<A?0@@@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   446
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   447
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   448
fillIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   449
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   450
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   451
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   452
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   453
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   454
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   455
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   456
     self fillIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   457
     ImageEditor openOnClass:self andSelector:#fillIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   458
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   459
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   460
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   461
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   462
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   463
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   464
        constantNamed:#'ImageEditor class fillIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   465
        ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@ @@@@*H@@D*(@@DUUP@EAUU@AAEU@@@@U@@DDA@@@@@@@@PP@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C @Q@BN@I<@?8C?0[?!!G<@O P\@@ D@@@@@@@@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   466
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   467
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   468
fillRectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   469
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   470
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   471
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   472
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   473
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   474
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   475
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   476
     self fillRectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   477
     ImageEditor openOnClass:self andSelector:#fillRectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   478
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   479
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   480
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   481
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   482
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   483
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   484
        constantNamed:#'ImageEditor class fillRectIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   485
        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   486
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   487
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   488
leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   489
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   490
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   491
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   492
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   493
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   494
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   495
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
   496
     self leftMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   497
     ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   498
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   499
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   500
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   501
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   502
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   503
        constantNamed:#'ImageEditor leftMouseKeyIcon'
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   504
        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
   505
!
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   506
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   507
pasteIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   508
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   509
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   510
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   511
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   512
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   513
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   514
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   515
     self pasteIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   516
     ImageEditor openOnClass:self andSelector:#pasteIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   517
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   518
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   519
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   520
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   521
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   522
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   523
        constantNamed:#'ImageEditor class pasteIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   524
        ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y&
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   525
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   526
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   527
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   528
pasteUnderIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   529
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   530
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   531
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   532
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   533
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   534
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   535
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   536
     self pasteUnderIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   537
     ImageEditor openOnClass:self andSelector:#pasteUnderIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   538
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   539
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   540
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   541
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   542
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   543
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   544
        constantNamed:#'ImageEditor class pasteUnderIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   545
        ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y&
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   546
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   547
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   548
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   549
pasteWithMaskIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   550
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   551
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   552
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   553
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   554
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   555
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   556
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   557
     self pasteWithMaskIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   558
     ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   559
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   560
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   561
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   562
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   563
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   564
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   565
        constantNamed:#'ImageEditor class pasteWithMaskIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   566
        ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L3A&@@D3LCL0A @AL3@3LFX@@QDPY&Y&
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   567
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   568
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   569
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   570
pointIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   571
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   572
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   573
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   574
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   575
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   576
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   577
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   578
     self pointIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   579
     ImageEditor openOnClass:self andSelector:#pointIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   580
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   581
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   582
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   583
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   584
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   585
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   586
        constantNamed:#'ImageEditor class pointIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   587
        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@B@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8@G@@X@B@@@@@@@@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   588
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   589
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   590
rectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   591
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   592
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   593
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   594
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   595
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   596
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   597
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   598
     self rectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   599
     ImageEditor openOnClass:self andSelector:#rectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   600
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   601
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   602
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   603
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   604
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   605
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   606
        constantNamed:#'ImageEditor class rectIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   607
        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0HA@ DB@PHA@ DB@PHA@ DC?0@@@@@@@a') ; yourself); yourself]
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   608
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   609
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   610
rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   611
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   612
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   613
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   614
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   615
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   616
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   617
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
   618
     self rightMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   619
     ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   620
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   621
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   622
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   623
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   624
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   625
        constantNamed:#'ImageEditor rightMouseKeyIcon'
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   626
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   627
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   628
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   629
specialIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   630
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   631
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   632
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   633
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   634
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   635
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   636
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   637
     self specialIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   638
     ImageEditor openOnClass:self andSelector:#specialIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   639
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   640
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   641
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   642
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   643
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   644
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   645
        constantNamed:#'ImageEditor class specialIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   646
        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@@B@@@@@0@@@@@@@@@@@@@@@P@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@L@@0@G @^@A8@G @L@@0@@@@L@@0@@@@@a') ; yourself); yourself]
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   647
! !
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   648
400
228524287573 intitial checkin
tz
parents:
diff changeset
   649
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
   650
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   651
changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   652
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   653
     by the UIPainter of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   654
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   655
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   656
     the UIPainter may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   657
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   658
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   659
     UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   660
     ImageEditor new openInterface:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   661
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   662
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   663
    <resource: #canvas>
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   664
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   665
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   666
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   667
        name: changeHLSDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   668
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   669
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   670
          label: 'HLS Edit Dialog'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   671
          name: 'HLS Edit Dialog'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   672
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   673
          bounds: (Rectangle 14 46 326 229)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   674
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   675
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   676
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   677
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   678
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   679
              label: 'Hue-Shift:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   680
              name: 'HueLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   681
              layout: (LayoutFrame 20 0 21 0 120 0 43 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   682
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   683
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   684
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   685
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   686
              name: 'HueShiftEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   687
              layout: (LayoutFrame 123 0 21 0 166 0 43 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   688
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   689
              model: hueShiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   690
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   691
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   692
              maxValue: 360
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   693
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   694
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   695
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   696
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   697
              name: 'HueWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   698
              layout: (LayoutFrame 180 0 22 0 297 0 42 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   699
              model: hueShiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   700
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   701
              step: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   702
              endlessRotation: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   703
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   704
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   705
              label: 'Light Factor:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   706
              name: 'LightLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   707
              layout: (LayoutFrame 18 0 50 0 120 0 72 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   708
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   709
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   710
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   711
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   712
              name: 'LightEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   713
              layout: (LayoutFrame 123 0 50 0 166 0 72 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   714
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   715
              model: lightAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   716
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   717
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   718
              maxValue: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   719
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   720
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   721
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   722
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   723
              name: 'LightWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   724
              layout: (LayoutFrame 180 0 51 0 297 0 71 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   725
              model: lightAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   726
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   727
              stop: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   728
              step: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   729
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   730
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   731
              label: 'Saturation Factor:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   732
              name: 'SaturationLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   733
              layout: (LayoutFrame 9 0 79 0 120 0 101 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   734
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   735
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   736
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   737
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   738
              name: 'SaturationEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   739
              layout: (LayoutFrame 123 0 79 0 166 0 101 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   740
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   741
              model: saturationAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   742
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   743
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   744
              maxValue: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   745
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   746
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   747
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   748
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   749
              name: 'SaturationWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   750
              layout: (LayoutFrame 180 0 80 0 297 0 100 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   751
              model: saturationAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   752
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   753
              stop: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   754
              step: 1
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   755
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   756
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   757
              name: 'HueColorLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   758
              layout: (LayoutFrame 10 0.0 109 0 -10 1.0 148 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   759
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   760
              backgroundChannel: hlsColor
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   761
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   762
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   763
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   764
              layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   765
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   766
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   767
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   768
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   769
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   770
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   771
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   772
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   773
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   774
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   775
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   776
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   777
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   778
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   779
                    extent: (Point 151 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   780
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   781
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   782
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   783
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   784
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   785
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   786
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   787
                    extent: (Point 152 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   788
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   789
                 )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   790
               
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   791
              )
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   792
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   793
           )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   794
         
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   795
        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   796
      )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   797
!
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   798
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   799
cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   800
    "This resource specification was automatically generated
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   801
     by the UIPainter of ST/X."
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   802
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   803
    "Do not manually edit this!! If it is corrupted,
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   804
     the UIPainter may not be able to read the specification."
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   805
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   806
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   807
     UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   808
     ImageEditor new openInterface:#cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   809
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   810
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   811
    <resource: #canvas>
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   812
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   813
    ^ 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   814
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   815
        name: cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   816
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   817
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   818
          label: 'Crop Border(s)'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   819
          name: 'Crop Border(s)'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   820
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   821
          bounds: (Rectangle 14 46 259 229)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   822
        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   823
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   824
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   825
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   826
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   827
              label: 'Left:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   828
              name: 'GropLeftLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   829
              layout: (LayoutFrame 14 0 21 0 90 0 43 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   830
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   831
              adjust: right
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   832
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   833
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   834
              name: 'GropLeftEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   835
              layout: (LayoutFrame 95 0 21 0 132 0 43 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   836
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   837
              model: left
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   838
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   839
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   840
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   841
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   842
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   843
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   844
              name: 'GropLeftNowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   845
              layout: (LayoutFrame 148 0 21 0 221 0 43 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   846
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   847
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   848
              model: gropLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   849
              autoRepeat: true
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   850
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   851
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   852
              label: 'Right:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   853
              name: 'GropRightLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   854
              layout: (LayoutFrame 14 0 51 0 90 0 73 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   855
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   856
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   857
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   858
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   859
              name: 'GropRightEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   860
              layout: (LayoutFrame 95 0 51 0 132 0 73 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   861
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   862
              model: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   863
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   864
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   865
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   866
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   867
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   868
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   869
              name: 'GropRightButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   870
              layout: (LayoutFrame 148 0 51 0 221 0 73 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   871
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   872
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   873
              model: gropRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   874
              autoRepeat: true
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   875
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   876
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   877
              label: 'Top:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   878
              name: 'GropTopLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   879
              layout: (LayoutFrame 14 0 81 0 90 0 103 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   880
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   881
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   882
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   883
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   884
              name: 'GropTopEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   885
              layout: (LayoutFrame 95 0 81 0 132 0 103 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   886
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   887
              model: top
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   888
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   889
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   890
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   891
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   892
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   893
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   894
              name: 'GropTopButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   895
              layout: (LayoutFrame 148 0 81 0 221 0 103 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   896
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   897
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   898
              model: gropTopNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   899
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   900
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   901
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   902
              label: 'Bottom:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   903
              name: 'GropBottomLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   904
              layout: (LayoutFrame 14 0 111 0 90 0 133 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   905
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   906
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   907
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   908
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   909
              name: 'GropBottomEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   910
              layout: (LayoutFrame 95 0 111 0 132 0 133 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   911
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   912
              model: bottom
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   913
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   914
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   915
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   916
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   917
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   918
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   919
              name: 'GropBottomButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   920
              layout: (LayoutFrame 148 0 111 0 221 0 133 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   921
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   922
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   923
              model: gropBottomNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   924
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   925
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   926
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   927
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   928
              layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   929
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   930
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   931
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   932
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   933
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   934
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   935
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   936
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   937
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   938
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   939
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   940
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   941
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   942
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   943
                    extent: (Point 77 22)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   944
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   945
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   946
                    label: 'Apply'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   947
                    name: 'Button3'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   948
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   949
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   950
                    model: applyAction
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   951
                    extent: (Point 78 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   952
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   953
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   954
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   955
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   956
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   957
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   958
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   959
                    extent: (Point 78 22)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   960
                  )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   961
                 )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   962
               
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   963
              )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   964
            )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   965
           )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   966
         
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   967
        )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   968
      )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   969
!
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   970
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   971
dialogSpecForNewImage
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   972
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   973
     by the UIPainter of ST/X."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   974
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   975
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   976
     the UIPainter may not be able to read the specification."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   977
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   978
    "
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   979
     UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   980
     ImageEditor new openInterface:#dialogSpecForNewImage
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   981
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   982
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   983
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   984
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   985
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   986
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   987
        name: dialogSpecForNewImage
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   988
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   989
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   990
          label: 'New Image'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   991
          name: 'New Image'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   992
          min: (Point 10 10)
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
   993
          bounds: (Rectangle 0 0 301 119)
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
   994
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   995
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   996
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   997
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   998
           (ViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   999
              name: 'View'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1000
              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -35 1.0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1001
              level: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1002
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1003
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1004
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1005
                 (FramedBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1006
                    label: 'Size'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1007
                    name: 'framedBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1008
                    layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0)
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1009
                    style: (FontDescription helvetica medium roman 12)
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1010
                    labelPosition: topLeft
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1011
                    translateLabel: true
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1012
                    component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1013
                   (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1014
                      collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1015
                       (ComboBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1016
                          name: 'defaultSizesComboBox'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1017
                          layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1018
                          model: selectionOfSize
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1019
                          type: string
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1020
                          acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1021
                          comboList: listOfDefaultSizes
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1022
                          isFilenameBox: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1023
                        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1024
                       )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1025
                     
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1026
                    )
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  1027
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1028
                 (FramedBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1029
                    label: 'Color Map'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1030
                    name: 'framedBox2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1031
                    layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0)
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1032
                    style: (FontDescription helvetica medium roman 12)
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1033
                    labelPosition: topLeft
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1034
                    translateLabel: true
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1035
                    component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1036
                   (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1037
                      collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1038
                       (ComboListSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1039
                          name: 'colorMapComboBox'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1040
                          layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1041
                          model: selectionOfColorMap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1042
                          comboList: listOfColorMaps
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1043
                          useIndex: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1044
                        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1045
                       )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1046
                     
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1047
                    )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1048
                  )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1049
                 )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1050
               
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1051
              )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1052
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1053
           (UISubSpecification
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1054
              name: 'windowSpecForCommitWithoutChannels'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1055
              layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1056
              minorKey: windowSpecForCommitWithoutChannels
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1057
            )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1058
           )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1059
         
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1060
        )
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1061
      )
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1062
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1063
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1064
shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1065
    "This resource specification was automatically generated
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1066
     by the UIPainter of ST/X."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1067
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1068
    "Do not manually edit this!! If it is corrupted,
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1069
     the UIPainter may not be able to read the specification."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1070
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1071
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1072
     UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1073
     ImageEditor new openInterface:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1074
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1075
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1076
    <resource: #canvas>
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1077
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1078
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1079
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1080
        name: shiftDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1081
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1082
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1083
          label: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1084
          name: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1085
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1086
          bounds: (Rectangle 14 46 259 229)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1087
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1088
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1089
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1090
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1091
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1092
              label: 'Amount:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1093
              name: 'AmountLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1094
              layout: (LayoutFrame 14 0 21 0 90 0 43 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1095
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1096
              adjust: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1097
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1098
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1099
              name: 'AmountEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1100
              layout: (LayoutFrame 95 0 21 0 139 0 43 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1101
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1102
              model: shiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1103
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1104
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1105
              acceptOnPointerLeave: false
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1106
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1107
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1108
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1109
              layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1110
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1111
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1112
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1113
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1114
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1115
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1116
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1117
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1118
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1119
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1120
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1121
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1122
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1123
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1124
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1125
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1126
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1127
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1128
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1129
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1130
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1131
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1132
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1133
                  )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1134
                 )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1135
               
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1136
              )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1137
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1138
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1139
              name: 'upArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1140
              layout: (LayoutFrame 105 0 63 0 127 0 85 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1141
              model: shiftUpNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1142
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1143
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1144
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1145
              direction: up
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1146
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1147
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1148
              name: 'leftArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1149
              layout: (LayoutFrame 84 0 86 0 106 0 108 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1150
              model: shiftLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1151
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1152
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1153
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1154
              direction: left
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1155
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1156
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1157
              name: 'rightArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1158
              layout: (LayoutFrame 126 0 86 0 148 0 108 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1159
              model: shiftRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1160
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1161
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1162
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1163
              direction: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1164
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1165
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1166
              name: 'downArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1167
              layout: (LayoutFrame 105 0 107 0 127 0 129 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1168
              model: shiftDownNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1169
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1170
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1171
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1172
              direction: down
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1173
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1174
           (CheckBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1175
              label: 'Wrap'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1176
              name: 'CheckBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1177
              layout: (LayoutFrame 153 0 22 0 289 0 44 0)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1178
              model: wrap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1179
              translateLabel: true
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1180
            )
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1181
           )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1182
         
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1183
        )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1184
      )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1185
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1186
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1187
uncropDialogSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1188
    "This resource specification was automatically generated
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1189
     by the UIPainter of ST/X."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1190
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1191
    "Do not manually edit this!! If it is corrupted,
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1192
     the UIPainter may not be able to read the specification."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1193
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1194
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1195
     UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1196
     ImageEditor new openInterface:#uncropDialogSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1197
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1198
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1199
    <resource: #canvas>
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1200
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1201
    ^ 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1202
     #(FullSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1203
        name: uncropDialogSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1204
        window: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1205
       (WindowSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1206
          label: 'Add Border(s)'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1207
          name: 'Add Border(s)'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1208
          min: (Point 10 10)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1209
          max: (Point 800 478)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1210
          bounds: (Rectangle 0 0 261 228)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1211
        )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1212
        component: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1213
       (SpecCollection
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1214
          collection: (
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1215
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1216
              label: 'Left:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1217
              name: 'Label1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1218
              layout: (LayoutFrame 14 0 21 0 90 0 43 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1219
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1220
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1221
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1222
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1223
              name: 'EntryField1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1224
              layout: (LayoutFrame 95 0 21 0 132 0 43 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1225
              model: left
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1226
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1227
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1228
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1229
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1230
              label: 'Right:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1231
              name: 'Label2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1232
              layout: (LayoutFrame 14 0 51 0 90 0 73 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1233
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1234
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1235
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1236
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1237
              name: 'EntryField2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1238
              layout: (LayoutFrame 95 0 51 0 132 0 73 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1239
              model: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1240
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1241
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1242
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1243
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1244
              label: 'Top:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1245
              name: 'Label3'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1246
              layout: (LayoutFrame 14 0 81 0 90 0 103 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1247
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1248
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1249
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1250
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1251
              name: 'EntryField3'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1252
              layout: (LayoutFrame 95 0 81 0 132 0 103 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1253
              model: top
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1254
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1255
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1256
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1257
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1258
              label: 'Bottom:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1259
              name: 'Label4'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1260
              layout: (LayoutFrame 14 0 111 0 90 0 133 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1261
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1262
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1263
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1264
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1265
              name: 'EntryField4'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1266
              layout: (LayoutFrame 95 0 111 0 132 0 133 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1267
              model: bottom
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1268
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1269
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1270
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1271
           (HorizontalPanelViewSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1272
              name: 'HorizontalPanel1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1273
              layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1274
              horizontalLayout: fitSpace
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1275
              verticalLayout: center
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1276
              horizontalSpace: 3
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1277
              verticalSpace: 3
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1278
              reverseOrderIfOKAtLeft: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1279
              component: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1280
             (SpecCollection
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1281
                collection: (
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1282
                 (ActionButtonSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1283
                    label: 'Cancel'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1284
                    name: 'Button1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1285
                    translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1286
                    model: cancel
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1287
                    extent: (Point 118 22)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1288
                  )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1289
                 (ActionButtonSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1290
                    label: 'OK'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1291
                    name: 'Button2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1292
                    translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1293
                    model: accept
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1294
                    extent: (Point 118 22)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1295
                  )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1296
                 )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1297
               
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1298
              )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1299
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1300
           )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1301
         
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1302
        )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1303
      )
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1304
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1305
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1306
windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1307
    "This resource specification was automatically generated
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1308
     by the UIPainter of ST/X."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1309
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1310
    "Do not manually edit this!! If it is corrupted,
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1311
     the UIPainter may not be able to read the specification."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1312
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1313
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1314
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1315
     ImageEditor new openInterface:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1316
     ImageEditor open
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1317
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1318
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1319
    <resource: #canvas>
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1320
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1321
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1322
     #(FullSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1323
        name: windowSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1324
        window: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1325
       (WindowSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1326
          label: 'Image Editor'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1327
          name: 'Image Editor'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1328
          min: (Point 400 320)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1329
          bounds: (Rectangle 0 0 450 350)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1330
          menu: menu
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1331
        )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1332
        component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1333
       (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1334
          collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1335
           (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1336
              name: 'menuToolbarView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1337
              layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1338
              style: (FontDescription helvetica medium roman 10)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1339
              menu: menuToolbar
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1340
              showSeparatingLines: true
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1341
            )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1342
           (VariableHorizontalPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1343
              name: 'horizontalPanel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1344
              layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1345
              snapMode: both
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1346
              barLevel: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1347
              component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1348
             (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1349
                collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1350
                 (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1351
                    name: 'leftView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1352
                    level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1353
                    component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1354
                   (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1355
                      collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1356
                       (VariableVerticalPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1357
                          name: 'verticalPanel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1358
                          layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1359
                          level: 0
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1360
                          snapMode: both
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1361
                          component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1362
                         (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1363
                            collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1364
                             (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1365
                                name: 'View1'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1366
                                component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1367
                               (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1368
                                  collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1369
                                   (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1370
                                      name: 'MouseButtonColorToolBar'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1371
                                      layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1372
                                      level: 0
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1373
                                      menu: menuMouseButtonColors
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1374
                                    )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1375
                                   (DataSetSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1376
                                      name: 'colorDataSetView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1377
                                      layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1378
                                      activeHelpKey: colorMapTable
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1379
                                      style: (FontDescription helvetica medium roman 10)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1380
                                      model: selectionOfColor
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1381
                                      menu: colorMapMenu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1382
                                      hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1383
                                      hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1384
                                      miniScrollerHorizontal: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1385
                                      miniScrollerVertical: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1386
                                      dataList: listOfColors
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1387
                                      has3Dsepartors: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1388
                                      has3Dseparators: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1389
                                      verticalSpacing: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1390
                                      columns: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1391
                                     (OrderedCollection
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1392
                                        
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1393
                                       (DataSetColumnSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1394
                                          labelButtonType: Button
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1395
                                          rendererType: rowSelector
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1396
                                          backgroundSelector: theColorItSelf:
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1397
                                        ) 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1398
                                       (DataSetColumnSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1399
                                          label: 'R'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1400
                                          labelAlignment: left
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1401
                                          labelButtonType: Button
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1402
                                          columnAlignment: right
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1403
                                          editorType: InputField
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1404
                                          type: number
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1405
                                          model: redFromColor:
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1406
                                          writeSelector: redAtColor:put:
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1407
                                          selectSelector: canSelectRedInColor:
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1408
                                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1409
                                        
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1410
                                       (DataSetColumnSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1411
                                          label: 'G'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1412
                                          labelAlignment: left
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1413
                                          labelButtonType: Button
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1414
                                          columnAlignment: right
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1415
                                          editorType: InputField
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1416
                                          type: number
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1417
                                          model: greenFromColor:
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1418
                                          writeSelector: greenAtColor:put:
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1419
                                          selectSelector: canSelectGreenInColor:
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1420
                                        ) 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1421
                                       (DataSetColumnSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1422
                                          label: 'B'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1423
                                          labelAlignment: left
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1424
                                          labelButtonType: Button
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1425
                                          columnAlignment: right
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1426
                                          editorType: InputField
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1427
                                          type: number
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1428
                                          model: blueFromColor:
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1429
                                          writeSelector: blueAtColor:put:
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1430
                                          selectSelector: canSelectBlueInColor:
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1431
                                        )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1432
                                      )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1433
                                      columnAdaptor: colorColumnAdaptor
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1434
                                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1435
                                   )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1436
                                 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1437
                                )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1438
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1439
                             (ArbitraryComponentSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1440
                                name: 'imagePreView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1441
                                activeHelpKey: previewView
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1442
                                menu: previewMenu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1443
                                hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1444
                                hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1445
                                miniScrollerHorizontal: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1446
                                miniScrollerVertical: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1447
                                hasBorder: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1448
                                component: ImageView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1449
                              )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1450
                             )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1451
                           
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1452
                          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1453
                          handles: (Any 0.5 1.0)
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1454
                        )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1455
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1456
                     
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1457
                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1458
                  )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1459
                 (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1460
                    name: 'rightView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1461
                    component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1462
                   (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1463
                      collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1464
                       (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1465
                          name: 'ToolBar1'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1466
                          layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1467
                          level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1468
                          menu: toolsMenuToolbar
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1469
                          verticalLayout: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1470
                          centerItems: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1471
                          textDefault: true
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1472
                        )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1473
                       (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1474
                          name: 'editingView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1475
                          layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1476
                          level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1477
                          component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1478
                         (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1479
                            collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1480
                             (ArbitraryComponentSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1481
                                name: 'imageEditView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1482
                                layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1483
                                hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1484
                                hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1485
                                hasBorder: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1486
                                component: ImageEditView
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1487
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1488
                             (LabelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1489
                                name: 'coordLabel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1490
                                layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1491
                                level: -1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1492
                                labelChannel: imageInfoHolder
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1493
                                resizeForLabel: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1494
                                adjust: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1495
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1496
                             (ArrowButtonSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1497
                                name: 'magnifyDownButton'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1498
                                layout: (LayoutFrame -80 1 -22 1 -58 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1499
                                activeHelpKey: magnifyImageDown
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1500
                                model: doMagnifyDown
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1501
                                enableChannel: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1502
                                isTriggerOnDown: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1503
                                direction: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1504
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1505
                             (ArrowButtonSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1506
                                name: 'magnifyUpButton'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1507
                                layout: (LayoutFrame -24 1 -22 1 -2 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1508
                                activeHelpKey: magnifyImageUp
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1509
                                model: doMagnifyUp
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1510
                                enableChannel: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1511
                                isTriggerOnDown: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1512
                                direction: right
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1513
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1514
                             (InputFieldSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1515
                                name: 'magnificationInputField'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1516
                                layout: (LayoutFrame -57 1 -22 1 -26 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1517
                                activeHelpKey: magnificationNumber
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1518
                                enableChannel: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1519
                                model: valueOfMagnification
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1520
                                type: numberInRange
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1521
                                acceptOnReturn: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1522
                                acceptOnTab: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1523
                                numChars: 2
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1524
                                minValue: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1525
                                maxValue: 99
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1526
                                acceptOnPointerLeave: false
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1527
                              )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1528
                             )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1529
                           
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1530
                          )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1531
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1532
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1533
                     
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1534
                    )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1535
                  )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1536
                 )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1537
               
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1538
              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1539
              handles: (Any 0.3 1.0)
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1540
            )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1541
           (UISubSpecification
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1542
              name: 'infoBarSubSpec'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1543
              layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1544
              majorKey: ToolApplicationModel
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1545
              minorKey: windowSpecForInfoBar
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1546
            )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1547
           )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1548
         
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1549
        )
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1550
      )
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1551
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1552
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1553
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1554
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1555
colorMapMenu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1556
    "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
  1557
     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
  1558
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1559
    "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
  1560
     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
  1561
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1562
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1563
     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
  1564
     (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
  1565
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1566
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1567
    <resource: #menu>
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1568
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1569
    ^
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1570
     
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1571
       #(#Menu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1572
          
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1573
           #(
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1574
             #(#MenuItem
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1575
                #label: 'Add Color'
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1576
                #translateLabel: true
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1577
                #value: #addColorToColormap
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  1578
                #enabled: #hasColormap
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1579
            )
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1580
             #(#MenuItem
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1581
                #label: 'Pick and Add Color'
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1582
                #translateLabel: true
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1583
                #value: #pickAndAddColorToColormap
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  1584
                #enabled: #hasColormap
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1585
            )
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1586
             #(#MenuItem
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1587
                #label: '-'
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1588
            )
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1589
             #(#MenuItem
1762
5e5186ce7bd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
  1590
                #label: 'Brighter'
5e5186ce7bd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
  1591
                #translateLabel: true
5e5186ce7bd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
  1592
                #value: #makeSelectedColorBrighter
5e5186ce7bd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
  1593
                #enabled: #hasColormap
5e5186ce7bd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
  1594
            )
5e5186ce7bd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
  1595
             #(#MenuItem
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1596
                #label: 'Darker'
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1597
                #translateLabel: true
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1598
                #value: #makeSelectedColorDarker
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  1599
                #enabled: #hasColormap
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1600
            )
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1601
             #(#MenuItem
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1602
                #label: '-'
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1603
            )
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1604
             #(#MenuItem
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1605
                #label: 'Inspect Color'
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1606
                #translateLabel: true
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1607
                #value: #inspectColor
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  1608
                #enabled: #hasColormap
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  1609
            )
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1610
          ) nil
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1611
          nil
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1612
      )
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1613
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1614
    "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
  1615
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1616
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1617
menu
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1618
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1619
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1620
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1621
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1622
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1623
228524287573 intitial checkin
tz
parents:
diff changeset
  1624
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1625
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
  1626
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  1627
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1628
228524287573 intitial checkin
tz
parents:
diff changeset
  1629
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  1630
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1631
    ^ 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1632
     #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1633
        #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1634
         #(#MenuItem
1489
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1635
            #label: '&File'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1636
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1637
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1638
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1639
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1640
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1641
                  #activeHelpKey: #fileNewImage
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1642
                  #label: 'New...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1643
                  #itemValue: #doNewImage
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1644
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1645
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1646
               #(#MenuItem
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1647
                  #activeHelpKey: #fileNewImage
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1648
                  #label: 'New from ClipBoard'
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1649
                  #itemValue: #doNewImageFromClipboard
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1650
                  #translateLabel: true
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1651
                )
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1652
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1653
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1654
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1655
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1656
                  #activeHelpKey: #fileLoadFromClass
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1657
                  #label: 'Load...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1658
                  #itemValue: #doLoadFromClass
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1659
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1660
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1661
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1662
                  #activeHelpKey: #fileLoadFromFile
1570
77684ee67295 menu items
Claus Gittinger <cg@exept.de>
parents: 1559
diff changeset
  1663
                  #label: 'Load from File...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1664
                  #itemValue: #doLoadFromFile
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1665
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1666
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1667
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1668
                  #activeHelpKey: #fileGrabImage
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  1669
                  #label: 'Grab from Screen...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1670
                  #itemValue: #grabScreenImage
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1671
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1672
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1673
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1674
                  #enabled: #imageHasNextImage
1496
15253ecf71c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1491
diff changeset
  1675
                  #label: 'Next in Sequence'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1676
                  #itemValue: #nextImageInSequence
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1677
                  #translateLabel: true
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1678
                )
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1679
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1680
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1681
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1682
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1683
                  #activeHelpKey: #fileSaveMethod
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1684
                  #enabled: #imageIsLoadedAndClassDefined
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1685
                  #label: 'Save'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1686
                  #itemValue: #doSaveMethod
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1687
                  #translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1688
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1689
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1690
                  #activeHelpKey: #fileSaveMethodAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1691
                  #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1692
                  #label: 'Save As...'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1693
                  #itemValue: #doSaveMethodAs
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1694
                  #translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1695
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1696
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1697
                  #activeHelpKey: #fileSaveAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1698
                  #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1699
                  #label: 'Save to File...'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1700
                  #itemValue: #doSaveImageFileAs
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1701
                  #translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1702
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1703
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1704
                  #activeHelpKey: #fileSaveMaskAs
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1705
                  #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1706
                  #label: 'Save Mask to File...'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1707
                  #itemValue: #doSaveImageMaskFileAs
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1708
                  #translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1709
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1710
               #(#MenuItem
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1711
                  #activeHelpKey: #fileSaveButtonImageAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1712
                  #enabled: #imageIsLoaded
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  1713
                  #label: 'Save as Button to File...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1714
                  #itemValue: #doSaveButtonImageToFileAs
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1715
                  #translateLabel: true
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1716
                )
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1717
               #(#MenuItem
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1718
                  #enabled: #imageIsLoaded
1703
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  1719
                  #label: 'Copy to Clipboard'
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  1720
                  #itemValue: #doCopyImageToClipboard
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  1721
                  #translateLabel: true
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  1722
                )
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  1723
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1724
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1725
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1726
               #(#MenuItem
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1727
                  #activeHelpKey: #fileShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1728
                  #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1729
                  #label: 'Show storeString'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1730
                  #itemValue: #doShowStoreString
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1731
                  #translateLabel: true
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1732
                )
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1733
               #(#MenuItem
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1734
                  #activeHelpKey: #fileEditMask
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1735
                  #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1736
                  #label: 'Edit Mask'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1737
                  #itemValue: #doEditMask
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1738
                  #translateLabel: true
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1739
                )
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1740
               #(#MenuItem
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1741
                  #label: '-'
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1742
                )
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1743
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1744
                  #activeHelpKey: #filePrint
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1745
                  #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1746
                  #label: 'Print'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1747
                  #itemValue: #doPrint
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1748
                  #translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1749
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1750
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1751
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1752
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1753
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1754
                  #activeHelpKey: #fileBrowseClass
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1755
                  #enabled: #hasClassDefined
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1756
                  #label: 'Browse Class'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1757
                  #itemValue: #doBrowseClass
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1758
                  #translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1759
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1760
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1761
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1762
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1763
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1764
                  #activeHelpKey: #fileExit
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1765
                  #label: 'Exit'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1766
                  #itemValue: #closeRequest
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1767
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1768
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1769
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1770
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1771
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1772
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1773
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1774
         #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1775
            #enabled: #imageIsLoaded
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1776
            #label: 'Edit'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1777
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1778
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1779
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1780
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1781
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1782
                  #activeHelpKey: #editUndo
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1783
                  #enabled: #valueOfCanUndo
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1784
                  #label: 'Undo'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1785
                  #itemValue: #doUndo
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1786
                  #translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1787
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1788
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1789
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1790
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1791
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1792
                  #activeHelpKey: #editFlipVertical
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1793
                  #label: 'Flip - Vertical'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1794
                  #itemValue: #doFlipVertical
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1795
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1796
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1797
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1798
                  #activeHelpKey: #editFlipHorizontal
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1799
                  #label: 'Flip - Horizontal'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1800
                  #itemValue: #doFlipHorizontal
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1801
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1802
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1803
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1804
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1805
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1806
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1807
                  #activeHelpKey: #editResize
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1808
                  #label: 'Resize...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1809
                  #itemValue: #doResizeImage
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1810
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1811
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1812
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1813
                  #activeHelpKey: #editMagnifyImage
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1814
                  #label: 'Magnify...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1815
                  #itemValue: #doMagnifyImage
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1816
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1817
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1818
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1819
                  #activeHelpKey: #editMagnifyImage
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1820
                  #label: 'Magnify By...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1821
                  #itemValue: #doMagnifyImageBy
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1822
                  #translateLabel: true
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1823
                )
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1824
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1825
                  #activeHelpKey: #editRotate
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1826
                  #label: 'Rotate...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1827
                  #itemValue: #doRotateImage
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1828
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1829
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1830
               #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1831
                  #label: '-'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1832
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1833
               #(#MenuItem
1146
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1834
                  #label: 'Invert'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1835
                  #itemValue: #doNegativeImage
1146
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1836
                  #translateLabel: true
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1837
                )
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1838
               #(#MenuItem
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1839
                  #label: '-'
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1840
                )
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1841
               #(#MenuItem
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1842
                  #label: 'Crop'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1843
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1844
                  #submenu: 
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1845
                 #(#Menu
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1846
                    #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1847
                     #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1848
                        #activeHelpKey: #cropAll
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1849
                        #label: 'All'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1850
                        #itemValue: #doCropAll
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1851
                        #translateLabel: true
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1852
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1853
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1854
                        #label: '-'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1855
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1856
                     #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1857
                        #activeHelpKey: #cropLeft
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1858
                        #label: 'Left'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1859
                        #itemValue: #doCropLeft
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1860
                        #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1861
                      )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1862
                     #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1863
                        #activeHelpKey: #cropRight
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1864
                        #label: 'Right'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1865
                        #itemValue: #doCropRight
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1866
                        #translateLabel: true
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1867
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1868
                     #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1869
                        #activeHelpKey: #cropTop
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1870
                        #label: 'Top'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1871
                        #itemValue: #doCropTop
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1872
                        #translateLabel: true
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1873
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1874
                     #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1875
                        #activeHelpKey: #cropBottom
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1876
                        #label: 'Bottom'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1877
                        #itemValue: #doCropBottom
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1878
                        #translateLabel: true
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1879
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1880
                     #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1881
                        #label: '-'
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1882
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1883
                     #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1884
                        #activeHelpKey: #cropManual
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1885
                        #label: 'Manual...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1886
                        #itemValue: #doCropManual
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1887
                        #translateLabel: true
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1888
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1889
                     )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1890
                    nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1891
                    nil
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1892
                  )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1893
                )
1489
e1ca3c840420 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1488
diff changeset
  1894
               #(#MenuItem
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1895
                  #activeHelpKey: #uncropManual
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1896
                  #label: 'Uncrop (Add Border)...'
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1897
                  #itemValue: #doUnCropManual
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1898
                  #translateLabel: true
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1899
                )
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1900
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1901
                  #activeHelpKey: #shiftManual
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1902
                  #label: 'Shift...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1903
                  #itemValue: #doShiftManual
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1904
                  #translateLabel: true
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1905
                )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1906
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1907
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1908
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1909
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1910
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1911
         #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1912
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1913
            #label: 'Mode'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1914
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1915
            #submenuChannel: #modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1916
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1917
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1918
            #enabled: #imageIsLoaded
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1919
            #label: 'ColorMap'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1920
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1921
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1922
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1923
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1924
               #(#MenuItem
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1925
                  #label: 'Depth'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1926
                  #translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1927
                  #submenu: 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1928
                 #(#Menu
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1929
                    #(
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1930
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1931
                        #activeHelpKey: #colorMap8
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1932
                        #label: '8-Plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1933
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1934
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1935
                        #argument: '8-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1936
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1937
                        #choiceValue: '8-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1938
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1939
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1940
                        #activeHelpKey: #colorMap4
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1941
                        #label: '4-Plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1942
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1943
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1944
                        #argument: '4-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1945
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1946
                        #choiceValue: '4-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1947
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1948
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1949
                        #activeHelpKey: #colorMap2
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1950
                        #label: '2-Plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1951
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1952
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1953
                        #argument: '2-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1954
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1955
                        #choiceValue: '2-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1956
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1957
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1958
                        #activeHelpKey: #colorMap1
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1959
                        #label: '1-Plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1960
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1961
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1962
                        #argument: '1-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1963
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1964
                        #choiceValue: '1-plane'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1965
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1966
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1967
                        #label: '-'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1968
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1969
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1970
                        #activeHelpKey: #colorMap8M
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1971
                        #label: '8-Plane + Mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1972
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1973
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1974
                        #argument: '8-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1975
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1976
                        #choiceValue: '8-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1977
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1978
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1979
                        #activeHelpKey: #colorMap4M
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1980
                        #label: '4-Plane + Mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1981
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1982
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1983
                        #argument: '4-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1984
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1985
                        #choiceValue: '4-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1986
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1987
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1988
                        #activeHelpKey: #colorMap2M
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1989
                        #label: '2-Plane + Mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1990
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1991
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1992
                        #argument: '2-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1993
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1994
                        #choiceValue: '2-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1995
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1996
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1997
                        #activeHelpKey: #colorMap1M
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1998
                        #label: '1-Plane + Mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1999
                        #itemValue: #colorMapMode:
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2000
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2001
                        #argument: '1-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2002
                        #choice: #colorMapMode
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2003
                        #choiceValue: '1-plane + mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2004
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2005
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2006
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2007
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2008
                  )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2009
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2010
               #(#MenuItem
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2011
                  #label: 'Colors'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2012
                  #translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2013
                  #submenu: 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2014
                 #(#Menu
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2015
                    #(
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2016
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2017
                        #activeHelpKey: #compressColormap
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2018
                        #enabled: #hasColormap
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2019
                        #label: 'Compress Colormap'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2020
                        #itemValue: #compressColorMap
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2021
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2022
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2023
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2024
                        #enabled: #hasColormap
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2025
                        #label: 'Sort Colormap'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2026
                        #itemValue: #sortColorMap
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2027
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2028
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2029
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2030
                        #label: 'Reduce Number of Colors...'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2031
                        #itemValue: #reduceNumberOfColors
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2032
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2033
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2034
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2035
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2036
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2037
                  )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2038
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2039
               #(#MenuItem
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2040
                  #label: 'Process'
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2041
                  #translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2042
                  #submenu: 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2043
                 #(#Menu
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2044
                    #(
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2045
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2046
                        #label: 'Make GrayScale'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2047
                        #itemValue: #makeGrayScale
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2048
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2049
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2050
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2051
                        #label: 'Make Brighter'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2052
                        #itemValue: #makeBrighter
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2053
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2054
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2055
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2056
                        #label: 'Make Darker'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2057
                        #itemValue: #makeDarker
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2058
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2059
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2060
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2061
                        #label: 'Make Inverse'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2062
                        #itemValue: #makeInverse
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2063
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2064
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2065
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2066
                        #label: '-'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2067
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2068
                     #(#MenuItem
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  2069
                        #label: 'Change HLS...'
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  2070
                        #itemValue: #changeHLS
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2071
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2072
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2073
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2074
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2075
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2076
                  )
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2077
                )
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2078
               #(#MenuItem
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2079
                  #label: 'Mask'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2080
                  #translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2081
                  #submenu: 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2082
                 #(#Menu
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2083
                    #(
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2084
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2085
                        #activeHelpKey: #copyMask
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2086
                        #enabled: #hasMask
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2087
                        #label: 'Copy Mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2088
                        #itemValue: #copyMask
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2089
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2090
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2091
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2092
                        #activeHelpKey: #pasteMask
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2093
                        #enabled: #hasMask
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2094
                        #label: 'Paste Mask'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2095
                        #itemValue: #pasteMask
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2096
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2097
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2098
                     #(#MenuItem
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2099
                        #label: 'Clear Masked Pixels'
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2100
                        #itemValue: #clearMaskedPixels
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2101
                        #translateLabel: true
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2102
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2103
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2104
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2105
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2106
                  )
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2107
                )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2108
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2109
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2110
              nil
756
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
  2111
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2112
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2113
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2114
            #label: 'Settings'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2115
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2116
            #submenu: 
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2117
           #(#Menu
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2118
              #(
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2119
               #(#MenuItem
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2120
                  #activeHelpKey: #settingsGridMagnification
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  2121
                  #label: 'Grid Magnification Limit...'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2122
                  #itemValue: #doChangeGridMagnification
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2123
                  #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2124
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2125
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2126
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2127
              nil
400
228524287573 intitial checkin
tz
parents:
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
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2131
            #label: 'History'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2132
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2133
            #submenuChannel: #menuHistory
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2134
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2135
         #(#MenuItem
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2136
            #label: 'Help'
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2137
            #translateLabel: true
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2138
            #startGroup: #right
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2139
            #submenuChannel: #menuHelp
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2140
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2141
         )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2142
        nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2143
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2144
      )
228524287573 intitial checkin
tz
parents:
diff changeset
  2145
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2146
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2147
menuMouseButtonColors
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2148
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2149
     by the MenuEditor of ST/X."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2150
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2151
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2152
     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
  2153
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2154
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2155
     MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2156
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2157
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2158
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2159
    <resource: #menu>
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2160
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2161
    ^
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2162
     
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2163
       #(#Menu
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2164
          
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2165
           #(
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2166
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2167
                #label: 'Left Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2168
                #nameKey: #leftMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2169
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2170
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2171
                #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2172
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2173
                #choiceValue: 1
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2174
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2175
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2176
                #label: 'Right Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2177
                #nameKey: #rightMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2178
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2179
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2180
                #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2181
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2182
                #choiceValue: 2
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2183
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2184
          ) nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2185
          nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2186
      )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2187
!
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2188
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2189
menuToolbar
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2190
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2191
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2192
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2193
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2194
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2195
228524287573 intitial checkin
tz
parents:
diff changeset
  2196
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2197
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
  2198
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  2199
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2200
228524287573 intitial checkin
tz
parents:
diff changeset
  2201
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  2202
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2203
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2204
     #(Menu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2205
        (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2206
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2207
            activeHelpKey: fileNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2208
            label: 'newImage'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2209
            itemValue: doNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2210
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2211
            isButton: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2212
            labelImage: (ResourceRetriever ToolbarIconLibrary newImage24x24Icon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2213
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2214
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2215
            activeHelpKey: fileLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2216
            label: 'loadFromFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2217
            itemValue: doLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2218
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2219
            isButton: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2220
            labelImage: (ResourceRetriever ToolbarIconLibrary load22x22Icon)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2221
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2222
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2223
            activeHelpKey: fileSaveAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2224
            enabled: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2225
            label: 'saveAsFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2226
            itemValue: doSaveImageFileAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2227
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2228
            isButton: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2229
            labelImage: (ResourceRetriever ToolbarIconLibrary save22x22Icon)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2230
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2231
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2232
            label: ''
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2233
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2234
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2235
            activeHelpKey: fileLoadFromClass
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2236
            label: 'loadFromClass'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2237
            itemValue: doLoadFromClass
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2238
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2239
            isButton: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2240
            submenuChannel: menuHistory
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2241
            labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethod22x22Icon)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2242
            keepLinkedMenu: true
1748
a62052c6ee71 toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents: 1741
diff changeset
  2243
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2244
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2245
            activeHelpKey: fileSaveMethodAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2246
            enabled: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2247
            label: 'saveAsMethod'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2248
            itemValue: doSaveMethodAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2249
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2250
            isButton: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2251
            labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethod22x22Icon)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2252
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2253
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2254
            label: ''
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2255
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2256
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2257
            label: ''
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2258
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2259
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2260
            activeHelpKey: editUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2261
            enabled: valueOfCanUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2262
            label: 'Undo'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2263
            itemValue: doUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2264
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2265
            isButton: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2266
            labelImage: (ResourceRetriever ToolbarIconLibrary undo16x16Icon2)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2267
          )
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2268
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2269
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2270
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2271
      )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2272
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2273
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2274
modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2275
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2276
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2277
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2278
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2279
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2280
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2281
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2282
     MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2283
     (Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2284
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2285
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2286
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2287
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2288
    ^ 
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2289
     #(#Menu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2290
        #(
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2291
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2292
            #activeHelpKey: #drawModePoint
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2293
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2294
            #label: 'Point'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2295
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2296
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2297
            #choiceValue: #point
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2298
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2299
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2300
            #activeHelpKey: #drawModeBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2301
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2302
            #label: 'Rect'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2303
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2304
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2305
            #choiceValue: #box
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2306
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2307
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2308
            #activeHelpKey: #drawModeFilledBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2309
            #enabled: #imageIsLoaded
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  2310
            #label: 'Filled Rectangle'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2311
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2312
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2313
            #choiceValue: #filledBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2314
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2315
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2316
            #activeHelpKey: #drawModeFill
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2317
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2318
            #label: 'Fill'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2319
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2320
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2321
            #choiceValue: #fill
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2322
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2323
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2324
            #activeHelpKey: #drawModeCopy
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2325
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2326
            #label: 'Copy'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2327
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2328
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2329
            #choiceValue: #copy
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2330
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2331
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2332
            #activeHelpKey: #drawModePaste
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2333
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2334
            #label: 'Paste'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2335
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2336
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2337
            #choiceValue: #paste
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2338
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2339
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2340
            #activeHelpKey: #drawModePasteUnder
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2341
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2342
            #label: 'Paste Under'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2343
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2344
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2345
            #choiceValue: #pasteUnder
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2346
          )
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2347
         #(#MenuItem
1579
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2348
            #activeHelpKey: #drawModePasteWithMask
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2349
            #enabled: #imageIsLoaded
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  2350
            #label: 'Paste with Mask'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2351
            #translateLabel: true
1579
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2352
            #choice: #editMode
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2353
            #choiceValue: #pasteWithMask
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2354
          )
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2355
         #(#MenuItem
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2356
            #activeHelpKey: #drawModeSpecial
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2357
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2358
            #label: 'Special'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2359
            #translateLabel: true
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2360
            #choice: #editMode
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2361
            #choiceValue: #specialOperation
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2362
          )
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2363
         )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2364
        nil
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2365
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2366
      )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2367
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2368
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2369
previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2370
    "This resource specification was automatically generated
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2371
     by the MenuEditor of ST/X."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2372
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2373
    "Do not manually edit this!! If it is corrupted,
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2374
     the MenuEditor may not be able to read the specification."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2375
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2376
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2377
     MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2378
     (Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2379
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2380
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2381
    <resource: #menu>
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2382
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2383
    ^ 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2384
     #(Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2385
        (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2386
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2387
            label: 'TileMode'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2388
            translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2389
            indication: tileModeHolder
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2390
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2391
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2392
            label: '-'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2393
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2394
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2395
            label: 'Background Color'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2396
            translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2397
            submenu: 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2398
           (Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2399
              (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2400
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2401
                  label: 'Gray'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2402
                  translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2403
                  choice: previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2404
                  choiceValue: nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2405
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2406
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2407
                  label: 'Black'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2408
                  translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2409
                  choice: previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2410
                  choiceValue: black
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2411
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2412
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2413
                  label: 'White'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2414
                  translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2415
                  choice: previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2416
                  choiceValue: white
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2417
                )
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2418
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2419
                  label: '-'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2420
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2421
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2422
                  label: 'Red'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2423
                  translateLabel: true
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2424
                  choice: previewBackgroundColor
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2425
                  choiceValue: red
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2426
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2427
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2428
                  label: 'Green'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2429
                  translateLabel: true
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2430
                  choice: previewBackgroundColor
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2431
                  choiceValue: green
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2432
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2433
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2434
                  label: 'Blue'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2435
                  translateLabel: true
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2436
                  choice: previewBackgroundColor
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2437
                  choiceValue: blue
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2438
                )
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2439
               )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2440
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2441
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2442
            )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2443
          )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2444
         )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2445
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2446
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2447
      )
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2448
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2449
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2450
toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2451
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2452
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2453
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2454
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2455
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2456
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2457
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2458
     MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2459
     (Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2460
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2461
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2462
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2463
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2464
    ^ 
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2465
     #(#Menu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2466
        #(
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2467
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2468
            #activeHelpKey: #drawModePoint
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2469
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2470
            #label: 'Point'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2471
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2472
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2473
            #labelImage: #(#ResourceRetriever #ImageEditor #pointIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2474
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2475
            #choiceValue: #point
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2476
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2477
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2478
            #activeHelpKey: #drawModeBox
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2479
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2480
            #label: 'Rect'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2481
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2482
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2483
            #labelImage: #(#ResourceRetriever #ImageEditor #rectIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2484
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2485
            #choiceValue: #box
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2486
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2487
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2488
            #activeHelpKey: #drawModeFilledBox
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2489
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2490
            #label: 'FillRect'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2491
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2492
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2493
            #labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2494
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2495
            #choiceValue: #filledBox
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2496
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2497
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2498
            #activeHelpKey: #drawModeFill
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2499
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2500
            #label: 'Fill'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2501
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2502
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2503
            #labelImage: #(#ResourceRetriever #ImageEditor #fillIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2504
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2505
            #choiceValue: #fill
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2506
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2507
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2508
            #activeHelpKey: #drawModeCopy
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2509
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2510
            #label: 'Copy'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2511
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2512
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2513
            #labelImage: #(#ResourceRetriever #ImageEditor #copyIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2514
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2515
            #choiceValue: #copy
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2516
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2517
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2518
            #activeHelpKey: #drawModePaste
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2519
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2520
            #label: 'Paste'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2521
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2522
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2523
            #labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2524
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2525
            #choiceValue: #paste
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2526
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2527
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2528
            #activeHelpKey: #drawModePasteUnder
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2529
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2530
            #label: 'Paste Under'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2531
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2532
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2533
            #labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2534
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2535
            #choiceValue: #pasteUnder
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2536
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2537
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2538
            #activeHelpKey: #drawModePasteWithMask
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2539
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2540
            #label: 'Paste With Mask'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2541
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2542
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2543
            #labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2544
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2545
            #choiceValue: #pasteWithMask
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2546
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2547
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2548
            #activeHelpKey: #drawModeSpecial
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2549
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2550
            #label: 'Special'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2551
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2552
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2553
            #labelImage: #(#ResourceRetriever #ImageEditor #specialIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2554
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2555
            #choiceValue: #specialOperation
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2556
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2557
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2558
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2559
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2560
      )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2561
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2562
228524287573 intitial checkin
tz
parents:
diff changeset
  2563
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  2564
228524287573 intitial checkin
tz
parents:
diff changeset
  2565
image
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2566
    "returns the current editing image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2567
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2568
    ^ imageEditView image
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2569
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2570
228524287573 intitial checkin
tz
parents:
diff changeset
  2571
postOpenAction: anAction
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2572
   "sets an action which is evaluated after opening"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2573
228524287573 intitial checkin
tz
parents:
diff changeset
  2574
    postOpenAction := anAction
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2575
!
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2576
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2577
resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2578
    imageEditView resourceClass:aClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2579
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2580
1398
284781677ae1 category changes
Claus Gittinger <cg@exept.de>
parents: 1393
diff changeset
  2581
!ImageEditor methodsFor:'accessing-views'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2582
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2583
colorDataSetView
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2584
    "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
  2585
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2586
    ^(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
  2587
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2588
    "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
  2589
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2590
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2591
coordLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2592
    "returns the view the coord label"
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2593
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2594
    ^self componentAt: #coordLabel
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2595
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2596
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2597
imageEditView
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2598
    "returns the view of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2599
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2600
    imageEditView isNil ifTrue:[
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2601
        imageEditView := (self componentAt: #imageEditView) scrolledView.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2602
        imageEditView addDependent:self.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2603
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2604
    ^ imageEditView
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2605
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2606
    "Modified: / 10.2.2000 / 23:19:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2607
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2608
228524287573 intitial checkin
tz
parents:
diff changeset
  2609
imagePreView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2610
    "returns the preview of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2611
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2612
    ^ (self componentAt: #imagePreView) subViews first 
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  2613
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  2614
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2615
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  2616
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2617
activityInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2618
    ^ self valueOfInfoLabel
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2619
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2620
    "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
  2621
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2622
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2623
colorColumnAdaptor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2624
    ^ self
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2625
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2626
    "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
  2627
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2628
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2629
hasClassAndSelectorDefined
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2630
    ^ [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2631
        |clsName|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2632
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2633
        (clsName := imageEditView resourceClass) size > 0
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2634
        and:[(Smalltalk at:clsName ifAbsent:nil) notNil
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2635
        and:[imageEditView resourceSelector notNil]]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2636
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2637
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2638
    "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
  2639
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2640
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2641
hasClassDefined
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2642
    ^ [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2643
        |clsName|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2644
1443
ba75957c7bfc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1436
diff changeset
  2645
        (clsName := imageEditView resourceClass) size > 0
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2646
        and:[(Smalltalk at:clsName ifAbsent:nil) notNil]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2647
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2648
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2649
    "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
  2650
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2651
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2652
hasColormap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2653
    ^ [self image notNil and:[self image colorMap notNil]]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2654
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2655
    "Created: / 30.9.1998 / 23:53:55 / cg"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2656
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2657
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2658
imageHasNextImage
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2659
    "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
  2660
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2661
    ^ [self image notNil
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2662
       and:[self image imageSequence notNil]]
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2663
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2664
    "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
  2665
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2666
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2667
imageInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2668
    |holder|
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2669
    (holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2670
        builder aspectAt:#imageInfoHolder put:(holder :=  '' asValue).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2671
    ].
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2672
    ^ holder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2673
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2674
    "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
  2675
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2676
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2677
imageIsLoaded
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2678
    "returns whether an image is loaded as value holder"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2679
228524287573 intitial checkin
tz
parents:
diff changeset
  2680
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2681
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2682
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  2683
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2684
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2685
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2686
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2687
imageIsLoadedAndClassDefined
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2688
    "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
  2689
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2690
    ^ [self hasClassAndSelectorDefined value
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2691
       and:[self imageIsLoaded value]]
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2692
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2693
    "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
  2694
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2695
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2696
listOfColors
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2697
    "returns the list of colors in a List"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2698
228524287573 intitial checkin
tz
parents:
diff changeset
  2699
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2700
    (holder := builder bindingAt:#listOfColors) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2701
        builder aspectAt:#listOfColors put:(holder :=  List new).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2702
        holder addDependent:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2703
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2704
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2705
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2706
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2707
previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2708
    |holder|
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2709
    (holder := builder bindingAt:#previewBackgroundColor) isNil ifTrue:[
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2710
        builder aspectAt:#previewBackgroundColor put:(holder := nil asValue).
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2711
        holder addDependent:self.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2712
    ].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2713
    ^ holder
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2714
!
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2715
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2716
selectionOfColor
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  2717
    "returns a valueHolder for the current selection of the edit color.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  2718
     Here, an AspectAdaptor which accesses selectedColorIndex is returned."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2719
228524287573 intitial checkin
tz
parents:
diff changeset
  2720
    |holder|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  2721
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2722
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2723
        builder aspectAt:#selectionOfColor put:(
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  2724
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2725
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2726
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2727
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2728
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2729
tileModeHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2730
    |holder|
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2731
    (holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2732
        builder aspectAt:#tileModeHolder put:(holder := false asValue).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2733
        holder addDependent:self.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2734
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2735
    ^ holder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2736
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2737
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2738
valueOfMagnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2739
    "returns current magnification of the image as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2740
228524287573 intitial checkin
tz
parents:
diff changeset
  2741
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2742
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2743
        builder aspectAt:#valueOfMagnification put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  2744
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
228524287573 intitial checkin
tz
parents:
diff changeset
  2745
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2746
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2747
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2748
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2749
!ImageEditor methodsFor:'change & update'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2750
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2751
findColorMapMode
899
43b744c647ba comment grammar
tz
parents: 898
diff changeset
  2752
    "finds the colorMapMode for a new image"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2753
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2754
    |image listOfColors|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2755
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2756
    image := self image.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2757
    image depth > 8 ifTrue: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2758
        colorMapMode value: ''. 
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2759
        self listOfColors removeAll. 
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2760
        ^ nil
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2761
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2762
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2763
    colorMapMode value:(image depth printString, '-plane').
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2764
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2765
    (listOfColors := self listOfColors) isEmpty ifTrue:[   
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2766
        self colorMapMode: colorMapMode value.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2767
        listOfColors := self listOfColors.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2768
        image := self image.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2769
    ].                               
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2770
    imageEditView drawingColors:(Array
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2771
                                    with: (listOfColors at:1) 
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2772
                                    with: (listOfColors at:2 ifAbsent:[listOfColors at:1])).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2773
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2774
    image mask notNil ifTrue: [             
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2775
        colorMapMode value:(colorMapMode value, ' + mask').
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2776
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2777
        (listOfColors detect: [:clr| clr = (Color colorId:0)] ifNone: nil) isNil
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2778
        ifTrue:[
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2779
            listOfColors addFirst:(Color colorId:0).
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2780
            imageEditView drawingColors: (Array 
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2781
                                            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
  2782
                                            with:(listOfColors at:1)).
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  2783
        ]
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2784
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2785
    self selectionOfColor 
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2786
        setValue: 0;
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2787
        value: (self listOfColors indexOf: imageEditView selectedColor).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2788
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2789
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2790
update:something with:aParameter from:changedObject
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2791
    |clrIndex img clr|
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2792
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2793
    img := self image.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2794
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2795
    changedObject == self tileModeHolder ifTrue:[
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2796
        self imagePreView 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2797
            tileMode:(changedObject value) tileOffset:(img extent);
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2798
            clear; 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2799
            invalidate.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2800
        ^ self
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2801
    ].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2802
    changedObject == self previewBackgroundColor ifTrue:[
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2803
        clr := changedObject value isNil 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2804
                    ifTrue:[imageEditView viewBackground]
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2805
                    ifFalse:[Color perform:changedObject value].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2806
        self imagePreView 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2807
            viewBackground:clr;
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2808
            clear; 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2809
            invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2810
        ^ self
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2811
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2812
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2813
    changedObject == self listOfColors ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2814
        something == #at: ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2815
            "/ colormap entry changed at aParameter
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2816
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2817
            clrIndex := aParameter.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2818
            (self hasMask) ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2819
                clrIndex := clrIndex - 1.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2820
            ].
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2821
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  2822
            (img colorMap ? drawingColormap) at:clrIndex put:(changedObject at:aParameter).
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2823
            self colorMapChanged.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2824
            ^ self
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2825
        ].
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2826
    ].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2827
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2828
    changedObject == imageEditView undoImages ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2829
        self valueOfCanUndo value:(changedObject notEmpty).
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2830
        ^ self.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2831
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2832
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2833
    changedObject == imageEditView ifTrue:[
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2834
        something == #imageColors ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2835
            self listOfColors contents:img colorMap.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2836
            self findColorMapMode.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2837
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2838
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2839
        something == #image ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2840
            self imagePreView image:img.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2841
            self listOfColors contents:img colorMap.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2842
            self findColorMapMode.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2843
            self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2844
                self imagePreView tileMode:true tileOffset:(img extent).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2845
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2846
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2847
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2848
        something == #subImageIn ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2849
            self imagePreView image ~~ img ifTrue:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2850
                self error:'internal error' mayProceed:true.
1406
6de5c78f5bcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  2851
            ].
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2852
            self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2853
                self imagePreView invalidate.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2854
            ] ifFalse:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2855
                self imagePreView invalidate:aParameter.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2856
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2857
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2858
        ].
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2859
        something == #selectedColor ifTrue:[
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2860
            (aParameter = (Color colorId:0)) ifTrue:[
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2861
                self halt.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2862
            ].
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2863
            clrIndex := self listOfColors indexOf:aParameter.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2864
            self selectionOfColor value:clrIndex.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2865
            ^ self.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2866
        ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2867
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2868
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2869
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2870
    changedObject == imageEditView image ifTrue:[
1377
243baa3fce51 oops - leftover halts
Claus Gittinger <cg@exept.de>
parents: 1376
diff changeset
  2871
        self halt:'to be implemented'.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2872
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2873
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2874
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2875
    super update:something with:aParameter from:changedObject
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2876
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2877
    "Modified: / 10.2.2000 / 23:36:49 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2878
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2879
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2880
updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2881
    "updates channels and view, if image is loaded"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2882
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2883
    self imageIsLoaded value: false.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2884
    self listOfColors removeAll.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2885
    self imagePreView image: nil
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2886
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2887
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2888
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2889
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2890
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2891
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2892
updateLabelsAndHistory
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2893
    "updates labels and history, if something has changed"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2894
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2895
    self imageIsLoaded value: self image notNil.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2896
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2897
    self image isNil ifTrue: [^nil].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2898
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2899
    self updateInfoLabel.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2900
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2901
    imageEditView resourceMessage asCollectionOfWords size = 2
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2902
        ifTrue: [self addToHistory: imageEditView resourceMessage -> #loadFromMessage:].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2903
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2904
    self image fileName notNil
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2905
        ifTrue: [self addToHistory: self image fileName -> #loadFromFile:].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2906
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2907
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2908
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2909
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2910
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2911
!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
  2912
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2913
atColor:aOldColor put:aNewColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2914
    "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
  2915
    "
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2916
    |index list|
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2917
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2918
    list  := self listOfColors.
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2919
    index := list identityIndexOf:aOldColor.
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2920
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2921
    index ~~ 0 ifTrue:[
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2922
        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
  2923
    ] ifFalse:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2924
        self error:'internal error' mayProceed:true.
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2925
        list add:aNewColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2926
    ].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2927
!
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2928
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2929
blueAtColor:aColor put:newBlue
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2930
    "helper used to return a new row element, when blue is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2931
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2932
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2933
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2934
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2935
    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
  2936
    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
  2937
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2938
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2939
             put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2940
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2941
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2942
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
  2943
    "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
  2944
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2945
    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
  2946
    ^ 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
  2947
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2948
    "Created: / 26.7.1998 / 12:30:35 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2949
    "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
  2950
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2951
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2952
canSelectBlueInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2953
    ^ aColor blueByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2954
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2955
    "Created: / 7.8.1998 / 22:50:34 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2956
    "Modified: / 7.8.1998 / 22:52:57 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2957
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2958
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2959
canSelectGreenInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2960
    ^ aColor greenByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2961
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2962
    "Created: / 7.8.1998 / 22:50:22 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2963
    "Modified: / 7.8.1998 / 22:52:46 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2964
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2965
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2966
canSelectRedInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2967
    ^ aColor redByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2968
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2969
    "Created: / 7.8.1998 / 22:50:00 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2970
    "Modified: / 7.8.1998 / 22:51:03 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2971
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  2972
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2973
greenAtColor:aColor put:newGreen
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2974
    "helper used to return a new row element, when green is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2975
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2976
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2977
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2978
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2979
    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
  2980
    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
  2981
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2982
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  2983
             put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2984
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2985
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2986
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
  2987
    "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
  2988
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2989
    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
  2990
    ^ 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
  2991
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2992
    "Created: / 26.7.1998 / 12:30:29 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2993
    "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
  2994
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2995
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2996
redAtColor:aColor put:newRed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2997
    "helper used to return a new row element, when red is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2998
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  2999
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3000
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3001
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3002
    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
  3003
    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
  3004
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3005
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3006
             put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3007
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3008
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3009
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
  3010
    "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
  3011
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3012
    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
  3013
    ^ 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
  3014
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3015
    "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
  3016
!
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  3017
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  3018
theColorItSelf:aColor
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  3019
    ^ 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
  3020
! !
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3021
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3022
!ImageEditor methodsFor:'help'!
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3023
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3024
defaultInfoLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3025
    "returns the default info label"
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3026
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3027
    |resourceClass|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3028
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3029
    resourceClass := imageEditView resourceClass.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3030
    (resourceClass isSymbol and: [(Smalltalk at:resourceClass) isClass])
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3031
    ifTrue:[
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3032
        ^ resourceClass, ' >> ', imageEditView resourceSelector
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3033
    ].
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3034
    ^ 'No class and selector defined.'
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  3035
!
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  3036
702
c9de7a9bc416 docu call changed
tz
parents: 694
diff changeset
  3037
openDocumentation
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3038
    "opens the documentation file of the Image Editor"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  3039
763
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  3040
    self openHTMLDocument: 'tools/uipainter/ImageEditor.html'
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  3041
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3042
! !
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3043
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3044
!ImageEditor methodsFor:'loading'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3045
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3046
loadFromFile: aFileName
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3047
    "loads an image from aFileName and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3048
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3049
    |img|
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3050
980
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3051
    self withCursor:Cursor wait do:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3052
        (imageEditView loadFromFile: aFileName) notNil ifTrue:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3053
            (img := self image) notNil ifTrue:[          
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3054
                img colorMap notNil ifTrue:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3055
                    self listOfColors contents:(img usedColors asSet asOrderedCollection).
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3056
                ] ifFalse:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3057
                    self listOfColors removeAll.
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3058
                ].
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3059
                self findColorMapMode.     
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3060
                self updateLabelsAndHistory.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3061
                img := img onDevice:device.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3062
                imageEditView image:img.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3063
            ] ifFalse:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3064
                self updateForNoImage
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3065
            ].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3066
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3067
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3068
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3069
    "Modified: / 16.3.1999 / 21:44:26 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3070
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3071
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3072
loadFromImage:anImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3073
    "loads an image from anImage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3074
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3075
    |img|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3076
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3077
    anImage notNil ifTrue:[    
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3078
        img := anImage onDevice:device.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3079
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3080
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3081
    imageEditView image:img.
1799
e605f0af928a clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents: 1796
diff changeset
  3082
    imageEditView clearModified.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3083
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3084
    img notNil ifTrue:[    
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3085
        img colorMap notNil ifTrue:[
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3086
            self listOfColors contents:(img usedColors asSet asOrderedCollection).
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3087
        ] ifFalse:[
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3088
            self listOfColors removeAll.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3089
        ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3090
        self findColorMapMode.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3091
        self updateLabelsAndHistory.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3092
    ] ifFalse:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3093
        self updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3094
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3095
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3096
    "Modified: / 16.3.1999 / 21:43:56 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3097
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3098
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3099
loadFromMessage: aMessage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3100
    "loads an image by evaluating aMessage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3101
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3102
    |img|
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3103
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3104
    (imageEditView loadFromMessage: aMessage) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3105
        (img := self image) notNil ifTrue:[
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3106
            img := img onDevice:device.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3107
            self listOfColors contents:(img usedColors asSet asOrderedCollection).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3108
            self findColorMapMode.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3109
            self updateLabelsAndHistory.
1769
8782d5b6dc24 modified flag after edit operations
Claus Gittinger <cg@exept.de>
parents: 1764
diff changeset
  3110
            "/ imageEditView image:img.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3111
        ] ifFalse:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3112
            self updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3113
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3114
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3115
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3116
    "Modified: / 16.3.1999 / 21:44:41 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3117
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3118
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3119
loadFromOrPrepareForMessage: aMessage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3120
    "loads an image by evaluating aMessage;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3121
     if no image could extract from aMessage; do set the class and the selector from 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3122
     the aMessage for a saving at the end of editing"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3123
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3124
    (imageEditView loadFromMessage: aMessage) notNil
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3125
    ifTrue: [
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3126
        self listOfColors contents: self image usedColors asSet asOrderedCollection.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3127
        self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3128
    ] ifFalse: [
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3129
        imageEditView resourceMessage: aMessage.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3130
    ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3131
    self updateLabelsAndHistory.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3132
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3133
    "Modified: / 16.3.1999 / 21:45:07 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3134
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3135
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3136
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3137
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3138
colorMapMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3139
    "returns colorMapMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3140
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3141
    colorMapMode isNil ifTrue: [colorMapMode := '' asValue].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3142
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3143
    ^colorMapMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3144
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3145
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3146
editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3147
    "returns editMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3148
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3149
    editMode isNil ifTrue: [
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3150
        editMode := #point asValue.
1329
a38c2e29d1fb use onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
  3151
        editMode onChangeEvaluate:[imageEditView editMode:(editMode value)]
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3152
    ].
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3153
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3154
    ^editMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3155
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3156
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3157
mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3158
    "returns mouseKeyColorMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3159
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3160
    mouseKeyColorMode isNil ifTrue:[
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3161
        mouseKeyColorMode := 1 asValue.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3162
        mouseKeyColorMode onChangeEvaluate: [
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3163
            imageEditView mouseKeyColorMode:mouseKeyColorMode value. 
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3164
            self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor).
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3165
        ]
956
dc4df8952e82 check whether imageEditView is nil
ca
parents: 951
diff changeset
  3166
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3167
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3168
    ^mouseKeyColorMode
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3169
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3170
    "Modified: / 10.2.2000 / 23:16:42 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3171
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3172
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3173
!ImageEditor methodsFor:'private'!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3174
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3175
updateImage
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3176
    |img|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3177
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3178
    img := imageEditView image.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3179
    imageEditView image:img.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3180
    self fetchImageData.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3181
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3182
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3183
updateImagePreView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3184
    self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3185
        self imagePreView tileMode:true tileOffset:(self image extent).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3186
    ]
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3187
! !
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3188
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3189
!ImageEditor methodsFor:'queries'!
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3190
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3191
hasMask
1556
92d3ec7850cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1545
diff changeset
  3192
    ^ colorMapMode value notNil and:[colorMapMode value endsWith:'mask']
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3193
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3194
    "Created: / 18.8.1998 / 17:17:38 / cg"
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3195
!
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3196
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3197
preferredExtent
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3198
    "returns the preferred extent"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3199
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3200
    ^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5)
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3201
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3202
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3203
! !
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3204
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3205
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3206
228524287573 intitial checkin
tz
parents:
diff changeset
  3207
magnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3208
    "returns the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3209
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3210
    self imageEditView isNil ifTrue: [^1].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3211
    ^imageEditView magnification x
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3212
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3213
228524287573 intitial checkin
tz
parents:
diff changeset
  3214
magnification: aValue
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3215
    "sets the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3216
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  3217
    |magnification|        
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  3218
    magnification := (aValue ? 1) asPoint.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3219
    (magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3220
    imageEditView magnification: magnification
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3221
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3222
228524287573 intitial checkin
tz
parents:
diff changeset
  3223
selectedColorIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3224
    "returns the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3225
228524287573 intitial checkin
tz
parents:
diff changeset
  3226
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  3227
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3228
228524287573 intitial checkin
tz
parents:
diff changeset
  3229
selectedColorIndex: anIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3230
    "sets the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3231
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3232
    |clr pixel|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3233
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3234
    selectedColorIndex := anIndex.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3235
    clr := self listOfColors at:anIndex ifAbsent:nil.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3236
    clr isNil ifTrue:[^ self].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3237
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  3238
    pixel := anIndex - 1.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3239
    (self listOfColors at:1) = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3240
        anIndex == 1 ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3241
            pixel := nil.       "/ mask
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3242
        ] ifFalse:[
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  3243
            pixel := pixel - 1
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3244
        ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3245
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3246
    imageEditView selectedColorIndex:pixel.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3247
    imageEditView selectedColor:clr.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3248
228524287573 intitial checkin
tz
parents:
diff changeset
  3249
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3250
1716
5ae373f6fef0 method category rename
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
  3251
!ImageEditor methodsFor:'startup & release'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3252
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3253
closeDownViews
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3254
    builder notNil ifTrue:[
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3255
        DefaultRelativeSizes :=
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3256
            Array 
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3257
                with:(builder componentAt:#horizontalPanel) relativeCorners    
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3258
                with:(builder componentAt:#verticalPanel) relativeCorners.
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3259
    ].
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3260
    super closeDownViews
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3261
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3262
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3263
closeRequest
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3264
    "close request"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3265
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3266
    imageEditView checkModified ifTrue:[super closeRequest]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3267
228524287573 intitial checkin
tz
parents:
diff changeset
  3268
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3269
228524287573 intitial checkin
tz
parents:
diff changeset
  3270
open
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3271
    "after opening, sets the masterApplication of the imageEditView to self"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3272
228524287573 intitial checkin
tz
parents:
diff changeset
  3273
    super open.
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  3274
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  3275
    imageEditView := (self componentAt: #imageEditView) subViews first.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3276
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3277
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3278
postBuildWith:aBuilder
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3279
    super postBuildWith:aBuilder.
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3280
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3281
    DefaultRelativeSizes notNil ifTrue:[
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3282
        (aBuilder componentAt:#horizontalPanel) relativeCorners:DefaultRelativeSizes first.
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3283
        (aBuilder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second.
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3284
    ].
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3285
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3286
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3287
postOpenWith:aBuilder
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3288
    "after opening, sets the masterApplication of the imageEditView to self;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3289
     evaluate the postOpenAction"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3290
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3291
    imageEditView undoImages addDependent:self.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3292
    imageEditView imageInfoHolder:(self imageInfoHolder).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3293
    imageEditView activityInfoHolder:(self activityInfoHolder).
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3294
    imageEditView clickInfoCallBack:[:button :point | 
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3295
                        |mouseButtonColorToolBar|
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3296
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  3297
                        mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3298
                        (mouseButtonColorToolBar itemAt:button) toggleIndication.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3299
                        mouseButtonColorToolBar do: [:i| i updateIndicators].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3300
                  ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3301
    imageEditView addDependent:self.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3302
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3303
    postOpenAction notNil ifTrue: [postOpenAction value].
228524287573 intitial checkin
tz
parents:
diff changeset
  3304
1250
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  3305
    super postOpenWith:aBuilder.
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  3306
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  3307
    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
  3308
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3309
    "Modified: / 10.2.2000 / 23:17:43 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3310
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3311
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  3312
!ImageEditor methodsFor:'user actions-colormap'!
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3313
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3314
addColorToColormap
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3315
    self addColorToColormap:(Color black)
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3316
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3317
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3318
addColorToColormap:newColor
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3319
    |depth img cMap newColorMap newImage oldCListSize newMode listOfColors|
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3320
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3321
    img := self image.
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3322
    img isNil ifTrue:[
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3323
        self warn:'No Image.'.
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3324
        ^ self
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3325
    ].
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3326
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3327
    depth := img depth.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3328
    cMap := img colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3329
    cMap isNil ifTrue:[
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3330
        drawingColormap isNil ifTrue:[
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3331
            self information:'Image has no colormap.\The shown colorMap is for drawing only.' withCRs.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3332
            drawingColormap := OrderedCollection new.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3333
        ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3334
        drawingColormap add:newColor.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3335
        self listOfColors contents:drawingColormap.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3336
        self selectionOfColor value:(drawingColormap size).
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3337
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3338
        "/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3339
        ^ self
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3340
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3341
1583
c21cb650b2a0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1579
diff changeset
  3342
    ("(depth == 1)" false
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3343
    or:[cMap size == (1 bitShift:depth)]) ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3344
        depth >= 8 ifTrue:[
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3345
            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
  3346
            ^ self
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3347
        ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3348
        (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
  3349
        ifFalse:[
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3350
            ^ self
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3351
        ].
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3352
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3353
        imageEditView makeUndo.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3354
        newMode := (depth*2) printString , (colorMapMode value copyFrom:2).
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3355
        self colorMapMode:newMode.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3356
    ] ifFalse:[
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3357
        imageEditView makeUndo.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3358
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3359
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3360
    cMap := cMap asArray.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3361
    listOfColors := self listOfColors.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3362
    oldCListSize := listOfColors size.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3363
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3364
"/    (colorMapMode value asString endsWith:'mask') ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3365
"/        cMap last = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3366
"/            cMap := cMap copyWithoutLast:1
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3367
"/        ] ifFalse:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3368
"/            cMap first = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3369
"/                cMap := cMap copyFrom:2
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3370
"/            ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3371
"/        ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3372
"/    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3373
"/
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3374
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3375
    newColorMap := cMap copyWith:newColor.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3376
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3377
    newImage := img species new
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3378
                    width:img width
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3379
                    height:img height
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3380
                    depth:depth
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3381
                    fromArray:img bits.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3382
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3383
    newImage colorMap:newColorMap.  
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3384
    newImage fileName:img fileName.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3385
    newImage mask:(img mask copy).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3386
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3387
    (imageEditView image:newImage) notNil ifTrue:[
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3388
        listOfColors contents: newImage colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3389
        self findColorMapMode.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3390
        "/ mhmh - somehow, we get two colors added ... (sigh findColorMapMode adds another one ...)
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3391
        listOfColors size > (oldCListSize + 1) ifTrue:[
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3392
            listOfColors removeLast
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3393
        ].
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3394
        self selectionOfColor value:(listOfColors size).
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3395
        self updateLabelsAndHistory.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3396
    ]
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3397
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3398
    "Created: / 12.3.1999 / 00:20:28 / cg"
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3399
    "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
  3400
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3401
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3402
changeHLS
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3403
    "interactive Hue/Light/Saturation editing"
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3404
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3405
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3406
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema|
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3407
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  3408
    "/ compute the averageColor in the background (while asking user)
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3409
    readySema := Semaphore new.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3410
    [
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3411
        originalColormap := imageEditView image colorMap copy.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3412
        avgColor := imageEditView image averageColor.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3413
        readySema signal.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3414
    ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3415
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3416
    acceptChannel := TriggerValue new.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3417
    avgColorHolder := avgColor asValue.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3418
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3419
    firstChange := true.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3420
1651
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3421
    shiftedColor := [:clr :hShift :lFactor :sFactor |
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3422
                        Color 
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3423
                                hue:((clr hue) ? 0 + hShift) 
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3424
                                light:((clr light * lFactor / 100) min:100)
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3425
                                saturation:((clr saturation * sFactor / 100) min:100)].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3426
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3427
    shiftAction := 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3428
        [
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3429
            |hShift lFactor sFactor|
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3430
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3431
            acceptChannel value:true.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3432
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3433
            firstChange ifTrue:[
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3434
                imageEditView makeUndo.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3435
                firstChange := false.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3436
            ].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3437
            readySema notNil ifTrue:[readySema wait. readySema := nil].
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3438
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3439
            hShift := hueShift value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3440
            lFactor := lightValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3441
            sFactor := saturationValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3442
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3443
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3444
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3445
            shiftProcess notNil ifTrue:[
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3446
                shiftProcess terminate.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3447
                shiftProcess waitUntilTerminated.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3448
                shiftProcess := nil.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3449
            ].
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3450
            shiftProcess := 
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3451
                [
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3452
                    [
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3453
                        imageEditView image 
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3454
                            colorMap:originalColormap copy;
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3455
                            colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3456
                        self updateImage.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3457
                        self updateInfoLabel.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3458
                    ] ensure:[ shiftProcess := nil ].    
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3459
                ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3460
        ].
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3461
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3462
    bindings := IdentityDictionary new.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3463
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3464
    hueShift onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3465
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3466
    bindings at:#lightAmount put:(lightValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3467
    lightValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3468
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3469
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3470
    saturationValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3471
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3472
    bindings at:#acceptChannel put:acceptChannel.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3473
    bindings at:#hlsColor put:avgColorHolder.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3474
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3475
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3476
    ifFalse:[ 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3477
        firstChange ~~ true ifTrue:[
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3478
            imageEditView undo
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3479
        ]
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3480
    ].
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  3481
    self updateImage
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3482
!
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3483
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3484
clearMaskedPixels
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3485
    "clear all masked pixels (to pixelValue 0)"
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3486
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3487
    |newImage oldImage| 
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3488
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3489
    oldImage := self image.
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3490
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3491
    imageEditView makeUndo.
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3492
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3493
    self withExecuteCursorDo:[
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3494
        newImage := oldImage clearMaskedPixels.
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3495
        0 to:newImage height - 1 do:[:y |
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3496
            0 to:newImage width - 1 do:[:x |
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3497
                (newImage maskAtX:x y:y) == 0 ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3498
                    newImage pixelAtX:x y:y put:0
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3499
                ]
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3500
            ]
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3501
        ].
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3502
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3503
        (imageEditView image:newImage) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3504
            self fetchImageData.
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3505
        ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3506
    ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3507
!
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3508
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3509
colorMapChanged
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3510
    |img|
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3511
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3512
    img := self image.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3513
    img release.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3514
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3515
    self imageEditView invalidate.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3516
    self imagePreView invalidate.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3517
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3518
"/    (imageEditView image:img) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3519
"/        self updateLabelsAndHistory.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3520
"/        self imagePreView image:img
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3521
"/    ]
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3522
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3523
    "Created: / 7.8.1998 / 22:26:10 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3524
    "Modified: / 18.8.1998 / 17:08:55 / cg"
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3525
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3526
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3527
colorMapMode:aMode
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3528
    "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
  3529
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3530
    |depth numColors newColorMap newImage 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3531
     oldImage image newColors realColorMap oldFileName
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3532
     usedColors useNearest usageCounts tmpBits tmpMap quest
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3533
     prevMode maskThreshold maskImage| 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3534
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3535
    self withExecuteCursorDo:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3536
        oldImage := self image.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3537
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3538
        prevMode := colorMapMode value.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3539
        oldImage depth > 8 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3540
            prevMode := nil
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3541
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3542
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3543
        newColorMap := self class listOfColorMaps at:aMode.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3544
        depth       := (newColorMap size log: 2) asInteger. 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3545
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3546
        useNearest := false.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3547
        depth == 1 ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3548
            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
  3549
        ] ifFalse:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3550
            prevMode isNil ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3551
                quest := 'Compute colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3552
            ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3553
                quest := 'Keep colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3554
            ]
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3555
        ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3556
        ((prevMode = aMode)
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3557
        or:[depth > oldImage depth
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3558
        or:[self confirm:(resources string:quest)]]) ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3559
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3560
            "/ keep the colormap
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3561
            newColorMap atAllPut:Color black.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3562
            depth > oldImage depth ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3563
                "/ easy - simply copy the part
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3564
                numColors := 1 bitShift:oldImage depth.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3565
                0 to:numColors-1 do:[:pixel |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3566
                    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
  3567
                ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3568
            ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3569
                "/ see if all used color fit the new colormap
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3570
                usedColors := oldImage usedColorsMax:(1 bitShift:depth).
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3571
                (usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3572
                    usedColors := oldImage realUsedColors
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3573
                ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3574
                (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
  3575
                    "/ yea - just install them
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3576
                    usedColors asArray keysAndValuesDo:[:idx :clr |
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3577
                        newColorMap at:idx put:clr
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3578
                    ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3579
                ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3580
                    "/ copy over those that are most often used.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3581
                    oldImage depth < 8 ifTrue:[
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3582
                        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
  3583
                        oldImage bits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3584
                            expandPixels:(oldImage depth)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3585
                            width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3586
                            height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3587
                            into:tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3588
                            mapping:nil.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3589
                    ] ifFalse:[
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3590
                        oldImage depth == 8 ifTrue:[
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3591
                            tmpBits := oldImage bits
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3592
                        ] ifFalse:[
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3593
                            colorMapMode value:prevMode.
1471
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  3594
                            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
  3595
                            ^ self
1471
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  3596
"/                            (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
  3597
"/                            ifFalse:[.
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  3598
"/                                ^ self
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  3599
"/                            ].
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  3600
"/                            self image: (Image newForDepth:depth) fromImage:oldImage.
aa01951b16cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1460
diff changeset
  3601
"/                            ^ self.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3602
                        ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3603
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3604
                    usageCounts := tmpBits usageCounts.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3605
                    tmpMap := Array new:usageCounts size.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3606
                    oldImage colorMap asArray keysAndValuesDo:[:i :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3607
                        tmpMap at:i put:clr
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3608
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3609
                    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
  3610
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3611
                    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
  3612
                        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
  3613
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3614
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3615
                    useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3616
                                        confirmWithCancel:(resources 
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3617
                                                              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
  3618
                                                              with:usedColors size
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3619
                                                              with:(1 bitShift:depth)) withCRs
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3620
                                        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
  3621
                    useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3622
                        colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3623
                        ^ self   "/ cancel
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3624
                    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3625
                ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3626
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3627
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3628
            "/ standard colormap
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3629
            usedColors := oldImage usedColors.
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3630
            (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
  3631
                useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3632
                                    confirmWithCancel:(resources 
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3633
                                                           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
  3634
                                                       ) withCRs
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3635
                                    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
  3636
                useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3637
                    colorMapMode value:prevMode.
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3638
                    ^ self   "/ cancel
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3639
                ].
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3640
            ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3641
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3642
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3643
        imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3644
1424
d7367ae7f85e fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
  3645
        newImage    := Image newForDepth:depth.
d7367ae7f85e fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
  3646
        newImage depth:depth.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3647
        oldFileName := oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3648
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3649
        Image imageErrorSignal handle:[:ex|
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3650
            Color colorErrorSignal handle:[:ex|
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3651
                colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3652
                imageEditView undo.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3653
                ^ self warn:(resources string:'Conversion failed !!')
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3654
            ] do:[
1393
c4a11a7d407f use Image>>newForDepth:
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  3655
                newImage := Image newForDepth:depth.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3656
                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
  3657
                newImage colorMap:newColorMap.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3658
                newImage photometric:#palette.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3659
                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
  3660
            
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3661
                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
  3662
                [:x :y :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3663
                    |newColor|
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3664
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3665
                    (newColorMap includes:clr)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3666
                        ifTrue: [newColor := clr]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3667
                        ifFalse: [
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3668
                            newColor := clr nearestIn:newColorMap.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3669
                            useNearest ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3670
                                (newColor deltaFrom:clr) > 0.5 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3671
                                    newColor := oldImage colorFromValue:0
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3672
                                ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3673
                            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3674
                        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3675
                    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
  3676
                ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3677
                image := newImage
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3678
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3679
        ] do:[ 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3680
            image := newImage fromImage:oldImage
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3681
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3682
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3683
        (aMode asString endsWith:'mask') ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3684
            image mask isNil ifTrue:[
1776
0f340ebe25d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1774
diff changeset
  3685
                (Dialog confirm:'Generate mask from black ?' default:false) ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3686
                    maskThreshold := 0.1.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3687
                    maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3688
                ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3689
                    maskImage := Depth1Image extent:image extent.
1770
9000adb21f79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1769
diff changeset
  3690
                    maskImage bits:(ByteArray 
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3691
                                        new:(maskImage bytesPerRow * maskImage height)
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3692
                                        withAll:16rFF).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3693
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3694
"/                    maskImage fillRectangle:(image bounds) withColor:(Color colorId:1).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3695
                ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3696
                image mask:maskImage.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3697
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3698
        ] ifFalse:[ 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3699
            image mask: nil.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3700
        ]. 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3701
        realColorMap := OrderedCollection new.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3702
        image realColorMap do:[:clr|
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3703
            (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
  3704
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3705
        newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size).
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3706
        newColorMap do:[:clr|
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3707
            ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3708
            ifTrue:[      
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3709
                newColors add: clr
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3710
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3711
        ].                  
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3712
        image colorMap: newColors.   
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3713
        image fileName: oldFileName.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3714
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3715
        (imageEditView image: image) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3716
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3717
"/            self listOfColors contents: image colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3718
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3719
"/            self updateLabelsAndHistory.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3720
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3721
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3722
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3723
    "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
  3724
!
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3725
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3726
compressColorMap
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3727
    "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
  3728
927
74a71f2c5ef8 obsolete locals removed
tz
parents: 926
diff changeset
  3729
    |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
  3730
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3731
    oldImage := self image.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3732
    depth := oldImage depth.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3733
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3734
    oldImage photometric ~~ #palette ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3735
        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
  3736
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3737
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3738
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3739
    usedColors := oldImage realUsedColors.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3740
    usedColors size == (1 bitShift:depth) ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3741
        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
  3742
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3743
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3744
    usedColors size == oldImage colorMap size ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3745
        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
  3746
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3747
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3748
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3749
    imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3750
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3751
    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
  3752
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3753
    self withExecuteCursorDo:[
996
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3754
"/        newColorMap := Array new:usedColors size.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3755
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3756
        "/ translation table
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3757
        oldToNew := ByteArray new:(1 bitShift:depth).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3758
        newColorMap := usedColors asArray.
996
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3759
        newColorMap sort:[:a :b |
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3760
                                a redByte == b redByte ifTrue:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3761
                                    a greenByte == b greenByte ifTrue:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3762
                                        a blueByte < b blueByte
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3763
                                    ] ifFalse:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3764
                                        a greenByte < b greenByte 
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3765
                                    ]
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3766
                                ] ifFalse:[
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3767
                                    a redByte < b redByte 
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3768
                                ]
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3769
                          ].
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  3770
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3771
        oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3772
            |newPixel|
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3773
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3774
            (usedColors includes:clr) ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3775
                newPixel := newColorMap indexOf:clr.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3776
                oldToNew at:oldIdx put:newPixel-1.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3777
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3778
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3779
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3780
        oldBits := oldImage bits.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3781
        newBits := ByteArray new:(oldBits size).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3782
        depth ~~ 8 ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3783
            "/ expand/compress can only handle 8bits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3784
            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
  3785
            oldBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3786
                expandPixels:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3787
                width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3788
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3789
                into:tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3790
                mapping:oldToNew.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3791
            tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3792
                compressPixels:depth 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3793
                width:oldImage width 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3794
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3795
                into:newBits 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3796
                mapping:nil
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3797
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3798
            oldBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3799
                expandPixels:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3800
                width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3801
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3802
                into:newBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3803
                mapping:oldToNew.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3804
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3805
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3806
        newImage := oldImage species new
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3807
                        width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3808
                        height:oldImage height
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3809
                        depth:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3810
                        fromArray:newBits.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3811
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3812
        newImage colorMap:newColorMap.  
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3813
        newImage fileName:oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3814
        newImage mask:(oldImage mask copy).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3815
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3816
        (imageEditView image:newImage) notNil ifTrue:
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3817
        [
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3818
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3819
"/            self listOfColors contents: newImage colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3820
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3821
"/            self updateLabelsAndHistory.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3822
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3823
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3824
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3825
    "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
  3826
    "Modified: / 15.9.1998 / 17:53:32 / cg"
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3827
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3828
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3829
copyMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3830
    |mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3831
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3832
    mask := self image mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3833
    MaskClipboard := mask subImageIn: (0@0 extent:mask extent).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3834
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3835
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3836
fetchImageData
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3837
    |image|
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3838
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3839
    (image := imageEditView image) notNil ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3840
        self listOfColors contents:(image colorMap).
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3841
        self findColorMapMode.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3842
        self updateLabelsAndHistory.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3843
    ]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3844
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3845
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3846
inspectColor
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3847
    |clrIndex|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3848
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3849
    clrIndex := self selectedColorIndexOrNil.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3850
    clrIndex isNil ifTrue:[
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3851
        ^ self
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3852
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3853
    (self image colorFromValue:clrIndex-1) inspect
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3854
!
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  3855
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3856
makeBrighter
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3857
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3858
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3859
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3860
        anyChange := imageEditView makeBrighter.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3861
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3862
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3863
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3864
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3865
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3866
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3867
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3868
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3869
makeDarker
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3870
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3871
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3872
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3873
        anyChange := imageEditView makeDarker.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3874
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3875
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3876
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3877
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3878
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3879
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3880
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3881
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3882
makeGrayScale
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3883
    |anyChange|
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3884
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3885
    self withExecuteCursorDo:[
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3886
        anyChange := imageEditView makeGrayScale.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3887
        anyChange ifFalse:[
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3888
            Dialog warn:'Image unchanged'.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3889
        ] ifTrue:[
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3890
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3891
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3892
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3893
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3894
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3895
makeInverse
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3896
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3897
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3898
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3899
        anyChange := imageEditView makeInverse.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3900
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3901
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3902
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3903
            self updateImage.
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3904
        ]
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3905
    ].
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3906
!
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3907
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3908
makeSelectedColorBrighter
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3909
    self processSelectedColorWith:[:clr | clr lightened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3910
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3911
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3912
makeSelectedColorDarker
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3913
    self processSelectedColorWith:[:clr | clr darkened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3914
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3915
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3916
pasteMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3917
    |img mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3918
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3919
    imageEditView makeUndo.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3920
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3921
    img := self image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3922
    mask := img mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3923
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3924
    mask 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3925
         copyFrom:MaskClipboard
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3926
         x:0 y:0
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3927
         toX:0 y:0 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3928
         width:(mask width min:MaskClipboard width)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3929
         height:(mask height min:MaskClipboard height).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3930
    img mask:mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3931
    (imageEditView image:img copy) notNil ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3932
        self fetchImageData.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3933
    ]
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3934
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  3935
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3936
pickAndAddColorToColormap
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3937
    self addColorToColormap:(Color fromUser)
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3938
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3939
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3940
processSelectedColorWith:aBlock
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3941
    |img cMap clr newImage selectedColorIndex oldSelection|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3942
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3943
    selectedColorIndex := self selectedColorIndexOrNil.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3944
    selectedColorIndex isNil ifTrue:[^ self].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3945
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3946
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3947
    cMap := img colorMap.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3948
    cMap isNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3949
        self warn:'Image has no colormap\change colorMap mode first.' withCRs.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3950
        ^ self
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3951
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3952
    imageEditView makeUndo.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3953
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3954
    cMap := cMap asArray.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3955
    clr := cMap at:selectedColorIndex.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3956
    cMap at:selectedColorIndex put:(aBlock value:clr).
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3957
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3958
    newImage := img species new
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3959
                    width:img width
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3960
                    height:img height
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3961
                    depth:nil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3962
                    fromArray:img bits.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3963
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3964
    newImage colorMap:cMap.  
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3965
    newImage fileName:img fileName.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3966
    newImage mask:(img mask copy).
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3967
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3968
    oldSelection := self selectionOfColor value.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3969
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3970
    (imageEditView image:newImage) notNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3971
        self fetchImageData.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3972
"/        self listOfColors contents: newImage colorMap.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3973
"/        self findColorMapMode.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3974
"/        self updateLabelsAndHistory.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3975
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3976
    self selectionOfColor value:oldSelection.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3977
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3978
    "Created: / 12.3.1999 / 00:20:28 / cg"
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3979
    "Modified: / 16.3.1999 / 21:57:26 / cg"
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3980
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3981
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3982
reduceNumberOfColors
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  3983
    |s n anyChange img usedColors|
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3984
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3985
    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
  3986
    s size == 0 ifTrue:[^ self].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3987
    n := Integer readFrom:s onError:0.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3988
    (n between:1 and:7) ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3989
        Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3990
        ^ self
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3991
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3992
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3993
    self withExecuteCursorDo:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3994
        anyChange := imageEditView reduceColorResolutionBy:n.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3995
        anyChange ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3996
            Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3997
        ] ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3998
            img := imageEditView image.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3999
            imageEditView image:img.
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4000
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4001
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4002
"/            self listOfColors contents:(img colorMap).
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4003
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4004
"/            self updateLabelsAndHistory.
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4005
            usedColors := img usedColorsMax:10000.
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4006
            usedColors size == 10000 ifTrue:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4007
                Dialog information:('>= ' , usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4008
            ] ifFalse:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4009
                Dialog information:(usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4010
            ]
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4011
        ]
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4012
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4013
!
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4014
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4015
selectedColorIndexOrNil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4016
    | img clrIndex|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4017
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4018
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4019
    img isNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4020
        self warn:'No Image.'.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4021
        ^ nil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4022
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4023
    clrIndex := self selectionOfColor value.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4024
    img mask notNil ifTrue: [ clrIndex := clrIndex - 1 ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4025
    ^ clrIndex
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4026
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4027
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4028
sortColorMap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4029
    "calculates a new color map for the image, sorting colors"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4030
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4031
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4032
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4033
    oldImage := self image.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4034
    depth := oldImage depth.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4035
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4036
    oldImage photometric ~~ #palette ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4037
        self information:'Compress colorMap: Only palette images have colormaps.'.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4038
        ^ self
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4039
    ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4040
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4041
    usedColors := oldImage realColorMap.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4042
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4043
    imageEditView makeUndo.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4044
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4045
    self withExecuteCursorDo:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4046
"/        newColorMap := Array new:usedColors size.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4047
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4048
        "/ translation table
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4049
        oldToNew := ByteArray new:(1 bitShift:depth).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4050
        newColorMap := usedColors asArray.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4051
        newColorMap sort:[:a :b |
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4052
                                a redByte == b redByte ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4053
                                    a greenByte == b greenByte ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4054
                                        a blueByte < b blueByte
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4055
                                    ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4056
                                        a greenByte < b greenByte 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4057
                                    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4058
                                ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4059
                                    a redByte < b redByte 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4060
                                ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4061
                          ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4062
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4063
        oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4064
            |newPixel|
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4065
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4066
            (usedColors includes:clr) ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4067
                newPixel := newColorMap indexOf:clr.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4068
                oldToNew at:oldIdx put:newPixel-1.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4069
            ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4070
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4071
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4072
        oldBits := oldImage bits.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4073
        newBits := ByteArray new:(oldBits size).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4074
        depth ~~ 8 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4075
            "/ expand/compress can only handle 8bits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4076
            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4077
            oldBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4078
                expandPixels:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4079
                width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4080
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4081
                into:tmpBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4082
                mapping:oldToNew.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4083
            tmpBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4084
                compressPixels:depth 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4085
                width:oldImage width 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4086
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4087
                into:newBits 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4088
                mapping:nil
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4089
        ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4090
            oldBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4091
                expandPixels:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4092
                width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4093
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4094
                into:newBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4095
                mapping:oldToNew.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4096
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4097
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4098
        newImage := oldImage species new
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4099
                        width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4100
                        height:oldImage height
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4101
                        depth:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4102
                        fromArray:newBits.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4103
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4104
        newImage colorMap:newColorMap.  
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4105
        newImage fileName:oldImage fileName.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4106
        newImage mask:(oldImage mask copy).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4107
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4108
        (imageEditView image:newImage) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4109
            self fetchImageData.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4110
"/            self listOfColors contents: newImage colorMap.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4111
"/            self findColorMapMode.
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4112
"/            self updateLabelsAndHistory.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4113
        ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4114
    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4115
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4116
    "Modified: / 15.9.1998 / 17:53:32 / cg"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4117
    "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
  4118
! !
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4119
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  4120
!ImageEditor methodsFor:'user actions-editing'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4121
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4122
doBrowseClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4123
    "opens a System Browser on the resourceClass and the resourceSelector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4124
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4125
    |cls|
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4126
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4127
    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
  4128
    cls isNil ifTrue:[^ self warn:'No Class specified'].
1488
cb1867473e3e UserPreference access
Claus Gittinger <cg@exept.de>
parents: 1481
diff changeset
  4129
    UserPreferences systemBrowserClass
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4130
        openInClass:cls class 
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4131
        selector:(imageEditView resourceSelector)
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4132
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4133
    "Modified: / 31.7.1998 / 02:01:15 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4134
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4135
1703
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4136
doCopyImageToClipboard
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4137
    imageEditView copyImageToClipboard.
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4138
!
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4139
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4140
doCropAll
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4141
    "find all borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4142
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4143
    imageEditView cropLeft:true right:true top:true bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4144
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4145
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4146
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4147
    "Created: / 7.9.1998 / 16:33:43 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4148
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4149
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4150
doCropBottom
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4151
    "find a bottom border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4152
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4153
    imageEditView cropLeft:false right:false top:false bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4154
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4155
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4156
    "Created: / 7.9.1998 / 13:00:20 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4157
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4158
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4159
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4160
doCropLeft
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4161
    "find a left border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4162
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4163
    imageEditView cropLeft:true right:false top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4164
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4165
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4166
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4167
    "Modified: / 7.9.1998 / 14:26:34 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4168
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4169
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4170
doCropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4171
    "let user specify borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4172
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4173
    |bindings left top right bottom img firstChange gropAction acceptChannel|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4174
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4175
    acceptChannel := TriggerValue new.
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4176
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4177
    firstChange := true.
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4178
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4179
    gropAction := 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4180
        [:lV :rV :tV :bV | |l r t b|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4181
            acceptChannel value:true.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4182
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4183
            l := lV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4184
            r := rV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4185
            t := tV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4186
            b := bV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4187
            (l + r + t + b) == 0 ifTrue:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4188
                Screen current beep
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4189
            ] ifFalse:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4190
                img := imageEditView image.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4191
                firstChange ifTrue:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4192
                    imageEditView makeUndo.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4193
                    firstChange := false.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4194
                ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4195
                imageEditView
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4196
                    makeSubImageX:l y:t 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4197
                    width:(img width - l - r)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4198
                    height:(img height - t - b).
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4199
                self updateInfoLabel
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4200
            ].
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4201
        ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4202
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4203
    bindings := IdentityDictionary new.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4204
    bindings at:#left put:(left := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4205
    bindings at:#right put:(right := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4206
    bindings at:#top put:(top := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4207
    bindings at:#bottom put:(bottom := 1 asValue).
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4208
    bindings at:#acceptChannel put:acceptChannel.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4209
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4210
    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
  4211
    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
  4212
    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
  4213
    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
  4214
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4215
    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
  4216
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  4217
    (self openDialogInterface:#cropDialogSpec withBindings:bindings) 
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4218
    ifFalse:[ 
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4219
        firstChange ~~ true ifTrue:[
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4220
            imageEditView undo.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4221
            self updateImagePreView.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4222
        ]
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4223
    ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4224
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4225
    "Created: / 7.9.1998 / 18:16:07 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4226
    "Modified: / 7.9.1998 / 18:20:42 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4227
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4228
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4229
doCropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4230
    "find a right border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4231
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4232
    imageEditView cropLeft:false right:true top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4233
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4234
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4235
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4236
    "Modified: / 7.9.1998 / 14:26:44 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4237
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4238
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4239
doCropTop
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4240
    "find a top border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4241
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4242
    imageEditView cropLeft:false right:false top:true bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4243
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4244
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4245
    "Created: / 7.9.1998 / 13:00:19 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4246
    "Modified: / 7.9.1998 / 14:26:52 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4247
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4248
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4249
doEditMask
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4250
    ""
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4251
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4252
    self image mask edit
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4253
!
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4254
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4255
doFlipHorizontal
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4256
    "flips horizontally current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4257
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4258
    imageEditView flipHorizontal
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4259
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4260
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4261
doFlipVertical
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4262
    "flips vertically current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4263
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4264
    imageEditView flipVertical
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4265
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4266
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4267
doMagnifyDown
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4268
    "magnifies current image one step down"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4269
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4270
    |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
  4271
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4272
    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
  4273
    (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
  4274
        magHolder value: mag - 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4275
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4276
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4277
    "Modified: / 26.7.1998 / 20:24:08 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4278
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4279
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4280
doMagnifyImage
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4281
    "magnifies the current image to a new size"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4282
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4283
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4284
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4285
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4286
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4287
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4288
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4289
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4290
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4291
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4292
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4293
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4294
    and: [(newSize := Object readFromString:(box contents) onError:nil) notNil])
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4295
    ifTrue:[
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4296
        newSize isPoint ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4297
            self warn:'please enter the new size as ''x @ y''.'.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4298
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4299
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4300
        imageEditView magnifyImageTo:newSize.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4301
    ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4302
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4303
    self updateInfoLabel
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4304
!
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4305
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4306
doMagnifyImageBy
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4307
    "magnifies the current image (by a scale)"
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4308
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4309
    |box oldSize newSize scale image|
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4310
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4311
    image := imageEditView image.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4312
    oldSize := image extent.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4313
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4314
    box := EnterBox new.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4315
    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
  4316
    box okText:(resources string:'OK').
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4317
    box abortText:(resources string:'Cancel').
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4318
    box initialText:1 printString.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4319
    box showAtPointer.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4320
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4321
    (box accepted 
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4322
    and: [(scale := Object readFromString:(box contents) onError:nil) notNil])
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4323
    ifTrue:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4324
        scale isNumber ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4325
            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
  4326
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4327
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4328
        newSize := oldSize * scale.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4329
        imageEditView magnifyImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4330
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4331
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4332
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  4333
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4334
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4335
doMagnifyUp
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4336
    "magnifies current image one step up"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4337
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4338
    |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
  4339
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4340
    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
  4341
    (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
  4342
        magHolder value: mag + 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4343
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4344
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4345
    "Modified: / 26.7.1998 / 20:23:52 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4346
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4347
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4348
doNegativeImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4349
    "negates current image by negating the color map"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4350
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4351
    self image depth ~~ 1 ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4352
        Dialog warn:'Only useful for depth 1 images'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4353
        ^ self
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4354
    ].
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4355
    imageEditView negativeImage.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4356
    self listOfColors removeAll.
901
ce482227787d several undos
tz
parents: 900
diff changeset
  4357
    self findColorMapMode.     
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4358
    imageEditView undoImages removeLast
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4359
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4360
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4361
doResizeImage
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4362
    "resizes the current image"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4363
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4364
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4365
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4366
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4367
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4368
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4369
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4370
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4371
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4372
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4373
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4374
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4375
    and: [(newSize := Object readFromString:(box contents) onError:nil) notNil])
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4376
    ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4377
        imageEditView resizeImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4378
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4379
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4380
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4381
doRotateImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4382
    "rotates current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4383
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4384
    |box rotation|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4385
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4386
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4387
    box title:(resources string:'Rotate by (degrees, clockwise):').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4388
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4389
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4390
    box initialText: '0'.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4391
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4392
    (box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil])
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4393
    ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4394
        imageEditView rotateImageBy:rotation.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4395
        self updateInfoLabel.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4396
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4397
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4398
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4399
doShiftManual
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4400
    "let user specify amount and shift"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4401
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  4402
    |bindings amount img firstChange shiftAction acceptChannel wrapHolder|
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4403
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4404
    acceptChannel := TriggerValue new.
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  4405
    wrapHolder := false asValue.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4406
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4407
    firstChange := true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4408
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4409
    shiftAction := 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4410
        [:shiftH :shiftV | 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4411
            acceptChannel value:true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4412
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4413
            img := imageEditView image.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4414
            firstChange ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4415
                imageEditView makeUndo.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4416
                firstChange := false.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4417
            ].
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  4418
            imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value).
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4419
            self updateInfoLabel
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4420
        ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4421
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4422
    bindings := IdentityDictionary new.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4423
    bindings at:#shiftAmount put:(amount := 1 asValue).
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  4424
    bindings at:#wrap put:wrapHolder.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4425
    bindings at:#acceptChannel put:acceptChannel.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4426
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4427
    bindings at:#shiftLeftNow   put:[ shiftAction value:(-1*amount value) value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4428
    bindings at:#shiftRightNow  put:[ shiftAction value:amount value value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4429
    bindings at:#shiftUpNow     put:[ shiftAction value:0 value:(-1*amount value) ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4430
    bindings at:#shiftDownNow   put:[ shiftAction value:0 value:amount value ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4431
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4432
    (self openDialogInterface:#shiftDialogSpec withBindings:bindings) 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4433
    ifFalse:[ 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4434
        firstChange ~~ true ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4435
          imageEditView undo
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4436
        ]
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4437
    ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4438
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4439
    "Created: / 7.9.1998 / 18:16:07 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4440
    "Modified: / 7.9.1998 / 18:20:42 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4441
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4442
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4443
doUnCropManual
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4444
    "let user specify borders and add them"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4445
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4446
    |bindings left top right bottom img|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4447
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4448
    bindings := IdentityDictionary new.
1704
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4449
    bindings at:#left put:(left := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4450
    bindings at:#right put:(right := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4451
    bindings at:#top put:(top := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4452
    bindings at:#bottom put:(bottom := 1 asValue).
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  4453
    (self openDialogInterface:#uncropDialogSpec withBindings:bindings)
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4454
    ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4455
        left := left value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4456
        right := right value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4457
        top := top value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4458
        bottom := bottom value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4459
        img := imageEditView image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4460
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4461
        imageEditView
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4462
            makeBorderedImageX:left y:top 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4463
            width:(img width + left + right)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4464
            height:(img height + top + bottom).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4465
        self updateInfoLabel
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4466
    ].
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4467
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4468
    "Created: / 7.9.1998 / 18:16:07 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4469
    "Modified: / 7.9.1998 / 18:20:42 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4470
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4471
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4472
doUndo
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4473
    "reverses last edit action"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4474
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4475
    imageEditView undo.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4476
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4477
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  4478
!ImageEditor methodsFor:'user actions-loading'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4479
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4480
doLoadFromClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4481
    "opens a dialog for loading an image from class and a (resource-) selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4482
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4483
    |img|
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4484
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4485
    (imageEditView loadFromClass) notNil ifTrue:[
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4486
        imageSeqNr := nil.
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4487
        (img := self image) notNil ifTrue: [
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4488
            self listOfColors contents: img usedColors asSet asOrderedCollection.
574
8d82e8f101c1 undo disabling
tz
parents: 573
diff changeset
  4489
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4490
            self updateLabelsAndHistory.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4491
        ] ifFalse: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4492
            self updateForNoImage
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4493
        ].
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  4494
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4495
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4496
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4497
doLoadFromFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4498
    "opens a dialog for loading an image from a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4499
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4500
    |img file dir filters|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4501
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4502
    imageSeqNr := nil.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4503
    img := self image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4504
    img notNil ifTrue: [
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4505
        file := img fileName
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4506
    ] ifFalse:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4507
        dir := LastDirectory
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4508
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4509
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4510
    filters := FileSelectionBrowser loadImageFileNameFilters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4511
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4512
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4513
        file := FileSelectionBrowser
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4514
                    request:'Load Image From'
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4515
                    fileName:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4516
                    withFileFilters:filters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4517
    ] ifFalse:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4518
        file := FileSelectionBrowser
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4519
                    request:'Load Image From'
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4520
                    inDirectory:dir
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4521
                    withFileFilters:filters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4522
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4523
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4524
        LastDirectory := file asFilename directoryName.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4525
        self loadFromFile:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4526
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4527
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4528
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4529
doNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4530
    "opens a dialog with choices of size and color map for creating a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4531
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4532
    |aspects width height cMapString cMap imageClass image szString|
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4533
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4534
    aspects  := IdentityDictionary new
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4535
        at:#listOfSizes         put: self class listOfDefaultSizes asValue;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4536
        at:#listOfColorMaps     put: self class listOfColorMaps keys asSortedCollection asValue;
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4537
        at:#selectionOfSize     put: (LastSizeString ? self class listOfDefaultSizes first copy) asValue;
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4538
        at:#selectionOfColorMap put: (LastColormapMode ? self class listOfColorMaps keys asSortedCollection first) asValue;
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4539
        yourself.
228524287573 intitial checkin
tz
parents:
diff changeset
  4540
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4541
    (self openDialogInterface:#dialogSpecForNewImage withBindings:aspects)
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4542
    ifTrue:[
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4543
        szString := (aspects at:#selectionOfSize) value.
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4544
        width  := 128 min: (Integer readFromString: (szString upTo: $x) onError:[24]).
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4545
        height := 128 min: (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[24]).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4546
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4547
        cMapString := (aspects at:#selectionOfColorMap) value.
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4548
        cMap       := (self class listOfColorMaps at: (colorMapMode value: (aspects at:#selectionOfColorMap) value) value).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4549
        imageClass := Image implementorForDepth: ((cMap size log: 2) asInteger).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4550
        image      := imageClass width: width height: height fromArray: (ByteArray new: width*height).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4551
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4552
        LastSizeString := szString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4553
        LastColormapMode := cMapString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4554
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4555
        (colorMapMode value endsWith: 'mask')
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4556
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  4557
        [
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4558
            image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4559
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  4560
        image colorMap: cMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  4561
        image fillRectangleX:0 y:0 width:width height:height with:Color white.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4562
        (imageEditView image: image) notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4563
        ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  4564
        [
228524287573 intitial checkin
tz
parents:
diff changeset
  4565
            self listOfColors contents: cMap.
228524287573 intitial checkin
tz
parents:
diff changeset
  4566
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4567
            self updateLabelsAndHistory.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4568
        ]
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4569
    ]
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4570
!
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4571
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4572
doNewImageFromClipboard
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4573
    |image|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4574
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4575
    image := imageEditView clipBoard.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4576
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4577
    (imageEditView image:image) notNil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4578
    ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4579
        self listOfColors contents:(image colorMap).
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4580
        self findColorMapMode.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4581
        self updateLabelsAndHistory.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4582
    ]
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4583
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4584
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4585
grabScreenImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4586
    "let user choose an area and grab that are for editing"
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4587
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  4588
    Processor 
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  4589
        addTimedBlock:[
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  4590
            |image d8image img|
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4591
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4592
            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
  4593
            image := Image fromUser.
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4594
            image isNil ifFalse:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4595
                image depth > 8 ifTrue:[
1687
f4543a556b89 Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 1682
diff changeset
  4596
                    Error handle:[:ex | |sig|
1537
e86a686eeba2 class based exceptions - no longer need to send #haltSígnal
Claus Gittinger <cg@exept.de>
parents: 1507
diff changeset
  4597
                        (sig := ex signal) == HaltInterrupt ifTrue:[ex reject].
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4598
                        sig == Signal noHandlerSignal ifTrue:[ex reject].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4599
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4600
                        self warn:'Could not convert to depth8 image (too many colors)'.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4601
                        d8image := nil.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4602
                    ] do:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4603
                        d8image := Depth8Image new.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4604
                        d8image fromImage:image.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4605
                    ].
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4606
                    d8image notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4607
                        image := d8image
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4608
                    ]
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  4609
                ].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4610
                (imageEditView image:image) notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4611
                    self listOfColors contents:(image colorMap).
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4612
                    self findColorMapMode.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4613
                    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
  4614
                ]
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4615
             ] 
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  4616
        ] 
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  4617
        afterSeconds:1
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4618
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  4619
    "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
  4620
    "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
  4621
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4622
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4623
nextImageInSequence
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4624
    "display the next image in the image sequence"
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4625
    |img seq frame listOfColors|
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4626
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4627
    imageEditView releaseUndos.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4628
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4629
    seq := self image imageSequence.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4630
    imageSeqNr isNil ifTrue:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4631
        imageSeqNr := 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4632
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4633
    imageSeqNr := imageSeqNr + 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4634
    imageSeqNr > seq size ifTrue:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4635
        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
  4636
        imageSeqNr := 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4637
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4638
    frame := seq at:imageSeqNr.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4639
    imageEditView image:(frame image).
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4640
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4641
    (img := self image) notNil ifTrue:[          
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4642
        listOfColors := self listOfColors.
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4643
        img colorMap notNil ifTrue:[
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4644
            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
  4645
        ] ifFalse:[
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4646
            listOfColors removeAll.
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4647
        ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4648
        self findColorMapMode.     
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4649
        self updateLabelsAndHistory.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4650
        img := img onDevice:device.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4651
        imageEditView image:img.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4652
    ] ifFalse:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4653
        self updateForNoImage
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4654
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4655
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4656
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4657
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  4658
!ImageEditor methodsFor:'user actions-saving'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4659
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4660
doPrint
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4661
    "prints current image on the current printer"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4662
1734
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4663
    self withWaitCursorDo:[
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4664
        imageEditView print
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4665
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4666
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4667
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  4668
doSaveButtonImageToFileAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  4669
    "opens a dialog for saving current image to a file"
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  4670
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  4671
    imageEditView saveButtonImageToFileAs.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  4672
    self updateLabelsAndHistory.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  4673
!
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  4674
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4675
doSaveImageFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4676
    "saves current image to current file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4677
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  4678
    imageEditView save.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4679
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4680
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4681
doSaveImageFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4682
    "opens a dialog for saving current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4683
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4684
    imageEditView saveImageFileAs.
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  4685
    self updateLabelsAndHistory.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4686
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4687
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4688
doSaveImageMaskFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4689
    "opens a dialog for saving mask of current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4690
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  4691
    imageEditView saveImageMaskFileAs.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4692
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4693
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4694
doSaveMethod
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4695
    "saves current image on current class and selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4696
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4697
    imageEditView saveMethod notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4698
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  4699
    [
694
88c7004cfb6c updateLabelsAndHistory
tz
parents: 688
diff changeset
  4700
        self updateLabelsAndHistory
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4701
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  4702
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4703
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4704
doSaveMethodAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4705
    "opens a dialog for saving current image on a class and a selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4706
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4707
    imageEditView saveMethodAs notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4708
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  4709
    [
694
88c7004cfb6c updateLabelsAndHistory
tz
parents: 688
diff changeset
  4710
        self updateLabelsAndHistory
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4711
    ]
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4712
!
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4713
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4714
doShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4715
    "opens a dialog showing the storeString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4716
     (sometimes useful to embed an image into source code)"
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4717
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4718
    |img|
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4719
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4720
    img := imageEditView image.
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  4721
    TextBox openOn:img storeString
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4722
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4723
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  4724
!ImageEditor methodsFor:'user actions-settings'!
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4725
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4726
doChangeGridMagnification
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4727
    "change grid magnification"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4728
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4729
    |box oldGridLimit newGridLimit|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4730
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4731
    oldGridLimit := imageEditView class gridMagnificationLimit asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4732
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4733
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4734
    box title:(resources string:'Grid Magnification Limit:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4735
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4736
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4737
    box initialText:(oldGridLimit x printString).
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4738
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4739
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4740
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4741
    and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4742
    ) ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4743
        newGridLimit := (99 min: (2 max:newGridLimit)) asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4744
        imageEditView class gridMagnificationLimit:newGridLimit.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4745
        imageEditView invalidate
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4746
    ]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4747
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4748
! !
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4749
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4750
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
  4751
228524287573 intitial checkin
tz
parents:
diff changeset
  4752
version
228524287573 intitial checkin
tz
parents:
diff changeset
  4753
    ^ '$Header$'
228524287573 intitial checkin
tz
parents:
diff changeset
  4754
! !