ImageEditor.st
author Claus Gittinger <cg@exept.de>
Fri, 10 Feb 2006 16:19:25 +0100
changeset 1967 c95484b7da49
parent 1966 274324851cfd
child 1969 f1763f6f4500
permissions -rw-r--r--
some code cleanup
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
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
    17
		selectedColorIndex postOpenAction imageSeqNr drawingColormap
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
    18
		lastShiftUsedWrap'
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
    19
	classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
    20
		DefaultRelativeSizes'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    21
	poolDictionaries:''
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    22
	category:'Interface-UIPainter'
400
228524287573 intitial checkin
tz
parents:
diff changeset
    23
!
228524287573 intitial checkin
tz
parents:
diff changeset
    24
228524287573 intitial checkin
tz
parents:
diff changeset
    25
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    26
228524287573 intitial checkin
tz
parents:
diff changeset
    27
copyright
228524287573 intitial checkin
tz
parents:
diff changeset
    28
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    29
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    30
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
    31
228524287573 intitial checkin
tz
parents:
diff changeset
    32
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
    33
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    34
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    35
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    36
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    37
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    38
"
228524287573 intitial checkin
tz
parents:
diff changeset
    39
!
228524287573 intitial checkin
tz
parents:
diff changeset
    40
228524287573 intitial checkin
tz
parents:
diff changeset
    41
documentation
228524287573 intitial checkin
tz
parents:
diff changeset
    42
"
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
    43
    Image Editor allows you to create, design, modify or just inspect images.
400
228524287573 intitial checkin
tz
parents:
diff changeset
    44
228524287573 intitial checkin
tz
parents:
diff changeset
    45
    [start with:]
228524287573 intitial checkin
tz
parents:
diff changeset
    46
        ImageEditor open
941
6d75430a8120 fixed start call in docu
tz
parents: 937
diff changeset
    47
        ImageEditor openOnClass:Icon andSelector:#startIcon
400
228524287573 intitial checkin
tz
parents:
diff changeset
    48
228524287573 intitial checkin
tz
parents:
diff changeset
    49
    [see also:]
228524287573 intitial checkin
tz
parents:
diff changeset
    50
        ImageEditView Image
228524287573 intitial checkin
tz
parents:
diff changeset
    51
228524287573 intitial checkin
tz
parents:
diff changeset
    52
    [author:]
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
    53
        Thomas Zwick, eXept Software AG
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
    54
        Claus Gittinger, eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    55
"
228524287573 intitial checkin
tz
parents:
diff changeset
    56
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    57
228524287573 intitial checkin
tz
parents:
diff changeset
    58
!ImageEditor class methodsFor:'instance creation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    59
228524287573 intitial checkin
tz
parents:
diff changeset
    60
openModalOnClass: aClass andSelector: aSelector
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    61
    "opens a modal Image Editor on aClass and aSelector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
    62
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    63
    |imageEditor imageEditView className resourceClassName resourceSelector| 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    64
400
228524287573 intitial checkin
tz
parents:
diff changeset
    65
    imageEditor := self new.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    66
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    67
    aClass isClass  ifTrue: [className := aClass name].
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    68
    aClass isString ifTrue: [className := aClass].      
903
63203d996e61 openModal bug fixed
tz
parents: 901
diff changeset
    69
    aClass isNil    ifTrue: [className := ''].      
400
228524287573 intitial checkin
tz
parents:
diff changeset
    70
688
788fe83ab3c0 time clock removed
tz
parents: 679
diff changeset
    71
    imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector].
400
228524287573 intitial checkin
tz
parents:
diff changeset
    72
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
    73
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
    74
    resourceClassName := imageEditView resourceClass name.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    75
    resourceSelector  := imageEditView resourceSelector.
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    76
815
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    77
    ((className asString ~= resourceClassName) 
b2b9356a648c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
    78
    or:[aSelector asString ~= resourceSelector])
415
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    79
        ifTrue: [^resourceClassName, ' ', resourceSelector]
f792d83774b3 with modal support
tz
parents: 405
diff changeset
    80
        ifFalse:[^nil]
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    81
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    82
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    83
     self openModalOnClass: self andSelector: #leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    84
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    85
!
228524287573 intitial checkin
tz
parents:
diff changeset
    86
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    87
openOnClass:aClass andSelector:aSelector
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    88
    "opens an Image Editor on aClass and aSelector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
    89
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    90
    |editor|
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    91
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    92
    editor := self new.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    93
    editor allButOpen.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    94
    editor loadFromClass:aClass selector:aSelector.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    95
    editor openWindow
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
    96
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    97
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    98
     self openOnClass:self andSelector:#leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    99
     self openOnClass:self andSelector:nil
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   100
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   101
1057
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
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   105
openOnFile:aFileName
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   106
    "opens an Image Editor on aFileName"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   107
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   108
    |editor|
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   109
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   110
    editor := self new.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   111
    editor allButOpen.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   112
    editor loadFromFile:aFileName.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   113
    editor openWindow
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   114
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   115
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   116
     self openOnFile: 'bitmaps/SmalltalkX.xbm'
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   117
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   118
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   119
    "Modified: / 16.3.1999 / 21:33:25 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   120
!
228524287573 intitial checkin
tz
parents:
diff changeset
   121
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   122
openOnImage:anImage
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   123
    "opens an Image Editor on anImage"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   124
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   125
    |editor|
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   126
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   127
    editor := self new.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   128
    editor allButOpen.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   129
    editor loadFromImage: anImage.
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   130
    editor openWindow
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   131
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   132
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   133
     self openOnImage: Icon startIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   134
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   135
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   136
    "Modified: / 11.3.1999 / 16:18:33 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   137
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   138
228524287573 intitial checkin
tz
parents:
diff changeset
   139
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
   140
228524287573 intitial checkin
tz
parents:
diff changeset
   141
listOfColorMaps
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   142
    "returns the list of default color maps for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   143
228524287573 intitial checkin
tz
parents:
diff changeset
   144
    |colorMap|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   145
400
228524287573 intitial checkin
tz
parents:
diff changeset
   146
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   147
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   148
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   149
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   150
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   151
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   152
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   153
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   154
        add: Color magenta;
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   155
        add: (Color redByte: 127 greenByte:   0 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   156
        add: (Color redByte:   0 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   157
        add: (Color redByte:   0 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   158
        add: (Color redByte:   0 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   159
        add: (Color redByte: 127 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   160
        add: (Color redByte: 127 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   161
        add: (Color redByte: 127 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   162
        add: (Color redByte: 170 greenByte: 170 blueByte: 170).
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   163
400
228524287573 intitial checkin
tz
parents:
diff changeset
   164
    0 to: 5 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   165
    [:r|                                                    
228524287573 intitial checkin
tz
parents:
diff changeset
   166
        0 to: 5 do:         
228524287573 intitial checkin
tz
parents:
diff changeset
   167
        [:g|
228524287573 intitial checkin
tz
parents:
diff changeset
   168
            0 to: 5 do:                             
228524287573 intitial checkin
tz
parents:
diff changeset
   169
            [:b|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   170
                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
   171
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   172
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   173
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   174
228524287573 intitial checkin
tz
parents:
diff changeset
   175
    1 to: 25 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   176
    [:g|                             
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   177
        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
   178
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   179
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   180
    ^ Dictionary new
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   181
        at: #depth24 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   182
        at: #masked24 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   183
        at: #depth16 put:(FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   184
        at: #masked16 put:(FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   185
        at: #depth8  put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   186
        at: #masked8 put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   187
        at: #depth4  put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   188
        at: #masked4 put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   189
        at: #depth2  put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   190
        at: #masked2 put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   191
        at: #depth1  put: (colorMap copyFrom: 1 to: 2);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   192
        at: #masked1 put: (colorMap copyFrom: 1 to: 2);
400
228524287573 intitial checkin
tz
parents:
diff changeset
   193
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   194
!
228524287573 intitial checkin
tz
parents:
diff changeset
   195
228524287573 intitial checkin
tz
parents:
diff changeset
   196
listOfDefaultSizes
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   197
    "returns the list of default sizes for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   198
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
   199
    ^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64')
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   200
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   201
    "Modified: / 31.7.1998 / 01:57:34 / cg"
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   202
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   203
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   204
namesOfColorMaps
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   205
    ^ Dictionary new
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   206
        at: #depth24 put: '24-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   207
        at: #masked24 put: '24-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   208
        at: #depth16 put: '16-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   209
        at: #masked16 put: '16-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   210
        at: #depth8  put: ' 8-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   211
        at: #masked8 put: ' 8-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   212
        at: #depth4  put: ' 4-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   213
        at: #masked4 put: ' 4-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   214
        at: #depth2  put: ' 2-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   215
        at: #masked2 put: ' 2-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   216
        at: #depth1  put: ' 1-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   217
        at: #masked1 put: ' 1-plane + mask' ;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   218
        yourself
400
228524287573 intitial checkin
tz
parents:
diff changeset
   219
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   220
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   221
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   222
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   223
flyByHelpSpec
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   224
    <resource: #help>
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
    ^super flyByHelpSpec addPairsFrom:#(
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   227
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   228
#drawModeBox
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   229
'Rectangle'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   230
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   231
#drawModeCopy
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   232
'Copy'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   233
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   234
#drawModeFill
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   235
'Flood-Fill'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   236
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   237
#drawModeFilledBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   238
'Filled Rectangle'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   239
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   240
#drawModePaste
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   241
'Paste'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   242
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   243
#drawModePasteUnder
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   244
'Paste Under'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   245
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   246
#drawModePasteWithMask
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
   247
'Paste with Mask'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   248
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   249
#drawModePoint
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   250
'Point'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   251
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   252
#drawModeSpecial
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   253
'Special Operations'
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   254
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   255
#fileGrabImage
1748
a62052c6ee71 toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents: 1741
diff changeset
   256
'Pick from Screen'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   257
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   258
#fileLoadFromClass
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
   259
'Load from Method...'
1545
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
#fileLoadFromFile
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
   262
'Load from File...'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   263
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   264
#fileNewImage
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   265
'New Image'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   266
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   267
#filePrint
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   268
'Print'
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   269
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   270
#fileSaveAs
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
   271
'Save to File...'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   272
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   273
#fileSaveMaskAs
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
   274
'Save Mask to File...'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   275
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   276
#fileSaveMethod
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   277
'Save as Method'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   278
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   279
#fileSaveMethodAs
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
   280
'Save as Method...'
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   281
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   282
)
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   283
!
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   284
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   285
helpSpec
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   286
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   287
     by the UIHelpTool of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   288
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   289
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   290
     the UIHelpTool may not be able to read the specification."
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   291
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   292
    "
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   293
     UIHelpTool openOnClass:ImageEditor    
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   294
    "
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   295
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   296
    <resource: #help>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   297
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   298
    ^super helpSpec addPairsFrom:#(
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   299
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   300
#colorMap
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   301
'ColorMap functions.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   302
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   303
#colorMap1
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   304
'Convert to depth-1 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   305
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   306
#colorMap1M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   307
'Convert to depth-1 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   308
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   309
#colorMap2
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   310
'Convert to depth-2 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   311
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   312
#colorMap2M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   313
'Convert to depth-2 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   314
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   315
#colorMap4
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   316
'Convert to depth-4 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   317
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   318
#colorMap4M
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   319
'Convert to depth-4 image plus mask.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   320
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   321
#colorMap8
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   322
'Convert to depth-8 image.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   323
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   324
#colorMap8M
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   325
'Convert to depth-8 image plus mask.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   326
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   327
#colorMapTable
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   328
'Shows a list of used colors of the image.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   329
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   330
#compressColormap
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   331
'Remove unneeded entries from the colorMap.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   332
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   333
#cropAll
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   334
'Find and remove all borders.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   335
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   336
#cropBottom
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   337
'Find and remove bottom border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   338
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   339
#cropLeft
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   340
'Find and remove left border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   341
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   342
#cropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   343
'Specify border(s) to remove.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   344
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   345
#cropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   346
'Find and remove right border.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   347
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   348
#cropTop
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   349
'Find and remove top border.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   350
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   351
#drawModeBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   352
'Rectangle Drawing Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   353
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   354
#drawModeCopy
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   355
'Area Copy Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   356
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   357
#drawModeFill
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   358
'Flood Fill Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   359
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   360
#drawModeFilledBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   361
'Filled Rectangle Drawing Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   362
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   363
#drawModePaste
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   364
'Paste Mode.'
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   365
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   366
#drawModePasteUnder
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   367
'Paste-Under Mode.'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   368
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   369
#drawModePasteWithMask
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   370
'Paste-with-Mask Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   371
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   372
#drawModePoint
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   373
'Point Drawing Mode.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   374
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   375
#drawModeSpecial
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   376
'Special Operations'
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   377
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   378
#editFlipHorizontal
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   379
'Flip the image horizontally.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   380
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   381
#editFlipVertical
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   382
'Flip the image vertically.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   383
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   384
#editMagnifyImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   385
'Magnify the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   386
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   387
#editNegate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   388
'Invert the images colors.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   389
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   390
#editResize
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   391
'Resize the image (preserving the old image).'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   392
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   393
#editRotate
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   394
'Rotate the image.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   395
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   396
#fileGrabImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   397
'Pick an image from the screen.'
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   398
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   399
#fileLoadFromClass
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   400
'Select and load an image from a resource method.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   401
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   402
#fileLoadFromFile
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   403
'Select and load an image from a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   404
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   405
#fileNewImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   406
'Create a new image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   407
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   408
#filePrint
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   409
'Print the image on a postscript printer.'
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   410
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   411
#fileSaveAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   412
'Save the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   413
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   414
#fileSaveMaskAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   415
'Save the mask of the image to a file.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   416
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   417
#fileSaveButtonImageAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   418
'Save an image of a button with the image to a file (for html use).'
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   419
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   420
#fileSaveMethod
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   421
'Save the image as resource method in the current class and selector.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   422
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   423
#fileSaveMethodAs
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   424
'Save the image as resource method in a class.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   425
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   426
#magnificationNumber
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   427
'Shows the current magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   428
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   429
#magnifyImageDown
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   430
'Decrease magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   431
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   432
#magnifyImageUp
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   433
'Increase magnification.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   434
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   435
#mouseKeyColorMode
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   436
'Toggle between left and right mouse button color.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   437
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   438
#previewView
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   439
'Shows a preview of the image.'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   440
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   441
#settingsGridMagnification
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   442
'Change the grid magnification of the edit view.'
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   443
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   444
)
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   445
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   446
    "Modified: / 7.9.1998 / 18:20:26 / cg"
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   447
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   448
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   449
!ImageEditor class methodsFor:'image specs'!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   450
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   451
copyIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   452
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   453
     by the ImageEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   456
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   457
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   458
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   459
     self copyIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   460
     ImageEditor openOnClass:self andSelector:#copyIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   461
     Icon flushCachedIcons
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
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   464
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   465
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   466
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   467
        constantNamed:#'ImageEditor class copyIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   468
        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
   469
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   470
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   471
fillIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   472
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   473
     by the ImageEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   476
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   477
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   478
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   479
     self fillIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   480
     ImageEditor openOnClass:self andSelector:#fillIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   481
     Icon flushCachedIcons
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
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   484
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   485
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   486
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   487
        constantNamed:#'ImageEditor class fillIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   488
        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
   489
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   490
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   491
fillRectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   492
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   493
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   494
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   495
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   496
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   497
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   498
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   499
     self fillRectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   500
     ImageEditor openOnClass:self andSelector:#fillRectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   501
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   502
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   503
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   504
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   505
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   506
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   507
        constantNamed:#'ImageEditor class fillRectIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   508
        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
   509
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   510
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   511
leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   512
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   513
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   514
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   515
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   516
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   517
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   518
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
   519
     self leftMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   520
     ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   521
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   522
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   523
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   524
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   525
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   526
        constantNamed:#'ImageEditor leftMouseKeyIcon'
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   527
        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
   528
!
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   529
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   530
pasteIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   531
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   532
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   533
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   534
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   535
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   536
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   537
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   538
     self pasteIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   539
     ImageEditor openOnClass:self andSelector:#pasteIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   540
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   541
    "
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
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   544
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   545
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   546
        constantNamed:#'ImageEditor class pasteIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   547
        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
   548
@@@@@@@@@@@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
   549
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   550
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   551
pasteUnderIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   552
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   553
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   554
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   555
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   556
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   557
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   558
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   559
     self pasteUnderIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   560
     ImageEditor openOnClass:self andSelector:#pasteUnderIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   561
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   562
    "
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
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   565
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   566
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   567
        constantNamed:#'ImageEditor class pasteUnderIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   568
        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
   569
@@@@@@@@@@@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
   570
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   571
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   572
pasteWithMaskIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   573
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   574
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   575
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   576
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   577
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   578
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   579
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   580
     self pasteWithMaskIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   581
     ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   582
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   583
    "
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
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   586
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   587
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   588
        constantNamed:#'ImageEditor class pasteWithMaskIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   589
        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
   590
@@@@@@@@@@@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
   591
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   592
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   593
pointIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   594
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   595
     by the ImageEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   598
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   599
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   600
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   601
     self pointIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   602
     ImageEditor openOnClass:self andSelector:#pointIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   603
     Icon flushCachedIcons
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
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   606
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   607
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   608
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   609
        constantNamed:#'ImageEditor class pointIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   610
        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
   611
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   612
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   613
rectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   614
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   615
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   616
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   617
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   618
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   619
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   620
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   621
     self rectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   622
     ImageEditor openOnClass:self andSelector:#rectIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   623
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   624
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   625
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   626
    <resource: #image>
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
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   629
        constantNamed:#'ImageEditor class rectIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   630
        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
   631
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   632
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   633
rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   634
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   635
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   636
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   637
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   638
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   639
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   640
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
   641
     self rightMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   642
     ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   643
    "
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   644
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   645
    <resource: #image>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   646
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   647
    ^Icon
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   648
        constantNamed:#'ImageEditor rightMouseKeyIcon'
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   649
        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
   650
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   651
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   652
specialIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   653
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   654
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   655
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   656
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   657
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   658
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   659
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   660
     self specialIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   661
     ImageEditor openOnClass:self andSelector:#specialIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   662
     Icon flushCachedIcons
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   663
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   664
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   665
    <resource: #image>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   666
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   667
    ^Icon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   668
        constantNamed:#'ImageEditor class specialIcon'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   669
        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
   670
! !
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   671
400
228524287573 intitial checkin
tz
parents:
diff changeset
   672
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
   673
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   674
changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   675
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   676
     by the UIPainter of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   677
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   678
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   679
     the UIPainter may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   680
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   681
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   682
     UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   683
     ImageEditor new openInterface:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   684
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   685
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   686
    <resource: #canvas>
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   687
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   688
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   689
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   690
        name: changeHLSDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   691
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   692
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   693
          label: 'HLS Edit Dialog'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   694
          name: 'HLS Edit Dialog'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   695
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   696
          bounds: (Rectangle 14 46 326 229)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   697
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   698
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   699
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   700
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   701
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   702
              label: 'Hue-Shift:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   703
              name: 'HueLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   704
              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
   705
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   706
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   707
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   708
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   709
              name: 'HueShiftEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   710
              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
   711
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   712
              model: hueShiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   713
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   714
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   715
              maxValue: 360
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   716
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   717
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   718
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   719
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   720
              name: 'HueWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   721
              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
   722
              model: hueShiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   723
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   724
              step: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   725
              endlessRotation: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   726
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   727
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   728
              label: 'Light Factor:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   729
              name: 'LightLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   730
              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
   731
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   732
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   733
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   734
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   735
              name: 'LightEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   736
              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
   737
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   738
              model: lightAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   739
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   740
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   741
              maxValue: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   742
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   743
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   744
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   745
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   746
              name: 'LightWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   747
              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
   748
              model: lightAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   749
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   750
              stop: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   751
              step: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   752
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   753
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   754
              label: 'Saturation Factor:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   755
              name: 'SaturationLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   756
              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
   757
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   758
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   759
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   760
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   761
              name: 'SaturationEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   762
              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
   763
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   764
              model: saturationAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   765
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   766
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   767
              maxValue: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   768
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   769
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   770
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   771
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   772
              name: 'SaturationWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   773
              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
   774
              model: saturationAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   775
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   776
              stop: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   777
              step: 1
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   778
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   779
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   780
              name: 'HueColorLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   781
              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
   782
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   783
              backgroundChannel: hlsColor
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   784
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   785
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   786
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   787
              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
   788
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   789
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   790
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   791
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   792
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   793
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   794
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   795
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   796
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   797
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   798
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   799
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   800
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   801
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   802
                    extent: (Point 151 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   803
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   804
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   805
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   806
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   807
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   808
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   809
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   810
                    extent: (Point 152 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   811
                  )
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
              )
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   815
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   816
           )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   817
         
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   818
        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   819
      )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   820
!
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   821
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   822
cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   823
    "This resource specification was automatically generated
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   824
     by the UIPainter of ST/X."
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   825
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   826
    "Do not manually edit this!! If it is corrupted,
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   827
     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
   828
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   829
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   830
     UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   831
     ImageEditor new openInterface:#cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   832
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   833
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   834
    <resource: #canvas>
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   835
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   836
    ^ 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   837
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   838
        name: cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   839
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   840
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   841
          label: 'Crop Border(s)'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   842
          name: 'Crop Border(s)'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   843
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   844
          bounds: (Rectangle 14 46 259 229)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   845
        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   846
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   847
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   848
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   849
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   850
              label: 'Left:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   851
              name: 'GropLeftLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   852
              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
   853
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   854
              adjust: right
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   855
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   856
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   857
              name: 'GropLeftEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   858
              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
   859
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   860
              model: left
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   861
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   862
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   863
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   864
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   865
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   866
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   867
              name: 'GropLeftNowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   868
              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
   869
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   870
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   871
              model: gropLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   872
              autoRepeat: true
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   873
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   874
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   875
              label: 'Right:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   876
              name: 'GropRightLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   877
              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
   878
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   879
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   880
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   881
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   882
              name: 'GropRightEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   883
              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
   884
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   885
              model: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   886
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   887
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   888
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   889
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   890
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   891
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   892
              name: 'GropRightButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   893
              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
   894
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   895
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   896
              model: gropRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   897
              autoRepeat: true
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   898
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   899
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   900
              label: 'Top:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   901
              name: 'GropTopLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   902
              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
   903
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   904
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   905
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   906
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   907
              name: 'GropTopEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   908
              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
   909
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   910
              model: top
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   911
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   912
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   913
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   914
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   915
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   916
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   917
              name: 'GropTopButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   918
              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
   919
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   920
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   921
              model: gropTopNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   922
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   923
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   924
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   925
              label: 'Bottom:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   926
              name: 'GropBottomLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   927
              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
   928
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   929
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   930
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   931
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   932
              name: 'GropBottomEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   933
              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
   934
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   935
              model: bottom
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   936
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   937
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   938
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   939
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   940
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   941
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   942
              name: 'GropBottomButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   943
              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
   944
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   945
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   946
              model: gropBottomNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   947
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   948
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   949
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   950
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   951
              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
   952
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   953
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   954
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   955
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   956
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   957
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   958
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   959
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   960
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   961
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   962
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   963
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   964
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   965
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   966
                    extent: (Point 77 22)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   967
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   968
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   969
                    label: 'Apply'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   970
                    name: 'Button3'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   971
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   972
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   973
                    model: applyAction
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   974
                    extent: (Point 78 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   975
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   976
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   977
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   978
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   979
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   980
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   981
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
   982
                    extent: (Point 78 22)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   983
                  )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   984
                 )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   985
               
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   986
              )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   987
            )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   988
           )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   989
         
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   990
        )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   991
      )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   992
!
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   993
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   994
dialogSpecForNewImage
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   995
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   996
     by the UIPainter of ST/X."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
   997
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   998
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   999
     the UIPainter may not be able to read the specification."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1000
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1001
    "
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1002
     UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1003
     ImageEditor new openInterface:#dialogSpecForNewImage
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1004
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1005
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1006
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1007
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1008
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1009
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1010
        name: dialogSpecForNewImage
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1011
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1012
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1013
          label: 'New Image'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1014
          name: 'New Image'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1015
          min: (Point 10 10)
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1016
          bounds: (Rectangle 0 0 301 119)
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1017
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1018
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1019
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1020
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1021
           (ViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1022
              name: 'View'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1023
              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
  1024
              level: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1025
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1026
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1027
                collection: (
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: 'Size'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1030
                    name: 'framedBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1031
                    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
  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
                       (ComboBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1039
                          name: 'defaultSizesComboBox'
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: selectionOfSize
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1042
                          type: string
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1043
                          acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1044
                          comboList: listOfDefaultSizes
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1045
                          isFilenameBox: false
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
                       )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1048
                     
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1049
                    )
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  1050
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1051
                 (FramedBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1052
                    label: 'Color Map'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1053
                    name: 'framedBox2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1054
                    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
  1055
                    style: (FontDescription helvetica medium roman 12)
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1056
                    labelPosition: topLeft
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1057
                    translateLabel: true
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1058
                    component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1059
                   (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1060
                      collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1061
                       (ComboListSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1062
                          name: 'colorMapComboBox'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1063
                          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
  1064
                          model: selectionOfColorMap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1065
                          comboList: listOfColorMaps
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1066
                          useIndex: false
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1067
                          hidePullDownMenuButton: false
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1068
                        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1069
                       )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1070
                     
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1071
                    )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1072
                  )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1073
                 )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1074
               
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1075
              )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1076
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1077
           (UISubSpecification
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1078
              name: 'windowSpecForCommitWithoutChannels'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1079
              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
  1080
              minorKey: windowSpecForCommitWithoutChannels
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1081
            )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1082
           )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1083
         
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1084
        )
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1085
      )
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1086
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1087
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1088
shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1089
    "This resource specification was automatically generated
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1090
     by the UIPainter of ST/X."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1091
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1092
    "Do not manually edit this!! If it is corrupted,
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1093
     the UIPainter may not be able to read the specification."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1094
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1095
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1096
     UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1097
     ImageEditor new openInterface:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1098
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1099
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1100
    <resource: #canvas>
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1101
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1102
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1103
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1104
        name: shiftDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1105
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1106
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1107
          label: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1108
          name: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1109
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1110
          bounds: (Rectangle 14 46 259 229)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1111
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1112
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1113
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1114
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1115
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1116
              label: 'Amount:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1117
              name: 'AmountLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1118
              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
  1119
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1120
              adjust: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1121
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1122
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1123
              name: 'AmountEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1124
              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
  1125
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1126
              model: shiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1127
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1128
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1129
              acceptOnPointerLeave: false
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1130
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1131
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1132
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1133
              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
  1134
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1135
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1136
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1137
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1138
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1139
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1140
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1141
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1142
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1143
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1144
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1145
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1146
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1147
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1148
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1149
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1150
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1151
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1152
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1153
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1154
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1155
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1156
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1157
                  )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1158
                 )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1159
               
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1160
              )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1161
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1162
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1163
              name: 'upArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1164
              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
  1165
              model: shiftUpNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1166
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1167
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1168
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1169
              direction: up
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1170
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1171
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1172
              name: 'leftArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1173
              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
  1174
              model: shiftLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1175
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1176
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1177
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1178
              direction: left
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1179
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1180
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1181
              name: 'rightArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1182
              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
  1183
              model: shiftRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1184
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1185
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1186
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1187
              direction: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1188
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1189
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1190
              name: 'downArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1191
              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
  1192
              model: shiftDownNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1193
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1194
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1195
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1196
              direction: down
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1197
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1198
           (CheckBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1199
              label: 'Wrap'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1200
              name: 'CheckBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1201
              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
  1202
              model: wrap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1203
              translateLabel: true
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1204
            )
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1205
           )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1206
         
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1207
        )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1208
      )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1209
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1210
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1211
uncropDialogSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1212
    "This resource specification was automatically generated
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1213
     by the UIPainter of ST/X."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1214
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1215
    "Do not manually edit this!! If it is corrupted,
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1216
     the UIPainter may not be able to read the specification."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1217
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1218
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1219
     UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1220
     ImageEditor new openInterface:#uncropDialogSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1221
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1222
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1223
    <resource: #canvas>
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1224
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1225
    ^ 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1226
     #(FullSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1227
        name: uncropDialogSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1228
        window: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1229
       (WindowSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1230
          label: 'Add Border(s)'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1231
          name: 'Add Border(s)'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1232
          min: (Point 10 10)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1233
          max: (Point 800 478)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1234
          bounds: (Rectangle 0 0 261 228)
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
        component: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1237
       (SpecCollection
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1238
          collection: (
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1239
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1240
              label: 'Left:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1241
              name: 'Label1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1242
              layout: (LayoutFrame 14 0 21 0 90 0 43 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1243
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1244
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1245
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1246
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1247
              name: 'EntryField1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1248
              layout: (LayoutFrame 95 0 21 0 132 0 43 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1249
              model: left
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1250
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1251
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1252
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1253
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1254
              label: 'Right:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1255
              name: 'Label2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1256
              layout: (LayoutFrame 14 0 51 0 90 0 73 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1257
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1258
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1259
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1260
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1261
              name: 'EntryField2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1262
              layout: (LayoutFrame 95 0 51 0 132 0 73 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1263
              model: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1264
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1265
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1266
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1267
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1268
              label: 'Top:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1269
              name: 'Label3'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1270
              layout: (LayoutFrame 14 0 81 0 90 0 103 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1271
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1272
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1273
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1274
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1275
              name: 'EntryField3'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1276
              layout: (LayoutFrame 95 0 81 0 132 0 103 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1277
              model: top
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1278
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1279
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1280
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1281
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1282
              label: 'Bottom:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1283
              name: 'Label4'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1284
              layout: (LayoutFrame 14 0 111 0 90 0 133 0)
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
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1287
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1288
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1289
              name: 'EntryField4'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1290
              layout: (LayoutFrame 95 0 111 0 132 0 133 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1291
              model: bottom
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1292
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1293
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1294
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1295
           (HorizontalPanelViewSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1296
              name: 'HorizontalPanel1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1297
              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
  1298
              horizontalLayout: fitSpace
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1299
              verticalLayout: center
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1300
              horizontalSpace: 3
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1301
              verticalSpace: 3
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1302
              reverseOrderIfOKAtLeft: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1303
              component: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1304
             (SpecCollection
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1305
                collection: (
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1306
                 (ActionButtonSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1307
                    label: 'Cancel'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1308
                    name: 'Button1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1309
                    translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1310
                    model: cancel
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1311
                    extent: (Point 118 22)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1312
                  )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1313
                 (ActionButtonSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1314
                    label: 'OK'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1315
                    name: 'Button2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1316
                    translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1317
                    model: accept
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1318
                    extent: (Point 118 22)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1319
                  )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1320
                 )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1321
               
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1322
              )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1323
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1324
           )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1325
         
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1326
        )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1327
      )
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1328
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1329
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1330
windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1331
    "This resource specification was automatically generated
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1332
     by the UIPainter of ST/X."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1333
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1334
    "Do not manually edit this!! If it is corrupted,
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1335
     the UIPainter may not be able to read the specification."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1336
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1337
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1338
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1339
     ImageEditor new openInterface:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1340
     ImageEditor open
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1341
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1342
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1343
    <resource: #canvas>
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1344
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1345
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1346
     #(FullSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1347
        name: windowSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1348
        window: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1349
       (WindowSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1350
          label: 'Image Editor'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1351
          name: 'Image Editor'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1352
          min: (Point 400 320)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1353
          bounds: (Rectangle 0 0 450 350)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1354
          menu: menu
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1355
        )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1356
        component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1357
       (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1358
          collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1359
           (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1360
              name: 'menuToolbarView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1361
              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
  1362
              style: (FontDescription helvetica medium roman 10)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1363
              menu: menuToolbar
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1364
              showSeparatingLines: true
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1365
            )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1366
           (VariableHorizontalPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1367
              name: 'horizontalPanel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1368
              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
  1369
              snapMode: both
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  1370
              barLevel: 0
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1371
              component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1372
             (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1373
                collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1374
                 (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1375
                    name: 'leftView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1376
                    level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1377
                    component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1378
                   (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1379
                      collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1380
                       (VariableVerticalPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1381
                          name: 'verticalPanel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1382
                          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
  1383
                          level: 0
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1384
                          snapMode: both
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1385
                          component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1386
                         (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1387
                            collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1388
                             (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1389
                                name: 'View1'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1390
                                component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1391
                               (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1392
                                  collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1393
                                   (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1394
                                      name: 'MouseButtonColorToolBar'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1395
                                      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
  1396
                                      level: 0
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1397
                                      menu: menuMouseButtonColors
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1398
                                    )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1399
                                   (DataSetSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1400
                                      name: 'colorDataSetView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1401
                                      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
  1402
                                      activeHelpKey: colorMapTable
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1403
                                      style: (FontDescription helvetica medium roman 10)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1404
                                      model: selectionOfColor
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1405
                                      menu: colorMapMenu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1406
                                      hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1407
                                      hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1408
                                      miniScrollerHorizontal: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1409
                                      miniScrollerVertical: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1410
                                      dataList: listOfColors
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1411
                                      has3Dseparators: true
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1412
                                      columnHolder: colorTableColumns
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1413
                                      verticalSpacing: 1
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1414
"/                                      columns: 
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1415
"/                                     (OrderedCollection
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1416
"/                                        
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1417
"/                                       (DataSetColumnSpec
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1418
"/                                          labelButtonType: Button
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1419
"/                                          rendererType: rowSelector
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1420
"/                                          backgroundSelector: theColorItSelf:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1421
"/                                        ) 
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1422
"/                                       (DataSetColumnSpec
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1423
"/                                          label: 'R'
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1424
"/                                          labelAlignment: left
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1425
"/                                          labelButtonType: Button
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1426
"/                                          columnAlignment: right
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1427
"/                                          editorType: InputField
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1428
"/                                          type: number
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1429
"/                                          model: redFromColor:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1430
"/                                          writeSelector: redAtColor:put:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1431
"/                                          selectSelector: canSelectRedInColor:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1432
"/                                        )
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1433
"/                                        
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1434
"/                                       (DataSetColumnSpec
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1435
"/                                          label: 'G'
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1436
"/                                          labelAlignment: left
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1437
"/                                          labelButtonType: Button
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1438
"/                                          columnAlignment: right
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1439
"/                                          editorType: InputField
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1440
"/                                          type: number
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1441
"/                                          model: greenFromColor:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1442
"/                                          writeSelector: greenAtColor:put:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1443
"/                                          selectSelector: canSelectGreenInColor:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1444
"/                                        ) 
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1445
"/                                       (DataSetColumnSpec
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1446
"/                                          label: 'B'
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1447
"/                                          labelAlignment: left
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1448
"/                                          labelButtonType: Button
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1449
"/                                          columnAlignment: right
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1450
"/                                          editorType: InputField
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1451
"/                                          type: number
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1452
"/                                          model: blueFromColor:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1453
"/                                          writeSelector: blueAtColor:put:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1454
"/                                          selectSelector: canSelectBlueInColor:
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1455
"/                                        )
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1456
"/                                      )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1457
                                      columnAdaptor: colorColumnAdaptor
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1458
                                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1459
                                   )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1460
                                 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1461
                                )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1462
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1463
                             (ArbitraryComponentSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1464
                                name: 'imagePreView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1465
                                activeHelpKey: previewView
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1466
                                menu: previewMenu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1467
                                hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1468
                                hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1469
                                miniScrollerHorizontal: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1470
                                miniScrollerVertical: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1471
                                hasBorder: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1472
                                component: ImageView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1473
                              )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1474
                             )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1475
                           
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1476
                          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1477
                          handles: (Any 0.5 1.0)
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1478
                        )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1479
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1480
                     
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1481
                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1482
                  )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1483
                 (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1484
                    name: 'rightView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1485
                    component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1486
                   (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1487
                      collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1488
                       (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1489
                          name: 'ToolBar1'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1490
                          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
  1491
                          level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1492
                          menu: toolsMenuToolbar
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1493
                          verticalLayout: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1494
                          centerItems: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1495
                          textDefault: true
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1496
                        )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1497
                       (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1498
                          name: 'editingView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1499
                          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
  1500
                          level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1501
                          component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1502
                         (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1503
                            collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1504
                             (ArbitraryComponentSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1505
                                name: 'imageEditView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1506
                                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
  1507
                                hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1508
                                hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1509
                                hasBorder: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1510
                                component: ImageEditView
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1511
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1512
                             (LabelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1513
                                name: 'coordLabel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1514
                                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
  1515
                                level: -1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1516
                                labelChannel: imageInfoHolder
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1517
                                resizeForLabel: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1518
                                adjust: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1519
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1520
                             (ArrowButtonSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1521
                                name: 'magnifyDownButton'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1522
                                layout: (LayoutFrame -80 1 -22 1 -58 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1523
                                activeHelpKey: magnifyImageDown
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1524
                                model: doMagnifyDown
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1525
                                enableChannel: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1526
                                isTriggerOnDown: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1527
                                direction: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1528
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1529
                             (ArrowButtonSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1530
                                name: 'magnifyUpButton'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1531
                                layout: (LayoutFrame -24 1 -22 1 -2 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1532
                                activeHelpKey: magnifyImageUp
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1533
                                model: doMagnifyUp
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1534
                                enableChannel: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1535
                                isTriggerOnDown: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1536
                                direction: right
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1537
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1538
                             (InputFieldSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1539
                                name: 'magnificationInputField'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1540
                                layout: (LayoutFrame -57 1 -22 1 -26 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1541
                                activeHelpKey: magnificationNumber
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1542
                                enableChannel: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1543
                                model: valueOfMagnification
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1544
                                type: numberInRange
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1545
                                acceptOnReturn: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1546
                                acceptOnTab: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1547
                                numChars: 2
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1548
                                minValue: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1549
                                maxValue: 99
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1550
                                acceptOnPointerLeave: false
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1551
                              )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1552
                             )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1553
                           
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1554
                          )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1555
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1556
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1557
                     
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1558
                    )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1559
                  )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1560
                 )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1561
               
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1562
              )
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  1563
              handles: (Any 0.288889 1.0)
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1564
            )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1565
           (UISubSpecification
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1566
              name: 'infoBarSubSpec'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1567
              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
  1568
              majorKey: ToolApplicationModel
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1569
              minorKey: windowSpecForInfoBar
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1570
            )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1571
           )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1572
         
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1573
        )
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1574
      )
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1575
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1576
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1577
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1578
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1579
colorMapMenu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1580
    "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
  1581
     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
  1582
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1583
    "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
  1584
     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
  1585
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1586
    "
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1587
     MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1588
     (Menu new fromLiteralArrayEncoding:(ImageEditor colorMapMenu)) startUp
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1589
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1590
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1591
    <resource: #menu>
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1592
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1593
    ^ 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1594
     #(Menu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1595
        (
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1596
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1597
            enabled: hasColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1598
            label: 'Add Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1599
            itemValue: addColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1600
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1601
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1602
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1603
            enabled: hasColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1604
            label: 'Pick and Add Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1605
            itemValue: pickAndAddColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1606
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1607
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1608
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1609
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1610
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1611
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1612
            enabled: hasColormap
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1613
            label: 'Cut Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1614
            itemValue: cutColorFromColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1615
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1616
            isVisible: false
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1617
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1618
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1619
            enabled: hasColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1620
            label: 'Copy Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1621
            itemValue: copyColorFromColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1622
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1623
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1624
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1625
            enabled: hasColormap
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  1626
            label: 'Pick and Paste Color'
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  1627
            itemValue: pickAndPasteColor
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1628
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1629
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1630
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1631
            enabled: hasColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1632
            label: 'Paste Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1633
            itemValue: pasteColorIntoColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1634
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1635
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1636
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1637
            label: '-'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1638
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1639
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  1640
            enabled: hasColormap
1931
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  1641
            label: 'Edit Color'
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  1642
            itemValue: editSelectedColor
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  1643
            translateLabel: true
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  1644
          )
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  1645
         (MenuItem
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  1646
            enabled: hasColormap
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1647
            label: 'Brighter'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1648
            itemValue: makeSelectedColorBrighter
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1649
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1650
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1651
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1652
            enabled: hasColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1653
            label: 'Darker'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1654
            itemValue: makeSelectedColorDarker
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1655
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1656
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1657
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1658
            enabled: hasColormap
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1659
            label: 'Make Gray'
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1660
            itemValue: makeSelectedColorGray
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1661
            translateLabel: true
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1662
          )
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1663
         (MenuItem
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1664
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1665
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1666
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1667
            enabled: hasColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1668
            label: 'Inspect Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1669
            itemValue: inspectColor
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1670
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1671
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1672
         )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1673
        nil
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1674
        nil
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1675
      )
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1676
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1677
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1678
menu
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1679
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1680
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1681
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1682
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1683
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1684
228524287573 intitial checkin
tz
parents:
diff changeset
  1685
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1686
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
  1687
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  1688
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  1689
228524287573 intitial checkin
tz
parents:
diff changeset
  1690
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  1691
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1692
    ^ 
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1693
     #(Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1694
        (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1695
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1696
            label: '&File'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1697
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1698
            submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1699
           (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1700
              (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1701
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1702
                  activeHelpKey: fileNewImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1703
                  label: 'New...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1704
                  itemValue: doNewImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1705
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1706
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1707
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1708
                  activeHelpKey: fileNewImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1709
                  label: 'New from ClipBoard'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1710
                  itemValue: doNewImageFromClipboard
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1711
                  translateLabel: true
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  1712
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1713
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1714
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1715
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1716
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1717
                  activeHelpKey: fileLoadFromClass
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1718
                  label: 'Load...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1719
                  itemValue: doLoadFromClass
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1720
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1721
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1722
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1723
                  activeHelpKey: fileLoadFromFile
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1724
                  label: 'Load from File...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1725
                  itemValue: doLoadFromFile
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1726
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1727
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1728
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1729
                  activeHelpKey: fileGrabImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1730
                  label: 'Grab from Screen...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1731
                  itemValue: grabScreenImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1732
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1733
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1734
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1735
                  enabled: imageHasNextImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1736
                  label: 'Next in Sequence'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1737
                  itemValue: nextImageInSequence
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1738
                  translateLabel: true
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  1739
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1740
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1741
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1742
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1743
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1744
                  activeHelpKey: fileSaveMethod
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1745
                  enabled: imageIsLoadedAndClassDefined
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1746
                  label: 'Save'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1747
                  itemValue: doSaveMethod
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1748
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1749
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1750
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1751
                  activeHelpKey: fileSaveMethodAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1752
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1753
                  label: 'Save As...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1754
                  itemValue: doSaveMethodAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1755
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1756
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1757
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1758
                  activeHelpKey: fileSaveAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1759
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1760
                  label: 'Save to File...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1761
                  itemValue: doSaveImageFileAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1762
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1763
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1764
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1765
                  activeHelpKey: fileSaveMaskAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1766
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1767
                  label: 'Save Mask to File...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1768
                  itemValue: doSaveImageMaskFileAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1769
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1770
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1771
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1772
                  activeHelpKey: fileSaveButtonImageAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1773
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1774
                  label: 'Save as Button to File...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1775
                  itemValue: doSaveButtonImageToFileAs
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1776
                  translateLabel: true
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  1777
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1778
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1779
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1780
                  label: 'Copy to Clipboard'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1781
                  itemValue: doCopyImageToClipboard
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1782
                  translateLabel: true
1703
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  1783
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1784
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1785
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1786
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1787
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1788
                  activeHelpKey: fileShowStoreString
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1789
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1790
                  label: 'Show storeString'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1791
                  itemValue: doShowStoreString
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1792
                  translateLabel: true
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1793
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1794
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1795
                  activeHelpKey: fileEditMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1796
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1797
                  label: 'Edit Mask'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1798
                  itemValue: doEditMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1799
                  translateLabel: true
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1800
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1801
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1802
                  label: '-'
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  1803
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1804
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1805
                  activeHelpKey: filePrint
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1806
                  enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1807
                  label: 'Print'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1808
                  itemValue: doPrint
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1809
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1810
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1811
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1812
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1813
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1814
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1815
                  activeHelpKey: fileBrowseClass
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1816
                  enabled: hasClassDefined
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1817
                  label: 'Browse Class'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1818
                  itemValue: doBrowseClass
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1819
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1820
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1821
               (MenuItem
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  1822
                  label: 'Inspect Image'
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  1823
                  itemValue: doInspectImage
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  1824
                  translateLabel: true
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  1825
                )
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  1826
               (MenuItem
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1827
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1828
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1829
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1830
                  activeHelpKey: fileExit
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1831
                  label: 'Exit'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1832
                  itemValue: closeRequest
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1833
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1834
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1835
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1836
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1837
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1838
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1839
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1840
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1841
            enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1842
            label: 'Edit'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1843
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1844
            submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1845
           (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1846
              (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1847
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1848
                  activeHelpKey: editUndo
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1849
                  enabled: valueOfCanUndo
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1850
                  label: 'Undo'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1851
                  itemValue: doUndo
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1852
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1853
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1854
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1855
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1856
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1857
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1858
                  activeHelpKey: editFlipVertical
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1859
                  label: 'Flip - Vertical'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1860
                  itemValue: doFlipVertical
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1861
                  translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1862
                )
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1863
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1864
                  activeHelpKey: editFlipHorizontal
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1865
                  label: 'Flip - Horizontal'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1866
                  itemValue: doFlipHorizontal
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1867
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1868
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1869
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1870
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1871
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1872
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1873
                  activeHelpKey: editResize
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1874
                  label: 'Resize...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1875
                  itemValue: doResizeImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1876
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1877
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1878
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1879
                  activeHelpKey: editMagnifyImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1880
                  label: 'Magnify...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1881
                  itemValue: doMagnifyImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1882
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1883
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1884
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1885
                  activeHelpKey: editMagnifyImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1886
                  label: 'Magnify By...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1887
                  itemValue: doMagnifyImageBy
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1888
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1889
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1890
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1891
                  activeHelpKey: editRotate
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1892
                  label: 'Rotate...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1893
                  itemValue: doRotateImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1894
                  translateLabel: true
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1895
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1896
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1897
                  label: '-'
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1898
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1899
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1900
                  label: 'Invert'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1901
                  itemValue: doNegativeImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1902
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1903
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1904
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1905
                  label: 'Brighten'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1906
                  itemValue: doBrightenImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1907
                  translateLabel: true
1146
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1908
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1909
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1910
                  label: 'Darken'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1911
                  itemValue: doDarkenImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1912
                  translateLabel: true
1146
5645240fdc25 menu adding negateImage
tm
parents: 1124
diff changeset
  1913
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1914
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1915
                  label: '-'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1916
                )
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1917
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1918
                  label: 'Crop'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1919
                  translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1920
                  submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1921
                 (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1922
                    (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1923
                     (MenuItem
1888
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1924
                        activeHelpKey: cropManual
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1925
                        label: 'Manual...'
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1926
                        itemValue: doCropManual
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1927
                        translateLabel: true
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1928
                      )
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1929
                     (MenuItem
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1930
                        label: '-'
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1931
                      )
d626408aa7e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1885
diff changeset
  1932
                     (MenuItem
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1933
                        activeHelpKey: cropAll
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1934
                        label: 'All'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1935
                        itemValue: doCropAll
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1936
                        translateLabel: true
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1937
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1938
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1939
                        label: '-'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1940
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1941
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1942
                        activeHelpKey: cropLeft
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1943
                        label: 'Left'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1944
                        itemValue: doCropLeft
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1945
                        translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1946
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1947
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1948
                        activeHelpKey: cropRight
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1949
                        label: 'Right'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1950
                        itemValue: doCropRight
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1951
                        translateLabel: true
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1952
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1953
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1954
                        activeHelpKey: cropTop
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1955
                        label: 'Top'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1956
                        itemValue: doCropTop
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1957
                        translateLabel: true
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  1958
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1959
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1960
                        activeHelpKey: cropBottom
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1961
                        label: 'Bottom'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1962
                        itemValue: doCropBottom
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1963
                        translateLabel: true
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1964
                      )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1965
                     )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1966
                    nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1967
                    nil
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1968
                  )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1969
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1970
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1971
                  activeHelpKey: uncropManual
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1972
                  label: 'Uncrop (Add Border)...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1973
                  itemValue: doUnCropManual
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1974
                  translateLabel: true
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1975
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1976
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1977
                  activeHelpKey: shiftManual
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1978
                  label: 'Shift...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1979
                  itemValue: doShiftManual
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1980
                  translateLabel: true
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1981
                )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1982
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1983
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1984
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1985
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  1986
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1987
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1988
            enabled: imageIsLoaded
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1989
            label: 'Mode'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1990
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1991
            submenuChannel: modeMenu
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1992
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1993
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1994
            enabled: imageIsLoaded
1924
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  1995
            label: 'Colors'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1996
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1997
            submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1998
           (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1999
              (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2000
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2001
                  label: 'Depth'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2002
                  translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2003
                  submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2004
                 (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2005
                    (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2006
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2007
                        activeHelpKey: colorMap1
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2008
                        label: '1-Plane'
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2009
                        itemValue: colorMapMode:
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2010
                        translateLabel: true
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2011
                        argument: depth1
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2012
                        choice: colorMapMode
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2013
                        choiceValue: depth1
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2014
                      )
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2015
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2016
                        activeHelpKey: colorMap1M
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2017
                        label: '1-Plane + Mask'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2018
                        itemValue: colorMapMode:
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2019
                        translateLabel: true
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2020
                        argument: masked1
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2021
                        choice: colorMapMode
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2022
                        choiceValue: masked1
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2023
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2024
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2025
                        label: '-'
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2026
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2027
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2028
                        activeHelpKey: colorMap2
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2029
                        label: '2-Plane'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2030
                        itemValue: colorMapMode:
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2031
                        translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2032
                        argument: depth2
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2033
                        choice: colorMapMode
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2034
                        choiceValue: depth2
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2035
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2036
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2037
                        activeHelpKey: colorMap2M
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2038
                        label: '2-Plane + Mask'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2039
                        itemValue: colorMapMode:
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2040
                        translateLabel: true
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2041
                        argument: masked2
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2042
                        choice: colorMapMode
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2043
                        choiceValue: masked2
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2044
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2045
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2046
                        label: '-'
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2047
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2048
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2049
                        activeHelpKey: colorMap4
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2050
                        label: '4-Plane'
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2051
                        itemValue: colorMapMode:
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2052
                        translateLabel: true
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2053
                        argument: depth4
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2054
                        choice: colorMapMode
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2055
                        choiceValue: depth4
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2056
                      )
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2057
                     (MenuItem
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2058
                        activeHelpKey: colorMap4M
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2059
                        label: '4-Plane + Mask'
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2060
                        itemValue: colorMapMode:
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2061
                        translateLabel: true
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2062
                        argument: masked4
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2063
                        choice: colorMapMode
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2064
                        choiceValue: masked4
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2065
                      )
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2066
                     (MenuItem
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2067
                        label: '-'
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2068
                      )
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2069
                     (MenuItem
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2070
                        activeHelpKey: colorMap8
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2071
                        label: '8-Plane'
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2072
                        itemValue: colorMapMode:
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2073
                        translateLabel: true
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2074
                        argument: depth8
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2075
                        choice: colorMapMode
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2076
                        choiceValue: depth8
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2077
                      )
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2078
                     (MenuItem
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2079
                        activeHelpKey: colorMap8M
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2080
                        label: '8-Plane + Mask'
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2081
                        itemValue: colorMapMode:
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2082
                        translateLabel: true
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2083
                        argument: masked8
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2084
                        choice: colorMapMode
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2085
                        choiceValue: masked8
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2086
                      )
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2087
                     (MenuItem
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2088
                        label: '-'
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2089
                      )
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2090
                     (MenuItem
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2091
                        activeHelpKey: colorMap16
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2092
                        label: '16-Plane'
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2093
                        itemValue: colorMapMode:
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2094
                        translateLabel: true
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2095
                        argument: depth16
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2096
                        choice: colorMapMode
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2097
                        choiceValue: depth16
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2098
                      )
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2099
                     (MenuItem
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2100
                        activeHelpKey: colorMap16M
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2101
                        label: '16-Plane + Mask'
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2102
                        itemValue: colorMapMode:
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2103
                        translateLabel: true
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2104
                        argument: masked16
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2105
                        choice: colorMapMode
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2106
                        choiceValue: masked16
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2107
                      )
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2108
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2109
                        label: '-'
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2110
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2111
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2112
                        activeHelpKey: colorMap24
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2113
                        label: '24-Plane'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2114
                        itemValue: colorMapMode:
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2115
                        translateLabel: true
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2116
                        argument: depth24
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2117
                        choice: colorMapMode
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2118
                        choiceValue: depth24
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2119
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2120
                     (MenuItem
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2121
                        activeHelpKey: colorMap24M
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2122
                        label: '24-Plane + Mask'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2123
                        itemValue: colorMapMode:
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2124
                        translateLabel: true
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2125
                        argument: masked24
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2126
                        choice: colorMapMode
1936
e2ce1a4139a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1935
diff changeset
  2127
                        choiceValue: masked24
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2128
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2129
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2130
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2131
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2132
                  )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2133
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2134
               (MenuItem
1924
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2135
                  label: 'ColorMap'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2136
                  translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2137
                  submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2138
                 (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2139
                    (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2140
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2141
                        activeHelpKey: compressColormap
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2142
                        enabled: hasColormap
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2143
                        label: 'Compress Colormap'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2144
                        itemValue: compressColorMap
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2145
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2146
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2147
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2148
                        enabled: hasColormap
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2149
                        label: 'Sort Colormap'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2150
                        itemValue: sortColorMap
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2151
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2152
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2153
                     (MenuItem
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2154
                        label: 'Reduce Number of Colors by Rounding...'
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2155
                        itemValue: reduceNumberOfColors2
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2156
                        translateLabel: true
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2157
                      )
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2158
                     (MenuItem
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  2159
                        label: 'Reduce Number of Colors by Masking Bits...'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2160
                        itemValue: reduceNumberOfColors
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2161
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2162
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2163
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2164
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2165
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2166
                  )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2167
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2168
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2169
                  label: 'Process'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2170
                  translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2171
                  submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2172
                 (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2173
                    (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2174
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2175
                        label: 'Make GrayScale'
1924
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2176
                        itemValue: makeGrayScaleImage
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2177
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2178
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2179
                     (MenuItem
1924
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2180
                        enabled: hasNoColormap
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2181
                        label: 'Make dithered 8Bit Palette'
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2182
                        itemValue: makeDitheredPaletteImage
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2183
                        translateLabel: true
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2184
                        isVisible: false
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2185
                      )
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2186
                     (MenuItem
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2187
                        label: 'Make Brighter'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2188
                        itemValue: makeBrighter
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2189
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2190
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2191
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2192
                        label: 'Make Darker'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2193
                        itemValue: makeDarker
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2194
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2195
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2196
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2197
                        label: 'Make Inverse'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2198
                        itemValue: makeInverse
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2199
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2200
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2201
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2202
                        label: '-'
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2203
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2204
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2205
                        label: 'Change HLS...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2206
                        itemValue: changeHLS
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2207
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2208
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2209
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2210
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2211
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2212
                  )
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  2213
                )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2214
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2215
                  label: 'Mask'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2216
                  translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2217
                  submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2218
                 (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2219
                    (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2220
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2221
                        activeHelpKey: copyMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2222
                        enabled: hasMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2223
                        label: 'Copy Mask'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2224
                        itemValue: copyMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2225
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2226
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2227
                     (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2228
                        activeHelpKey: pasteMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2229
                        enabled: hasMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2230
                        label: 'Paste Mask'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2231
                        itemValue: pasteMask
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2232
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2233
                      )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2234
                     (MenuItem
1924
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2235
                        enabled: hasMask
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2236
                        label: 'Clear Masked Pixels'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2237
                        itemValue: clearMaskedPixels
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2238
                        translateLabel: true
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2239
                      )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2240
                     )
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2241
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2242
                    nil
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  2243
                  )
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  2244
                )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2245
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2246
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2247
              nil
756
52a76ec8828d (image with colorMap size = 1)-bug fixed
tz
parents: 737
diff changeset
  2248
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2249
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2250
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2251
            label: 'Settings'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2252
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2253
            submenu: 
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2254
           (Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2255
              (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2256
               (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2257
                  activeHelpKey: settingsGridMagnification
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2258
                  label: 'Grid Magnification Limit...'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2259
                  itemValue: doChangeGridMagnification
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2260
                  translateLabel: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2261
                )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2262
               )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2263
              nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2264
              nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2265
            )
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2266
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2267
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2268
            label: 'History'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2269
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2270
            submenuChannel: menuHistory
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2271
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2272
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2273
            label: 'Help'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2274
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2275
            startGroup: right
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2276
            submenuChannel: menuHelp
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2277
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2278
         )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2279
        nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2280
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2281
      )
228524287573 intitial checkin
tz
parents:
diff changeset
  2282
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2283
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2284
menuMouseButtonColors
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2285
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2286
     by the MenuEditor of ST/X."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2287
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2288
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2289
     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
  2290
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2291
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2292
     MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2293
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2294
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2295
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2296
    <resource: #menu>
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2297
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2298
    ^
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2299
     
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2300
       #(#Menu
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2301
          
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2302
           #(
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2303
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2304
                #label: 'Left Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2305
                #nameKey: #leftMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2306
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2307
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2308
                #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2309
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2310
                #choiceValue: 1
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2311
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2312
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2313
                #label: 'Right Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2314
                #nameKey: #rightMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2315
                #activeHelpKey: #mouseKeyColorMode
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2316
                #enabled: #imageIsLoaded
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2317
                #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2318
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2319
                #choiceValue: 2
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2320
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2321
          ) nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2322
          nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2323
      )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2324
!
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2325
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2326
menuToolbar
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2327
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2328
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2329
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2330
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2331
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2332
228524287573 intitial checkin
tz
parents:
diff changeset
  2333
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2334
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
  2335
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  2336
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2337
228524287573 intitial checkin
tz
parents:
diff changeset
  2338
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  2339
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2340
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2341
     #(Menu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2342
        (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2343
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2344
            activeHelpKey: fileNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2345
            label: 'newImage'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2346
            itemValue: doNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2347
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2348
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  2349
            labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2350
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2351
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  2352
            label: '-'
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  2353
          )
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  2354
         (MenuItem
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2355
            activeHelpKey: fileLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2356
            label: 'loadFromFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2357
            itemValue: doLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2358
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2359
            isButton: true
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2360
            labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2361
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2362
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2363
            activeHelpKey: fileSaveAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2364
            enabled: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2365
            label: 'saveAsFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2366
            itemValue: doSaveImageFileAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2367
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2368
            isButton: true
1885
a09ede39c43f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1884
diff changeset
  2369
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2370
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2371
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  2372
            label: '-'
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2373
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2374
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2375
            activeHelpKey: fileLoadFromClass
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2376
            label: 'loadFromClass'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2377
            itemValue: doLoadFromClass
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2378
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2379
            isButton: true
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  2380
            submenuChannel: menuHistory
1885
a09ede39c43f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1884
diff changeset
  2381
            labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromMethodIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2382
            keepLinkedMenu: true
1748
a62052c6ee71 toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents: 1741
diff changeset
  2383
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2384
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2385
            activeHelpKey: fileSaveMethodAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2386
            enabled: imageIsLoaded
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2387
            label: 'saveAsMethod'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2388
            itemValue: doSaveMethodAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2389
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2390
            isButton: true
1889
c40aa7b4d59c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1888
diff changeset
  2391
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodAsIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2392
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2393
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  2394
            label: '-'
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2395
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2396
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2397
            activeHelpKey: editUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2398
            enabled: valueOfCanUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2399
            label: 'Undo'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2400
            itemValue: doUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2401
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2402
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  2403
            labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2404
          )
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2405
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2406
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2407
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2408
      )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2409
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2410
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2411
modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2412
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2413
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2414
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2415
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2416
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2417
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2418
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2419
     MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2420
     (Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2421
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2422
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2423
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2424
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2425
    ^ 
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2426
     #(#Menu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2427
        #(
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2428
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2429
            #activeHelpKey: #drawModePoint
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2430
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2431
            #label: 'Point'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2432
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2433
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2434
            #choiceValue: #point
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2435
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2436
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2437
            #activeHelpKey: #drawModeBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2438
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2439
            #label: 'Rect'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2440
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2441
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2442
            #choiceValue: #box
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2443
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2444
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2445
            #activeHelpKey: #drawModeFilledBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2446
            #enabled: #imageIsLoaded
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  2447
            #label: 'Filled Rectangle'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2448
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2449
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2450
            #choiceValue: #filledBox
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2451
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2452
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2453
            #activeHelpKey: #drawModeFill
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2454
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2455
            #label: 'Fill'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2456
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2457
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2458
            #choiceValue: #fill
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2459
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2460
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2461
            #activeHelpKey: #drawModeCopy
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2462
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2463
            #label: 'Copy'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2464
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2465
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2466
            #choiceValue: #copy
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2467
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2468
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2469
            #activeHelpKey: #drawModePaste
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2470
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2471
            #label: 'Paste'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2472
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2473
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2474
            #choiceValue: #paste
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2475
          )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2476
         #(#MenuItem
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2477
            #activeHelpKey: #drawModePasteUnder
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2478
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2479
            #label: 'Paste Under'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2480
            #translateLabel: true
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2481
            #choice: #editMode
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2482
            #choiceValue: #pasteUnder
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2483
          )
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2484
         #(#MenuItem
1579
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2485
            #activeHelpKey: #drawModePasteWithMask
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2486
            #enabled: #imageIsLoaded
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  2487
            #label: 'Paste with Mask'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2488
            #translateLabel: true
1579
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2489
            #choice: #editMode
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2490
            #choiceValue: #pasteWithMask
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2491
          )
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  2492
         #(#MenuItem
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2493
            #activeHelpKey: #drawModeSpecial
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2494
            #enabled: #imageIsLoaded
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2495
            #label: 'Special'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2496
            #translateLabel: true
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2497
            #choice: #editMode
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2498
            #choiceValue: #specialOperation
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  2499
          )
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2500
         )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2501
        nil
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  2502
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2503
      )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2504
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2505
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2506
previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2507
    "This resource specification was automatically generated
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2508
     by the MenuEditor of ST/X."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2509
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2510
    "Do not manually edit this!! If it is corrupted,
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2511
     the MenuEditor may not be able to read the specification."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2512
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2513
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2514
     MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2515
     (Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2516
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2517
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2518
    <resource: #menu>
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2519
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2520
    ^ 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2521
     #(Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2522
        (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2523
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2524
            label: 'TileMode'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2525
            translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2526
            indication: tileModeHolder
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2527
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2528
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2529
            label: '-'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2530
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2531
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2532
            label: 'Background Color'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2533
            translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2534
            submenu: 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2535
           (Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2536
              (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2537
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2538
                  label: 'Gray'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2539
                  translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2540
                  choice: previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2541
                  choiceValue: nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2542
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2543
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2544
                  label: 'Black'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2545
                  translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2546
                  choice: previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2547
                  choiceValue: black
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2548
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2549
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2550
                  label: 'White'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2551
                  translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2552
                  choice: previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2553
                  choiceValue: white
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2554
                )
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2555
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2556
                  label: '-'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2557
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2558
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2559
                  label: 'Red'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2560
                  translateLabel: true
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2561
                  choice: previewBackgroundColor
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2562
                  choiceValue: red
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2563
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2564
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2565
                  label: 'Green'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2566
                  translateLabel: true
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2567
                  choice: previewBackgroundColor
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2568
                  choiceValue: green
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2569
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2570
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2571
                  label: 'Blue'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2572
                  translateLabel: true
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2573
                  choice: previewBackgroundColor
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2574
                  choiceValue: blue
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  2575
                )
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2576
               )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2577
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2578
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2579
            )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2580
          )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2581
         )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2582
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2583
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2584
      )
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2585
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2586
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2587
toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2588
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2589
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2590
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2591
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2592
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2593
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2594
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2595
     MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2596
     (Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2597
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2598
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2599
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2600
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2601
    ^ 
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2602
     #(#Menu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2603
        #(
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2604
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2605
            #activeHelpKey: #drawModePoint
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2606
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2607
            #label: 'Point'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2608
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2609
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2610
            #labelImage: #(#ResourceRetriever #ImageEditor #pointIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2611
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2612
            #choiceValue: #point
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2613
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2614
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2615
            #activeHelpKey: #drawModeBox
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2616
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2617
            #label: 'Rect'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2618
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2619
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2620
            #labelImage: #(#ResourceRetriever #ImageEditor #rectIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2621
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2622
            #choiceValue: #box
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2623
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2624
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2625
            #activeHelpKey: #drawModeFilledBox
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2626
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2627
            #label: 'FillRect'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2628
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2629
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2630
            #labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2631
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2632
            #choiceValue: #filledBox
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2633
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2634
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2635
            #activeHelpKey: #drawModeFill
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2636
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2637
            #label: 'Fill'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2638
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2639
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2640
            #labelImage: #(#ResourceRetriever #ImageEditor #fillIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2641
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2642
            #choiceValue: #fill
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2643
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2644
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2645
            #activeHelpKey: #drawModeCopy
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2646
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2647
            #label: 'Copy'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2648
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2649
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2650
            #labelImage: #(#ResourceRetriever #ImageEditor #copyIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2651
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2652
            #choiceValue: #copy
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2653
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2654
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2655
            #activeHelpKey: #drawModePaste
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2656
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2657
            #label: 'Paste'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2658
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2659
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2660
            #labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2661
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2662
            #choiceValue: #paste
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2663
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2664
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2665
            #activeHelpKey: #drawModePasteUnder
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2666
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2667
            #label: 'Paste Under'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2668
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2669
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2670
            #labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2671
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2672
            #choiceValue: #pasteUnder
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2673
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2674
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2675
            #activeHelpKey: #drawModePasteWithMask
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2676
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2677
            #label: 'Paste With Mask'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2678
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2679
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2680
            #labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2681
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2682
            #choiceValue: #pasteWithMask
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2683
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2684
         #(#MenuItem
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2685
            #activeHelpKey: #drawModeSpecial
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2686
            #enabled: #imageIsLoaded
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2687
            #label: 'Special'
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2688
            #translateLabel: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2689
            #isButton: true
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2690
            #labelImage: #(#ResourceRetriever #ImageEditor #specialIcon)
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2691
            #choice: #editMode
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2692
            #choiceValue: #specialOperation
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2693
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2694
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2695
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2696
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2697
      )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2698
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2699
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2700
!ImageEditor class methodsFor:'tableColumns specs'!
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2701
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  2702
colorTableColumns
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2703
    "This resource specification was automatically generated
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2704
     by the DataSetBuilder of ST/X."
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2705
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2706
    "Do not manually edit this!! If it is corrupted,
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2707
     the DataSetBuilder may not be able to read the specification."
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2708
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2709
    "
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2710
     DataSetBuilder new openOnClass:ImageEditor andSelector:#tableColumns
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2711
    "
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2712
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2713
    <resource: #tableColumns>
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2714
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2715
    ^#(
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2716
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2717
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2718
         rendererType: rowSelector
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2719
         backgroundSelector: theColorItSelf:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2720
         selectedBackgroundSelector: theColorItSelf:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2721
         isResizeable: false
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2722
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2723
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2724
         label: 'R'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2725
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2726
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2727
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2728
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2729
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2730
         model: redFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2731
         writeSelector: redAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2732
         selectSelector: canSelectRedInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2733
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2734
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2735
         label: 'G'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2736
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2737
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2738
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2739
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2740
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2741
         model: greenFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2742
         writeSelector: greenAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2743
         selectSelector: canSelectGreenInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2744
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2745
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2746
         label: 'B'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2747
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2748
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2749
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2750
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2751
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2752
         model: blueFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2753
         writeSelector: blueAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2754
         selectSelector: canSelectBlueInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2755
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2756
      )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2757
! !
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  2758
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2759
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  2760
228524287573 intitial checkin
tz
parents:
diff changeset
  2761
image
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2762
    "returns the current editing image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2763
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2764
    ^ imageEditView image
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2765
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2766
228524287573 intitial checkin
tz
parents:
diff changeset
  2767
postOpenAction: anAction
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2768
   "sets an action which is evaluated after opening"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2769
228524287573 intitial checkin
tz
parents:
diff changeset
  2770
    postOpenAction := anAction
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2771
!
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2772
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2773
resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  2774
    imageEditView resourceClass:aClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2775
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2776
1398
284781677ae1 category changes
Claus Gittinger <cg@exept.de>
parents: 1393
diff changeset
  2777
!ImageEditor methodsFor:'accessing-views'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2778
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2779
colorDataSetView
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2780
    "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
  2781
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2782
    ^(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
  2783
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2784
    "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
  2785
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2786
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2787
coordLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2788
    "returns the view the coord label"
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2789
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2790
    ^self componentAt: #coordLabel
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2791
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  2792
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2793
imageEditView
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  2794
    "returns the view of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2795
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2796
    imageEditView isNil ifTrue:[
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2797
        imageEditView := (self componentAt: #imageEditView) scrolledView.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2798
        imageEditView addDependent:self.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2799
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  2800
    ^ imageEditView
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2801
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  2802
    "Modified: / 10.2.2000 / 23:19:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2803
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2804
228524287573 intitial checkin
tz
parents:
diff changeset
  2805
imagePreView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2806
    "returns the preview of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2807
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  2808
    ^ (self componentAt: #imagePreView) subViews first 
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  2809
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  2810
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2811
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  2812
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2813
activityInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2814
    ^ self valueOfInfoLabel
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2815
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2816
    "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
  2817
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2818
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2819
colorColumnAdaptor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2820
    ^ self
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2821
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2822
    "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
  2823
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2824
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2825
hasClassAndSelectorDefined
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2826
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  2827
        |cls|
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  2828
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  2829
        (cls := imageEditView resourceClass) notNil
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  2830
        and:[imageEditView resourceSelector notNil]
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2831
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2832
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2833
    "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
  2834
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2835
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2836
hasClassDefined
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2837
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  2838
        imageEditView resourceClass notNil
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2839
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2840
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2841
    "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
  2842
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2843
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2844
hasColormap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2845
    ^ [self image notNil and:[self image colorMap notNil]]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2846
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2847
    "Created: / 30.9.1998 / 23:53:55 / cg"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2848
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2849
1924
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2850
hasNoColormap
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2851
    ^ [self image notNil and:[self image colorMap isNil]]
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2852
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2853
    "Created: / 30.9.1998 / 23:53:55 / cg"
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2854
!
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2855
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2856
imageHasNextImage
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2857
    "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
  2858
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2859
    ^ [self image notNil
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2860
       and:[self image imageSequence notNil]]
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2861
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2862
    "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
  2863
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  2864
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2865
imageInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2866
    |holder|
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2867
    (holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2868
        builder aspectAt:#imageInfoHolder put:(holder :=  '' asValue).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2869
    ].
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2870
    ^ holder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2871
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2872
    "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
  2873
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  2874
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2875
imageIsLoaded
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2876
    "returns whether an image is loaded as value holder"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2877
228524287573 intitial checkin
tz
parents:
diff changeset
  2878
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2879
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2880
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
228524287573 intitial checkin
tz
parents:
diff changeset
  2881
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2882
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2883
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2884
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2885
imageIsLoadedAndClassDefined
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2886
    "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
  2887
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2888
    ^ [self hasClassAndSelectorDefined value
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2889
       and:[self imageIsLoaded value]]
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2890
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2891
    "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
  2892
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2893
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2894
listOfColors
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2895
    "returns the list of colors"
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2897
    |list|
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2898
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2899
    (list := builder bindingAt:#listOfColors) isNil ifTrue:[
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2900
        builder aspectAt:#listOfColors put:(list :=  List new).
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2901
        list addDependent:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2902
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2903
    ^ list
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2904
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2905
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2906
previewBackgroundColor
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2907
    |holder|
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2908
    (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
  2909
        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
  2910
        holder addDependent:self.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2911
    ].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2912
    ^ holder
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2913
!
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  2914
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2915
selectionOfColor
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  2916
    "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
  2917
     Here, an AspectAdaptor which accesses selectedColorIndex is returned."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2918
228524287573 intitial checkin
tz
parents:
diff changeset
  2919
    |holder|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  2920
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2921
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2922
        builder aspectAt:#selectionOfColor put:(
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  2923
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2924
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2925
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2926
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2927
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2928
tileModeHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2929
    |holder|
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2930
    (holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2931
        builder aspectAt:#tileModeHolder put:(holder := false asValue).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2932
        holder addDependent:self.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2933
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2934
    ^ holder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2935
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2936
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2937
valueOfMagnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2938
    "returns current magnification of the image as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2939
228524287573 intitial checkin
tz
parents:
diff changeset
  2940
    |holder|
228524287573 intitial checkin
tz
parents:
diff changeset
  2941
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  2942
        builder aspectAt:#valueOfMagnification put:(
228524287573 intitial checkin
tz
parents:
diff changeset
  2943
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
228524287573 intitial checkin
tz
parents:
diff changeset
  2944
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  2945
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  2946
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  2947
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2948
!ImageEditor methodsFor:'change & update'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2949
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2950
findColorMapMode
899
43b744c647ba comment grammar
tz
parents: 898
diff changeset
  2951
    "finds the colorMapMode for a new image"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2952
1927
c5068006116d colors of deep images
Claus Gittinger <cg@exept.de>
parents: 1926
diff changeset
  2953
    |image listOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors|
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2954
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2955
    image := self image.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2956
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2957
    image mask notNil ifTrue: [             
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2958
        colorMapModeKey := 'masked'.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2959
    ] ifFalse:[
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2960
        colorMapModeKey := 'depth'.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2961
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2962
    colorMapModeKey := colorMapModeKey , image depth printString.
1967
c95484b7da49 some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1966
diff changeset
  2963
    self colorMapMode setValue:colorMapModeKey.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2964
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2965
    listOfColors := self listOfColors.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  2966
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2967
    image depth > 12 ifTrue:[
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2968
        listOfColors removeAll.
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2969
        image colorMap isEmptyOrNil ifTrue:[
1927
c5068006116d colors of deep images
Claus Gittinger <cg@exept.de>
parents: 1926
diff changeset
  2970
            someOrAllUsedColors := image usedColorsMax:10000.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  2971
            someOrAllUsedColors := someOrAllUsedColors asArray.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  2972
            someOrAllUsedColors sort:self sortBlockForColors.
1927
c5068006116d colors of deep images
Claus Gittinger <cg@exept.de>
parents: 1926
diff changeset
  2973
            listOfColors addAll:someOrAllUsedColors.
c5068006116d colors of deep images
Claus Gittinger <cg@exept.de>
parents: 1926
diff changeset
  2974
            "/ listOfColors add:Color black; add:Color white.
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2975
        ] ifFalse:[
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2976
            listOfColors addAll:(image colorMap).
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2977
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2978
    ] ifFalse:[
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2979
        listOfColors isEmpty ifTrue:[   
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2980
            self colorMapMode: colorMapMode value.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2981
            image := self image.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2982
        ].                               
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2983
    ].                               
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2984
    drawColor1 := listOfColors at:1.
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2985
    drawColor2 := listOfColors at:2 ifAbsent:drawColor1.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2986
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  2987
    self hasMask ifTrue: [             
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2988
        (listOfColors contains: [:clr| clr = (Color colorId:0)]) 
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  2989
        ifFalse:[
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  2990
            listOfColors addFirst:(Color colorId:0).
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2991
            drawColor1 := listOfColors at:2. 
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2992
            drawColor2 := listOfColors at:3 ifAbsent:drawColor1.
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
  2993
        ]
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2994
    ].
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2995
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2996
    imageEditView drawingColors:(Array with: drawColor1 with: drawColor2).
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  2997
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  2998
    self selectionOfColor 
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  2999
        setValue: 0;
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  3000
        value: (listOfColors indexOf: imageEditView selectedColor).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3001
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3002
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3003
update:something with:aParameter from:changedObject
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3004
    |clrIndex img clr changedColor|
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3005
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3006
    img := self image.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3007
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3008
    changedObject == self tileModeHolder ifTrue:[
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3009
        self imagePreView 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3010
            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
  3011
            clear; 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3012
            invalidate.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3013
        ^ self
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3014
    ].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3015
    changedObject == self previewBackgroundColor ifTrue:[
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3016
        clr := changedObject value isNil 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3017
                    ifTrue:[imageEditView viewBackground]
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3018
                    ifFalse:[Color perform:changedObject value].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3019
        self imagePreView 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3020
            viewBackground:clr;
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3021
            clear; 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3022
            invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3023
        ^ self
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3024
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3025
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3026
    changedObject == self listOfColors ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3027
        something == #at: ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3028
            "/ colormap entry changed at aParameter
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3029
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3030
            clrIndex := aParameter.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3031
            (self hasMask) ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3032
                clrIndex := clrIndex - 1.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3033
            ].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3034
            changedColor := changedObject at:aParameter.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3035
            img colorMap notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3036
                img colorMap at:clrIndex put:changedColor.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3037
                self colorMapChanged.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3038
            ] ifFalse:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3039
                drawingColormap notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3040
                    drawingColormap at:clrIndex put:changedColor.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3041
                ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3042
            ].
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3043
            ^ self
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3044
        ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3045
        ^ self
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3046
    ].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3047
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3048
    changedObject == imageEditView undoImages ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3049
        self valueOfCanUndo value:(changedObject notEmpty).
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3050
        ^ self.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3051
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3052
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3053
    changedObject == imageEditView ifTrue:[
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3054
        something == #imageColors ifTrue:[
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3055
            self updateListOfColorsAndColormapMode.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3056
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3057
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3058
        something == #image ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3059
            self imagePreView image:img.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3060
            self updateListOfColorsAndColormapMode.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3061
            self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3062
                self imagePreView tileMode:true tileOffset:(img extent).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3063
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3064
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3065
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3066
        something == #subImageIn ifTrue:[
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3067
            self imagePreView image ~~ img ifTrue:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  3068
                self error:'internal error' mayProceed:true.
1406
6de5c78f5bcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  3069
            ].
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3070
            self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3071
                self imagePreView invalidate.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3072
            ] ifFalse:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3073
                self imagePreView invalidate:aParameter.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3074
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3075
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3076
        ].
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  3077
        something == #selectedColor ifTrue:[
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3078
            (aParameter isNil or:[aParameter = (Color colorId:0)]) ifTrue:[
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3079
                "/ no color/mask */
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3080
                "/ self halt.
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3081
                clrIndex := self hasMask ifTrue:[1] ifFalse:[0].
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3082
            ] ifFalse:[
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3083
                clrIndex := self listOfColors indexOf:aParameter.
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  3084
            ].
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  3085
            self selectionOfColor value:clrIndex.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  3086
            ^ self.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  3087
        ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3088
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3089
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3090
1880
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3091
    changedObject == imageEditView modifiedHolder ifTrue:[
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3092
        "/ self halt:'to be implemented'.
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3093
        ^ self
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3094
    ].
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3095
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3096
    changedObject == imageEditView image ifTrue:[
1377
243baa3fce51 oops - leftover halts
Claus Gittinger <cg@exept.de>
parents: 1376
diff changeset
  3097
        self halt:'to be implemented'.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3098
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3099
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3100
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3101
    super update:something with:aParameter from:changedObject
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3102
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3103
    "Modified: / 10.2.2000 / 23:36:49 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3104
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3105
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3106
updateColorsFromImage:image
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3107
    |colors|
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3108
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  3109
    colors := image colorMap.
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  3110
    colors isNil ifTrue:[
1906
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  3111
        Error handle:[:ex |
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  3112
            colors := OrderedCollection new.
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  3113
        ] do:[
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  3114
            colors := image usedColors asSet.
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  3115
        ]
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3116
    ].
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  3117
    self listOfColors contents:(colors asOrderedCollection).
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3118
!
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3119
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3120
updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3121
    "updates channels and view, if image is loaded"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3122
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3123
    self imageIsLoaded value: false.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3124
    self listOfColors removeAll.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3125
    self imagePreView image: nil
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3126
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3127
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3128
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3129
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3130
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3131
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3132
updateLabelsAndHistory
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3133
    "updates labels and history, if something has changed"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3134
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3135
    |image|
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3136
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3137
    image := self image.
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3138
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3139
    self imageIsLoaded value: image notNil.
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3140
    image isNil ifTrue: [^nil].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3141
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3142
    self updateInfoLabel.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3143
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3144
    imageEditView resourceMessage asCollectionOfWords size = 2
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3145
        ifTrue: [self addToHistory: imageEditView resourceMessage -> #loadFromMessage:].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3146
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3147
    image fileName notNil
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  3148
        ifTrue: [self addToHistory: image fileName -> #loadFromFile:].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3149
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3150
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3151
updateListOfColorsAndColormapMode
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3152
    |colorMap image|
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3153
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3154
    image := self image.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3155
    colorMap := image colorMap.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3156
    colorMap size <= 4096 ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3157
        self listOfColors contents:colorMap.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3158
    ] ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3159
        self listOfColors removeAll.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3160
        colorMap isFixedPalette ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3161
            image colorMap:nil.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3162
            image photometric:#rgb.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3163
            image samplesPerPixel:3.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3164
            
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3165
            image bitsPerSample:(Array 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3166
                                    with:(colorMap bitsRed)
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3167
                                    with:(colorMap bitsGreen)
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3168
                                    with:(colorMap bitsBlue)).
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3169
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3170
    ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3171
    self findColorMapMode.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3172
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3173
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3174
!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
  3175
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  3176
atColor:anOldColor put:newColor
1952
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  3177
    "a color changed to a new color"
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  3178
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  3179
    |index list oldColor image newImage oldSel|
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3180
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3181
    list  := self listOfColors.
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  3182
    index := list identityIndexOf:anOldColor.
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3183
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  3184
    oldSel := self selectionOfColor value.
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3185
    index ~~ 0 ifTrue:[
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3186
        oldColor := list at:index.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3187
        list at:index put:newColor
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3188
    ] ifFalse:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  3189
        self error:'internal error' mayProceed:true.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3190
        list add:newColor
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3191
    ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3192
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3193
    image := self image.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3194
    (image colorMap isNil 
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3195
    and:[drawingColormap isNil]) ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3196
        oldColor notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3197
            imageEditView makeUndo.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3198
            newImage := image copy.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3199
            newImage
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3200
                colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) 
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3201
                do:[:x :y :clr |
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3202
                    |newClr|
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3203
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  3204
                    newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3205
                    newImage colorAtX:x y:y put:newClr
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3206
                ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3207
            imageEditView image:newImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3208
            imageEditView setModified.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3209
            self updateImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3210
            self updateImagePreView.
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  3211
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  3212
            self selectionOfColor value:oldSel.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  3213
            imageEditView selectedColorIndex:oldSel.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  3214
            imageEditView selectedColor:(self listOfColors at:oldSel).
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3215
        ]
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3216
    ].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3217
!
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3218
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3219
blueAtColor:aColor put:newBlue
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3220
    "helper used to return a new row element, when blue is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3221
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3222
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3223
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3224
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3225
    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
  3226
    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
  3227
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3228
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3229
             put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3230
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3231
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3232
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
  3233
    "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
  3234
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3235
    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
  3236
    ^ 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
  3237
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3238
    "Created: / 26.7.1998 / 12:30:35 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3239
    "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
  3240
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3241
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3242
canSelectBlueInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3243
    ^ aColor blueByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3244
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3245
    "Created: / 7.8.1998 / 22:50:34 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3246
    "Modified: / 7.8.1998 / 22:52:57 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3247
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3248
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3249
canSelectGreenInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3250
    ^ aColor greenByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3251
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3252
    "Created: / 7.8.1998 / 22:50:22 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3253
    "Modified: / 7.8.1998 / 22:52:46 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3254
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3255
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3256
canSelectRedInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3257
    ^ aColor redByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3258
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3259
    "Created: / 7.8.1998 / 22:50:00 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3260
    "Modified: / 7.8.1998 / 22:51:03 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3261
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3262
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3263
greenAtColor:aColor put:newGreen
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3264
    "helper used to return a new row element, when green is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3265
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3266
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3267
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3268
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3269
    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
  3270
    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
  3271
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3272
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3273
             put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3274
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3275
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3276
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
  3277
    "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
  3278
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3279
    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
  3280
    ^ 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
  3281
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3282
    "Created: / 26.7.1998 / 12:30:29 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3283
    "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
  3284
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3285
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3286
redAtColor:aColor put:newRed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3287
    "helper used to return a new row element, when red is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3288
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3289
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3290
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3291
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3292
    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
  3293
    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
  3294
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3295
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  3296
             put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3297
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3298
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3299
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
  3300
    "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
  3301
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3302
    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
  3303
    ^ 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
  3304
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3305
    "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
  3306
!
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  3307
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  3308
theColorItSelf:aColor
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  3309
    ^ 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
  3310
! !
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3311
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3312
!ImageEditor methodsFor:'help'!
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3313
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3314
defaultInfoLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3315
    "returns the default info label"
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3316
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3317
    |resourceClass resourceSelector|
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3318
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3319
    resourceClass := imageEditView resourceClass.
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  3320
    resourceClass notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3321
        resourceSelector notNil ifTrue:[
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3322
            ^ resourceClass name, ' >> ', imageEditView resourceSelector
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3323
        ].
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3324
    ].
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3325
    ^ 'No class and selector defined.'
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  3326
!
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  3327
702
c9de7a9bc416 docu call changed
tz
parents: 694
diff changeset
  3328
openDocumentation
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3329
    "opens the documentation file of the Image Editor"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  3330
763
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  3331
    self openHTMLDocument: 'tools/uipainter/ImageEditor.html'
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  3332
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3333
! !
738210a2fa06 revised version
tz
parents: 651
diff changeset
  3334
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3335
!ImageEditor methodsFor:'loading'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3336
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3337
loadFromClass:class selector:selector
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3338
    "loads an image by evaluating aMessage and sets up color map list and other info labels"
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3339
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3340
    (class isNil or:[selector]) isNil ifTrue:[
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3341
        imageEditView resourceClass:class.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3342
        imageEditView resourceSelector:selector.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3343
        ^ self.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3344
    ].
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3345
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3346
    (imageEditView loadFromClass:class selector:selector) notNil ifTrue:[
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3347
        self updateAfterImageChange.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3348
    ]
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3349
!
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3350
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3351
loadFromFile: aFileName
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3352
    "loads an image from aFileName and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3353
980
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3354
    self withCursor:Cursor wait do:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  3355
        (imageEditView loadFromFile: aFileName) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3356
            self updateAfterImageChange
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3357
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3358
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3359
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3360
    "Modified: / 16.3.1999 / 21:44:26 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3361
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3362
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3363
loadFromImage:anImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3364
    "loads an image from anImage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3365
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3366
    |img|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3367
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3368
    anImage notNil ifTrue:[    
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3369
        img := anImage onDevice:device.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3370
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3371
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3372
    imageEditView image:img.
1799
e605f0af928a clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents: 1796
diff changeset
  3373
    imageEditView clearModified.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3374
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3375
    self updateAfterImageChange.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3376
"/    img notNil ifTrue:[    
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3377
"/        self updateColorsFromImage:img.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3378
"/        self findColorMapMode.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3379
"/        self updateLabelsAndHistory.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3380
"/    ] ifFalse:[
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3381
"/        self updateForNoImage
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3382
"/    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3383
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3384
    "Modified: / 16.3.1999 / 21:43:56 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3385
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3386
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3387
loadFromMessage: aMessage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3388
    "loads an image by evaluating aMessage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3389
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3390
    (imageEditView loadFromMessage: aMessage) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3391
        self updateAfterImageChange.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3392
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3393
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3394
    "Modified: / 16.3.1999 / 21:44:41 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3395
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3396
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3397
loadFromOrPrepareForMessage: aMessage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3398
    "loads an image by evaluating aMessage;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3399
     if no image could extract from aMessage; do set the class and the selector from 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3400
     the aMessage for a saving at the end of editing"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3401
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3402
    (imageEditView loadFromMessage: aMessage) notNil ifTrue: [
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3403
        self updateColorsFromImage:self image.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3404
        self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3405
    ] ifFalse: [
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3406
        imageEditView resourceMessage: aMessage.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3407
    ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3408
    self updateLabelsAndHistory.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3409
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3410
    "Modified: / 16.3.1999 / 21:45:07 / cg"
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3411
!
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3412
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3413
updateAfterImageChange
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3414
    |img|
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3415
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3416
    (img := self image) notNil ifTrue:[
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3417
        img := img onDevice:device.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3418
        self updateColorsFromImage:img.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3419
        self findColorMapMode.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3420
        self updateLabelsAndHistory.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3421
    ] ifFalse:[
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3422
        self updateForNoImage
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  3423
    ]
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3424
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3425
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3426
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3427
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3428
colorMapMode
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3429
    "returns the colorMapMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3430
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3431
    colorMapMode isNil ifTrue: [colorMapMode := '' asValue].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3432
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3433
    ^colorMapMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3434
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3435
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3436
editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3437
    "returns editMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3438
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3439
    editMode isNil ifTrue: [
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3440
        editMode := #point asValue.
1329
a38c2e29d1fb use onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
  3441
        editMode onChangeEvaluate:[imageEditView editMode:(editMode value)]
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3442
    ].
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3443
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3444
    ^editMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3445
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3446
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3447
mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3448
    "returns mouseKeyColorMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3449
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3450
    mouseKeyColorMode isNil ifTrue:[
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3451
        mouseKeyColorMode := 1 asValue.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3452
        mouseKeyColorMode onChangeEvaluate: [
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3453
            imageEditView mouseKeyColorMode:mouseKeyColorMode value. 
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3454
            self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor).
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3455
        ]
956
dc4df8952e82 check whether imageEditView is nil
ca
parents: 951
diff changeset
  3456
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3457
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3458
    ^mouseKeyColorMode
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3459
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3460
    "Modified: / 10.2.2000 / 23:16:42 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3461
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3462
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3463
!ImageEditor methodsFor:'private'!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3464
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3465
pointFromString:aString
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3466
    |p s x y|
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3467
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3468
    p := Object readFromString:aString onError:nil.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  3469
    p isPoint ifTrue:[^ p].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3470
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3471
    s := aString readStream.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3472
    x := Number readFrom:s onError:nil.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3473
    x notNil ifTrue:[
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3474
        s skipSeparators.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  3475
        [s atEnd not and:[s peek isDigit not]] whileTrue:[s next].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3476
        y := Number readFrom:s onError:nil.
1961
d9082e597adb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1960
diff changeset
  3477
        ^ x @ (y ? x)
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3478
    ].
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  3479
    ^ nil
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3480
!
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  3481
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3482
sortBlockForColors
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3483
    ^ [:a :b |
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3484
            a redByte == b redByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3485
                a greenByte == b greenByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3486
                    a blueByte < b blueByte
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3487
                ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3488
                    a greenByte < b greenByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3489
                ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3490
            ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3491
                a redByte < b redByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3492
            ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3493
      ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3494
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  3495
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3496
updateImage
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3497
    |img|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3498
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3499
    img := imageEditView image.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3500
    imageEditView image:img.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3501
    self fetchImageData.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3502
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  3503
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3504
updateImagePreView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3505
    self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3506
        self imagePreView tileMode:true tileOffset:(self image extent).
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3507
    ].
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3508
    self imagePreView image:self image.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3509
! !
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3510
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3511
!ImageEditor methodsFor:'queries'!
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3512
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3513
hasMask
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3514
    ^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask']
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3515
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3516
    "Created: / 18.8.1998 / 17:17:38 / cg"
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
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3519
preferredExtent
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3520
    "returns the preferred extent"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3521
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3522
    ^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5)
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3523
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3524
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3525
! !
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  3526
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3527
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3528
228524287573 intitial checkin
tz
parents:
diff changeset
  3529
magnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3530
    "returns the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3531
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3532
    self imageEditView isNil ifTrue: [^1].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3533
    ^imageEditView magnification x
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3534
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3535
228524287573 intitial checkin
tz
parents:
diff changeset
  3536
magnification: aValue
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3537
    "sets the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3538
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  3539
    |magnification|        
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  3540
    magnification := (aValue ? 1) asPoint.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3541
    (magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3542
    imageEditView magnification: magnification
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3543
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3544
228524287573 intitial checkin
tz
parents:
diff changeset
  3545
selectedColorIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3546
    "returns the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3547
228524287573 intitial checkin
tz
parents:
diff changeset
  3548
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  3549
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3550
228524287573 intitial checkin
tz
parents:
diff changeset
  3551
selectedColorIndex: anIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3552
    "sets the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3553
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3554
    |clr pixel|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3555
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3556
    selectedColorIndex := anIndex.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3557
    clr := self listOfColors at:anIndex ifAbsent:nil.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3558
    clr isNil ifTrue:[^ self].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3559
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  3560
    pixel := anIndex - 1.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3561
    (self listOfColors at:1) = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3562
        anIndex == 1 ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3563
            pixel := nil.       "/ mask
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3564
        ] ifFalse:[
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  3565
            pixel := pixel - 1
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3566
        ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3567
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3568
    imageEditView selectedColorIndex:pixel.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3569
    imageEditView selectedColor:clr.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3570
228524287573 intitial checkin
tz
parents:
diff changeset
  3571
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3572
1716
5ae373f6fef0 method category rename
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
  3573
!ImageEditor methodsFor:'startup & release'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3574
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3575
closeDownViews
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3576
    builder notNil ifTrue:[
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3577
        DefaultRelativeSizes :=
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3578
            Array 
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3579
                with:(builder componentAt:#horizontalPanel) relativeCorners    
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3580
                with:(builder componentAt:#verticalPanel) relativeCorners.
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3581
    ].
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3582
    super closeDownViews
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3583
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3584
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3585
closeRequest
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3586
    "close request"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3587
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3588
    imageEditView checkModified ifTrue:[super closeRequest]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3589
228524287573 intitial checkin
tz
parents:
diff changeset
  3590
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3591
228524287573 intitial checkin
tz
parents:
diff changeset
  3592
open
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3593
    "after opening, sets the masterApplication of the imageEditView to self"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3594
228524287573 intitial checkin
tz
parents:
diff changeset
  3595
    super open.
444
cd7959cb70dd some clean ups
tz
parents: 420
diff changeset
  3596
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  3597
    imageEditView := (self componentAt: #imageEditView) subViews first.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3598
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3599
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3600
postBuildWith:aBuilder
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3601
    super postBuildWith:aBuilder.
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3602
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3603
    DefaultRelativeSizes notNil ifTrue:[
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3604
        (aBuilder componentAt:#horizontalPanel) relativeCorners:DefaultRelativeSizes first.
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3605
        (aBuilder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second.
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3606
    ].
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3607
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  3608
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3609
postOpenWith:aBuilder
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3610
    "after opening, sets the masterApplication of the imageEditView to self;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3611
     evaluate the postOpenAction"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3612
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3613
    imageEditView undoImages addDependent:self.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3614
    imageEditView imageInfoHolder:(self imageInfoHolder).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3615
    imageEditView activityInfoHolder:(self activityInfoHolder).
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3616
    imageEditView clickInfoCallBack:[:button :point | 
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3617
                        |mouseButtonColorToolBar|
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3618
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  3619
                        mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3620
                        (mouseButtonColorToolBar itemAt:button) toggleIndication.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3621
                        mouseButtonColorToolBar do: [:i| i updateIndicators].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3622
                  ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3623
    imageEditView addDependent:self.
1880
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3624
    imageEditView modifiedHolder addDependent:self.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3625
1921
699dca2ebb51 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1916
diff changeset
  3626
    postOpenAction value.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3627
1250
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  3628
    super postOpenWith:aBuilder.
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  3629
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  3630
    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
  3631
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3632
    "Modified: / 10.2.2000 / 23:17:43 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3633
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3634
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  3635
!ImageEditor methodsFor:'user actions-colormap'!
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3636
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3637
addColorToColormap
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3638
    self addColorToColormap:(Color black)
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3639
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3640
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3641
addColorToColormap:newColor
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3642
    |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
  3643
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3644
    img := self image.
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3645
    img isNil ifTrue:[
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3646
        self warn:'No Image.'.
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3647
        ^ self
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3648
    ].
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  3649
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3650
    depth := img depth.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3651
    cMap := img colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3652
    cMap isNil ifTrue:[
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3653
        drawingColormap isNil ifTrue:[
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  3654
            self information:(resources stringWithCRs:'Image has no colormap.\The shown colorMap is for drawing only.').
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3655
            drawingColormap := OrderedCollection new.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3656
        ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3657
        drawingColormap add:newColor.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3658
        self listOfColors contents:drawingColormap.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3659
        self selectionOfColor value:(drawingColormap size).
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3660
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3661
        "/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3662
        ^ self
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3663
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3664
1583
c21cb650b2a0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1579
diff changeset
  3665
    ("(depth == 1)" false
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3666
    or:[cMap size == (1 bitShift:depth)]) ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3667
        depth >= 8 ifTrue:[
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3668
            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
  3669
            ^ self
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3670
        ].
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  3671
        (self confirm:(resources stringWithCRs:'No space for more colors in colormap.\Change depth ?'))
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3672
        ifFalse:[
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3673
            ^ self
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3674
        ].
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3675
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3676
        imageEditView makeUndo.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3677
        img mask notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3678
            newMode := 'masked' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3679
        ] ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3680
            newMode := 'depth' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3681
        ].
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3682
        self colorMapMode:newMode.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3683
    ] ifFalse:[
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3684
        imageEditView makeUndo.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3685
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3686
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3687
    cMap := cMap asArray.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3688
    listOfColors := self listOfColors.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3689
    oldCListSize := listOfColors size.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3690
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3691
    newColorMap := cMap copyWith:newColor.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3692
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3693
    newImage := img species new
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3694
                    width:img width
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3695
                    height:img height
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3696
                    depth:depth
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3697
                    fromArray:img bits.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3698
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3699
    newImage colorMap:newColorMap.  
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3700
    newImage fileName:img fileName.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3701
    newImage mask:(img mask copy).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3702
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3703
    (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
  3704
        listOfColors contents: newImage colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3705
        self findColorMapMode.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3706
        "/ 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
  3707
        listOfColors size > (oldCListSize + 1) ifTrue:[
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3708
            listOfColors removeLast
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3709
        ].
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  3710
        self selectionOfColor value:(listOfColors size).
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3711
        self updateLabelsAndHistory.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3712
    ]
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3713
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3714
    "Created: / 12.3.1999 / 00:20:28 / cg"
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3715
    "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
  3716
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3717
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3718
changeHLS
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3719
    "interactive Hue/Light/Saturation editing"
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3720
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3721
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3722
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3723
     originalPixels p|
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3724
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  3725
    "/ compute the averageColor in the background (while asking user)
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3726
    readySema := Semaphore new.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3727
    [
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3728
        |image|
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3729
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3730
        image := imageEditView image.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3731
        originalColormap := image colorMap copy.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3732
        avgColor := image averageColor.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3733
        originalPixels := image bits.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3734
        readySema signal.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3735
    ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3736
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3737
    acceptChannel := TriggerValue new.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3738
    avgColorHolder := avgColor asValue.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3739
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3740
    firstChange := true.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3741
1651
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3742
    shiftedColor := [:clr :hShift :lFactor :sFactor |
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3743
                        Color 
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  3744
                                hue:((clr hue) ? 0 + hShift) 
1925
c307194083ec *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1924
diff changeset
  3745
                                light:((clr light * lFactor / 100) "min:100")
c307194083ec *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1924
diff changeset
  3746
                                saturation:((clr saturation * sFactor / 100) "min:100")].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3747
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3748
    shiftAction := 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3749
        [
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3750
            |hShift lFactor sFactor|
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3751
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3752
            acceptChannel value:true.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3753
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3754
            firstChange ifTrue:[
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3755
                imageEditView makeUndo.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3756
                firstChange := false.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3757
            ].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3758
            readySema notNil ifTrue:[readySema wait. readySema := nil].
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3759
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3760
            hShift := hueShift value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3761
            lFactor := lightValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3762
            sFactor := saturationValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3763
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3764
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3765
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3766
            shiftProcess notNil ifTrue:[
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3767
                shiftProcess terminate.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3768
                shiftProcess waitUntilTerminated.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3769
                shiftProcess := nil.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3770
            ].
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3771
            shiftProcess := 
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3772
                [
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3773
                    [
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3774
                        imageEditView image 
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3775
                            colorMap:originalColormap copy;
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3776
                            bits:originalPixels copy;
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3777
                            release;
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3778
                            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
  3779
                        self updateImage.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3780
                        self updateInfoLabel.
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3781
                        self updateImagePreView.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3782
                    ] ensure:[ shiftProcess := nil ].    
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3783
                ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3784
        ].
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3785
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3786
    bindings := IdentityDictionary new.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3787
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3788
    hueShift onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3789
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3790
    bindings at:#lightAmount put:(lightValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3791
    lightValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3792
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3793
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  3794
    saturationValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3795
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3796
    bindings at:#acceptChannel put:acceptChannel.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  3797
    bindings at:#hlsColor put:avgColorHolder.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3798
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  3799
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3800
    ifFalse:[ 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3801
        firstChange ~~ true ifTrue:[
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3802
            imageEditView undo
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3803
        ]
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3804
    ].
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3805
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3806
    (p := shiftProcess) notNil ifTrue:[
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3807
        p waitUntilTerminated.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3808
    ].
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3809
    self updateImage.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  3810
    self updateImagePreView.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3811
!
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3812
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3813
clearMaskedPixels
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3814
    "clear all masked pixels (to pixelValue 0)"
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3815
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3816
    |newImage oldImage| 
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3817
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3818
    oldImage := self image.
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3819
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3820
    imageEditView makeUndo.
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3821
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3822
    self withExecuteCursorDo:[
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3823
        newImage := oldImage clearMaskedPixels.
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3824
        0 to:newImage height - 1 do:[:y |
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3825
            0 to:newImage width - 1 do:[:x |
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3826
                (newImage maskAtX:x y:y) == 0 ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3827
                    newImage pixelAtX:x y:y put:0
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3828
                ]
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3829
            ]
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3830
        ].
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  3831
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3832
        (imageEditView image:newImage) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  3833
            self fetchImageData.
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3834
        ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3835
    ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3836
!
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  3837
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3838
colorMapChanged
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3839
    |img|
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3840
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3841
    img := self image.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3842
    img release.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3843
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3844
    self imageEditView invalidate.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3845
    self imagePreView invalidate.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3846
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3847
"/    (imageEditView image:img) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3848
"/        self updateLabelsAndHistory.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3849
"/        self imagePreView image:img
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3850
"/    ]
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3851
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3852
    "Created: / 7.8.1998 / 22:26:10 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  3853
    "Modified: / 18.8.1998 / 17:08:55 / cg"
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3854
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  3855
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3856
colorMapMode:aMode
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3857
    "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
  3858
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3859
    |depth numColors newColorMap newImage 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3860
     oldImage image newColors realColorMap oldFileName
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3861
     usedColors useNearest usageCounts tmpBits tmpMap quest
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3862
     prevMode maskThreshold maskImage| 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3863
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3864
    self withExecuteCursorDo:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3865
        oldImage := self image.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3866
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  3867
        prevMode := colorMapMode value.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3868
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3869
        newColorMap := self class listOfColorMaps at:aMode.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3870
        depth       := (newColorMap size log:2) asInteger. 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3871
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3872
        useNearest := false.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3873
        depth == 1 ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3874
            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
  3875
        ] ifFalse:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3876
            prevMode isNil ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3877
                quest := 'Compute colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3878
            ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3879
                quest := 'Keep colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3880
            ]
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3881
        ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3882
        ((prevMode = aMode)
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3883
        or:[depth > oldImage depth
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  3884
        or:[self confirm:(resources string:quest)]]) ifTrue:[
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  3885
            (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3886
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3887
                "/ keep the colormap
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3888
                newColorMap atAllPut:Color black.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3889
                depth > oldImage depth ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3890
                    "/ easy - simply copy the part
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3891
                    numColors := 1 bitShift:oldImage depth.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3892
                    0 to:numColors-1 do:[:pixel |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3893
                        newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel)
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3894
                    ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3895
                ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3896
                    "/ see if all used color fit the new colormap
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3897
                    usedColors := oldImage usedColorsMax:(1 bitShift:depth).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3898
                    (usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3899
                        usedColors := oldImage realUsedColors
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3900
                    ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3901
                    (usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3902
                        "/ yea - just install them
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3903
                        usedColors asArray keysAndValuesDo:[:idx :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3904
                            newColorMap at:idx put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3905
                        ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3906
                    ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3907
                        "/ copy over those that are most often used.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3908
                        oldImage depth < 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3909
                            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3910
                            oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3911
                                expandPixels:(oldImage depth)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3912
                                width:oldImage width
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3913
                                height:oldImage height 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3914
                                into:tmpBits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3915
                                mapping:nil.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  3916
                        ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3917
                            oldImage depth == 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3918
                                tmpBits := oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3919
                            ] ifFalse:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3920
                                colorMapMode value:prevMode.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3921
                                self findColorMapMode.    
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3922
                                self warn:('Too many used colors in image (', oldImage usedColors size printString , ').').
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3923
                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3924
    "/                            (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs))
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3925
    "/                            ifFalse:[.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3926
    "/                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3927
    "/                            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3928
    "/                            self image: (Image newForDepth:depth) fromImage:oldImage.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3929
    "/                            ^ self.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3930
                            ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3931
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3932
                        usageCounts := tmpBits usageCounts.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3933
                        tmpMap := Array new:usageCounts size.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3934
                        oldImage colorMap asArray keysAndValuesDo:[:i :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3935
                            tmpMap at:i put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3936
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3937
                        usageCounts sort:[:a :b | a > b] with:tmpMap.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3938
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3939
                        1 to:(1 bitShift:depth) do:[:idx |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3940
                            newColorMap at:idx put:(tmpMap at:idx)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3941
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3942
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3943
                        useNearest := Dialog 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3944
                                            confirmWithCancel:(resources 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3945
                                                                  stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?'
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3946
                                                                  with:usedColors size
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3947
                                                                  with:(1 bitShift:depth))
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3948
                                            labels:(resources array:#('Cancel' 'First' 'Nearest')).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3949
                        useNearest isNil ifTrue:[
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  3950
                            colorMapMode value:prevMode.
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3951
                            ^ self   "/ cancel
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3952
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  3953
                    ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3954
                ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3955
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3956
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3957
            "/ standard colormap
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3958
            usedColors := oldImage usedColors.
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3959
            (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
  3960
                useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3961
                                    confirmWithCancel:(resources 
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  3962
                                                           stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?'
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  3963
                                                       ) 
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3964
                                    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
  3965
                useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3966
                    colorMapMode value:prevMode.
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3967
                    ^ self   "/ cancel
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3968
                ].
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3969
            ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3970
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3971
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3972
        imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3973
1424
d7367ae7f85e fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
  3974
        newImage    := Image newForDepth:depth.
d7367ae7f85e fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
  3975
        newImage depth:depth.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3976
        oldFileName := oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3977
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3978
        Image imageErrorSignal handle:[:ex|
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3979
            Color colorErrorSignal handle:[:ex|
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  3980
                colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3981
                imageEditView undo.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3982
                ^ self warn:(resources string:'Conversion failed !!')
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3983
            ] do:[
1393
c4a11a7d407f use Image>>newForDepth:
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  3984
                newImage := Image newForDepth:depth.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3985
                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
  3986
                newImage colorMap:newColorMap.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3987
                newImage photometric:#palette.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3988
                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
  3989
            
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3990
                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
  3991
                [:x :y :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3992
                    |newColor|
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3993
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3994
                    (newColorMap includes:clr)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3995
                        ifTrue: [newColor := clr]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  3996
                        ifFalse: [
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3997
                            newColor := clr nearestIn:newColorMap.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3998
                            useNearest ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3999
                                (newColor deltaFrom:clr) > 0.5 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4000
                                    newColor := oldImage colorFromValue:0
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4001
                                ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4002
                            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4003
                        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4004
                    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
  4005
                ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4006
                image := newImage
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4007
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4008
        ] do:[ 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4009
            image := newImage fromImage:oldImage
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4010
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4011
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4012
        (aMode asString startsWith:'mask') ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4013
            image mask isNil ifTrue:[
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  4014
                false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4015
                    maskThreshold := 0.1.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4016
                    maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4017
                ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4018
                    maskImage := Depth1Image extent:image extent.
1770
9000adb21f79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1769
diff changeset
  4019
                    maskImage bits:(ByteArray 
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4020
                                        new:(maskImage bytesPerRow * maskImage height)
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4021
                                        withAll:16rFF).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4022
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4023
"/                    maskImage fillRectangle:(image bounds) withColor:(Color colorId:1).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4024
                ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4025
                image mask:maskImage.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4026
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4027
        ] ifFalse:[ 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4028
            image mask: nil.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4029
        ]. 
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4030
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  4031
        (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4032
            realColorMap := OrderedCollection new.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4033
            image realColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4034
                (realColorMap includes: clr) ifFalse: [realColorMap add: clr]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4035
            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4036
            newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4037
            newColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4038
                ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4039
                ifTrue:[      
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4040
                    newColors add: clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4041
                ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4042
            ].                  
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  4043
            image colorMap: newColors.   
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4044
        ].
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4045
        image fileName: oldFileName.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4046
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4047
        (imageEditView image: image) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4048
            self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4049
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4050
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4051
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4052
    "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
  4053
!
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4054
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4055
compressColorMap
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4056
    "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
  4057
927
74a71f2c5ef8 obsolete locals removed
tz
parents: 926
diff changeset
  4058
    |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
  4059
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4060
    oldImage := self image.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4061
    depth := oldImage depth.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4062
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4063
    oldImage photometric ~~ #palette ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4064
        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
  4065
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4066
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4067
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  4068
    usedColors := oldImage realUsedColors.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4069
    usedColors size == (1 bitShift:depth) ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4070
        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
  4071
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4072
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4073
    usedColors size == oldImage colorMap size ifTrue:[
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4074
        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
  4075
        ^ self
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4076
    ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4077
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4078
    imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4079
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  4080
"/    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
  4081
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4082
    self withExecuteCursorDo:[
996
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  4083
"/        newColorMap := Array new:usedColors size.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4084
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4085
        "/ translation table
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4086
        oldToNew := ByteArray new:(1 bitShift:depth).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4087
        newColorMap := usedColors asArray.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4088
        newColorMap sort:self sortBlockForColors.
996
9423ae277168 sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  4089
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4090
        oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4091
            |newPixel|
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4092
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4093
            (usedColors includes:clr) ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4094
                newPixel := newColorMap indexOf:clr.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4095
                oldToNew at:oldIdx put:newPixel-1.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4096
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4097
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4098
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4099
        oldBits := oldImage bits.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4100
        newBits := ByteArray new:(oldBits size).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4101
        depth ~~ 8 ifTrue:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4102
            "/ expand/compress can only handle 8bits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4103
            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
  4104
            oldBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4105
                expandPixels:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4106
                width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4107
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4108
                into:tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4109
                mapping:oldToNew.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4110
            tmpBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4111
                compressPixels:depth 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4112
                width:oldImage width 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4113
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4114
                into:newBits 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4115
                mapping:nil
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4116
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4117
            oldBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4118
                expandPixels:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4119
                width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4120
                height:oldImage height 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4121
                into:newBits
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4122
                mapping:oldToNew.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4123
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4124
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4125
        newImage := oldImage species new
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4126
                        width:oldImage width
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4127
                        height:oldImage height
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4128
                        depth:depth
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4129
                        fromArray:newBits.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4130
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4131
        newImage colorMap:newColorMap.  
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4132
        newImage fileName:oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4133
        newImage mask:(oldImage mask copy).
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4134
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4135
        (imageEditView image:newImage) notNil ifTrue:
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4136
        [
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4137
            self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4138
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4139
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4140
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4141
    "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
  4142
    "Modified: / 15.9.1998 / 17:53:32 / cg"
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4143
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4144
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4145
copyColorFromColormap
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  4146
    imageEditView setClipboardObject:(self selectedColorOrNil)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4147
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4148
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4149
copyMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4150
    |mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4151
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4152
    mask := self image mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4153
    MaskClipboard := mask subImageIn: (0@0 extent:mask extent).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4154
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4155
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4156
editSelectedColor
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4157
    self processSelectedColorWith:[:clr | 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4158
        |editor|
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4159
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4160
        editor := ColorEditDialog new.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4161
        editor color:clr.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4162
        editor open.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4163
        editor accepted ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4164
            AbortOperationRequest raise.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4165
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4166
        editor color
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4167
    ]
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4168
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4169
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4170
fetchImageData
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  4171
    |image|
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  4172
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  4173
    (image := imageEditView image) notNil ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  4174
        self findColorMapMode.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  4175
        self updateLabelsAndHistory.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  4176
    ]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4177
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4178
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  4179
inspectColor
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4180
    |clrIndex|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4181
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4182
    clrIndex := self selectedColorIndexOrNil.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4183
    clrIndex isNil ifTrue:[
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  4184
        ^ self
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  4185
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4186
    (self image colorFromValue:clrIndex-1) inspect
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  4187
!
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  4188
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4189
makeBrighter
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4190
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4191
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4192
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4193
        anyChange := imageEditView makeBrighter.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4194
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4195
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4196
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4197
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4198
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4199
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4200
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4201
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4202
makeDarker
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4203
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4204
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4205
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4206
        anyChange := imageEditView makeDarker.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4207
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4208
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4209
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4210
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4211
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4212
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4213
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4214
1926
b3d2dab90f9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1925
diff changeset
  4215
makeGrayScaleImage
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4216
    |anyChange|
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4217
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4218
    self withExecuteCursorDo:[
1926
b3d2dab90f9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1925
diff changeset
  4219
        anyChange := imageEditView makeGrayScaleImage.
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4220
        anyChange ifFalse:[
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4221
            Dialog warn:'Image unchanged'.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4222
        ] ifTrue:[
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4223
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4224
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4225
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4226
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4227
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4228
makeInverse
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4229
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4230
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4231
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4232
        anyChange := imageEditView makeInverse.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4233
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4234
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4235
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4236
            self updateImage.
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4237
        ]
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4238
    ].
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4239
!
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4240
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4241
makeSelectedColorBrighter
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4242
    self processSelectedColorWith:[:clr | clr lightened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4243
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4244
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4245
makeSelectedColorDarker
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4246
    self processSelectedColorWith:[:clr | clr darkened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4247
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4248
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  4249
makeSelectedColorGray
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  4250
    self processSelectedColorWith:[:clr | Color brightness:(clr brightness)]
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  4251
!
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  4252
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4253
pasteColorIntoColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4254
    |copyBufferColor|
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4255
1873
04fcd03a8e6d get selection interface changed
ca
parents: 1871
diff changeset
  4256
    copyBufferColor := imageEditView getClipboardObject.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4257
    copyBufferColor isColor ifFalse:[
1879
03581b0d7c8f Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents: 1873
diff changeset
  4258
        self window beep.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4259
        ^ self
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4260
    ].
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4261
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4262
    self processSelectedColorWith:[:clr |
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4263
        copyBufferColor
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4264
    ]
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4265
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4266
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4267
pasteMask
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4268
    |img mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4269
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4270
    imageEditView makeUndo.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4271
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4272
    img := self image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4273
    mask := img mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4274
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4275
    mask 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4276
         copyFrom:MaskClipboard
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4277
         x:0 y:0
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4278
         toX:0 y:0 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4279
         width:(mask width min:MaskClipboard width)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4280
         height:(mask height min:MaskClipboard height).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4281
    img mask:mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4282
    (imageEditView image:img copy) notNil ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4283
        self fetchImageData.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4284
    ]
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4285
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4286
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4287
pickAndAddColorToColormap
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4288
    self addColorToColormap:(Color fromUser)
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4289
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4290
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  4291
pickAndPasteColor
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  4292
    self pickColor.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  4293
    self pasteColorIntoColormap.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  4294
!
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  4295
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4296
pickColor
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  4297
    imageEditView setClipboardObject:(Color fromUser)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4298
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4299
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4300
processSelectedColorWith:aBlock
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4301
    "undoable color processing: the selected color will be replaced by the
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4302
     value of aBlock"
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4303
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4304
    |img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4305
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4306
    selectedColorIndex := self selectedColorIndexOrNil.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4307
    selectedColorIndex isNil ifTrue:[^ self].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4308
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4309
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4310
    cMap := img colorMap.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4311
    cMap isNil ifTrue:[
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  4312
        self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.').
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4313
        ^ self
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4314
    ].
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4315
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4316
    oldColor := cMap at:selectedColorIndex.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4317
    imageEditView makeUndo.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4318
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4319
    modifiedColormap := cMap asArray copy.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4320
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4321
    newColor := aBlock value:oldColor.
1859
254fc0e37550 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1852
diff changeset
  4322
    modifiedColormap at:selectedColorIndex put:newColor.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4323
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4324
    newImage := img species new
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4325
                    width:img width
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4326
                    height:img height
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  4327
                    depth:img depth
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4328
                    fromArray:img bits.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4329
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4330
    newImage colorMap:modifiedColormap.  
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4331
    newImage fileName:img fileName.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4332
    newImage mask:(img mask copy).
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4333
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4334
    oldSelection := self selectionOfColor value.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4335
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4336
    (imageEditView image:newImage) notNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4337
        self fetchImageData.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4338
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4339
    self selectionOfColor value:oldSelection.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4340
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4341
    "Created: / 12.3.1999 / 00:20:28 / cg"
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4342
    "Modified: / 16.3.1999 / 21:57:26 / cg"
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4343
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4344
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4345
reduceNumberOfColors
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4346
    |s n anyChange img usedColors|
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4347
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4348
    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
  4349
    s size == 0 ifTrue:[^ self].
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4350
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4351
    n := Integer readFrom:s onError:0.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4352
    (n between:1 and:7) ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4353
        Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4354
        ^ self
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4355
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4356
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4357
    self withExecuteCursorDo:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4358
        anyChange := imageEditView reduceColorResolutionBy:n.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4359
        anyChange ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4360
            Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4361
        ] ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4362
            img := imageEditView image.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4363
            imageEditView image:img.
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4364
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4365
            self fetchImageData.
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4366
            usedColors := img usedColorsMax:10000.
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4367
            usedColors size == 10000 ifTrue:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4368
                Dialog information:('>= ' , usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4369
            ] ifFalse:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4370
                Dialog information:(usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  4371
            ]
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4372
        ]
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4373
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4374
!
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4375
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4376
reduceNumberOfColors2
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4377
    |s rndR rndG rndB usedColors image newImage|
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4378
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4379
    s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4.
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4380
    s size == 0 ifTrue:[^ self].
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4381
    rndR := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4382
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4383
    s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4384
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4385
    rndG := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4386
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4387
    s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4388
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4389
    rndB := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4390
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4391
    ((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4392
        Dialog warn:'Image unchanged'.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4393
        ^ self
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4394
    ].
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4395
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4396
    self withExecuteCursorDo:[
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4397
        image := self image.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4398
        usedColors := image usedColors.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4399
        imageEditView makeUndo.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4400
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4401
        newImage := image copy.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4402
        image
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4403
            colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) 
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4404
            do:[:x :y :clr |
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4405
                |r g b nr ng nb newClr|
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4406
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4407
                r := clr redByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4408
                g := clr greenByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4409
                b := clr blueByte. 
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4410
                nr := (r roundTo:rndR) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4411
                ng := (g roundTo:rndG) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4412
                nb := (b roundTo:rndB) min:255. 
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4413
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4414
                newClr := Color redByte:nr greenByte:ng blueByte:nb.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4415
                newImage colorAtX:x y:y put:newClr
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4416
            ].
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4417
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4418
        imageEditView image:newImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4419
        imageEditView setModified.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4420
        self updateImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4421
        self updateImagePreView.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4422
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4423
        self fetchImageData.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4424
        usedColors := newImage usedColorsMax:10000.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4425
        usedColors size == 10000 ifTrue:[
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4426
            Dialog information:('>= ' , usedColors size printString , ' colors used.')
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4427
        ] ifFalse:[
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4428
            Dialog information:(usedColors size printString , ' colors used.')
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  4429
        ]
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4430
    ].
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4431
!
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4432
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4433
selectedColorIndexOrNil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4434
    | img clrIndex|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4435
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4436
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4437
    img isNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4438
        self warn:'No Image.'.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4439
        ^ nil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4440
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4441
    clrIndex := self selectionOfColor value.
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4442
    self hasMask "img mask notNil" ifTrue: [ 
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4443
        clrIndex == 1 ifTrue:[^ nil].
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  4444
        clrIndex == 0 ifTrue:[^ nil].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4445
        ^ clrIndex - 1 
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4446
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4447
    ^ clrIndex
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4448
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4449
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4450
selectedColorOrNil
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4451
    |cmapIndex img cMap|
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4452
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4453
    cmapIndex := self selectedColorIndexOrNil.
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4454
    cmapIndex isNil ifTrue:[^ nil].
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4455
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4456
    img := self image.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4457
    cMap := img colorMap.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4458
    cMap isNil ifTrue:[
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  4459
        self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.').
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4460
        ^ nil
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4461
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4462
    ^ cMap at:cmapIndex.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4463
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  4464
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4465
sortColorMap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4466
    "calculates a new color map for the image, sorting colors"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4467
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4468
    self 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4469
        sortColorMapWith:self sortBlockForColors
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4470
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4471
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4472
sortColorMapWith:sortBlock
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4473
    "calculates a new color map for the image, sorting colors"
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4474
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4475
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4476
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4477
    oldImage := self image.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4478
    depth := oldImage depth.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4479
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4480
    oldImage photometric ~~ #palette ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4481
        self information:'Compress colorMap: Only palette images have colormaps.'.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4482
        ^ self
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4483
    ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4484
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4485
    usedColors := oldImage realColorMap.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4486
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4487
    imageEditView makeUndo.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4488
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4489
    self withExecuteCursorDo:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4490
"/        newColorMap := Array new:usedColors size.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4491
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4492
        "/ translation table
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4493
        oldToNew := ByteArray new:(1 bitShift:depth).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4494
        newColorMap := usedColors asArray.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4495
        newColorMap sort:sortBlock.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4496
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4497
        oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4498
            |newPixel|
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4499
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4500
            (usedColors includes:clr) ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4501
                newPixel := newColorMap indexOf:clr.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4502
                oldToNew at:oldIdx put:newPixel-1.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4503
            ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4504
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4505
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4506
        oldBits := oldImage bits.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4507
        newBits := ByteArray new:(oldBits size).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4508
        depth ~~ 8 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4509
            "/ expand/compress can only handle 8bits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4510
            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4511
            oldBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4512
                expandPixels:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4513
                width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4514
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4515
                into:tmpBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4516
                mapping:oldToNew.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4517
            tmpBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4518
                compressPixels:depth 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4519
                width:oldImage width 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4520
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4521
                into:newBits 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4522
                mapping:nil
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4523
        ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4524
            oldBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4525
                expandPixels:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4526
                width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4527
                height:oldImage height 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4528
                into:newBits
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4529
                mapping:oldToNew.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4530
        ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4531
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4532
        newImage := oldImage species new
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4533
                        width:oldImage width
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4534
                        height:oldImage height
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4535
                        depth:depth
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4536
                        fromArray:newBits.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4537
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4538
        newImage colorMap:newColorMap.  
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4539
        newImage fileName:oldImage fileName.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4540
        newImage mask:(oldImage mask copy).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4541
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4542
        (imageEditView image:newImage) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  4543
            self fetchImageData.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4544
        ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4545
    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4546
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4547
    "Modified: / 15.9.1998 / 17:53:32 / cg"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4548
    "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
  4549
! !
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4550
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  4551
!ImageEditor methodsFor:'user actions-editing'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4552
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4553
doBrightenImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4554
    imageEditView brightenImage.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4555
    self listOfColors removeAll.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4556
    self findColorMapMode.     
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4557
    imageEditView undoImages removeLast
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4558
!
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4559
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4560
doBrowseClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4561
    "opens a System Browser on the resourceClass and the resourceSelector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4562
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4563
    |cls|
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4564
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4565
    cls := imageEditView resourceClass.
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4566
    cls isNil ifTrue:[^ self warn:'No Class specified'].
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4567
1488
cb1867473e3e UserPreference access
Claus Gittinger <cg@exept.de>
parents: 1481
diff changeset
  4568
    UserPreferences systemBrowserClass
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4569
        openInClass:cls class 
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4570
        selector:(imageEditView resourceSelector)
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4571
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4572
    "Modified: / 31.7.1998 / 02:01:15 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4573
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4574
1703
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4575
doCopyImageToClipboard
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4576
    imageEditView copyImageToClipboard.
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4577
!
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  4578
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4579
doCropAll
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4580
    "find all borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4581
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4582
    imageEditView cropLeft:true right:true top:true bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4583
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4584
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4585
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4586
    "Created: / 7.9.1998 / 16:33:43 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4587
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4588
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4589
doCropBottom
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4590
    "find a bottom border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4591
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4592
    imageEditView cropLeft:false right:false top:false bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4593
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4594
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4595
    "Created: / 7.9.1998 / 13:00:20 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4596
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4597
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4598
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4599
doCropLeft
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4600
    "find a left border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4601
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4602
    imageEditView cropLeft:true right:false top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4603
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4604
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4605
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4606
    "Modified: / 7.9.1998 / 14:26:34 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4607
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4608
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4609
doCropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4610
    "let user specify borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4611
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4612
    |bindings left top right bottom img firstChange gropAction acceptChannel|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4613
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4614
    acceptChannel := TriggerValue new.
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4615
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4616
    firstChange := true.
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4617
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4618
    gropAction := 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4619
        [:lV :rV :tV :bV | |l r t b|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4620
            acceptChannel value:true.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4621
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4622
            l := lV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4623
            r := rV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4624
            t := tV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4625
            b := bV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4626
            (l + r + t + b) == 0 ifTrue:[
1879
03581b0d7c8f Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents: 1873
diff changeset
  4627
                self window beep
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4628
            ] ifFalse:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4629
                img := imageEditView image.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4630
                firstChange ifTrue:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4631
                    imageEditView makeUndo.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4632
                    firstChange := false.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4633
                ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4634
                imageEditView
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4635
                    makeSubImageX:l y:t 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4636
                    width:(img width - l - r)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4637
                    height:(img height - t - b).
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4638
                self updateInfoLabel
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4639
            ].
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  4640
        ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4641
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4642
    bindings := IdentityDictionary new.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4643
    bindings at:#left put:(left := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4644
    bindings at:#right put:(right := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4645
    bindings at:#top put:(top := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4646
    bindings at:#bottom put:(bottom := 1 asValue).
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4647
    bindings at:#acceptChannel put:acceptChannel.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4648
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4649
    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
  4650
    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
  4651
    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
  4652
    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
  4653
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  4654
    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
  4655
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  4656
    (self openDialogInterface:#cropDialogSpec withBindings:bindings) 
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4657
    ifFalse:[ 
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4658
        firstChange ~~ true ifTrue:[
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4659
            imageEditView undo.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4660
            self updateImagePreView.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4661
        ]
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  4662
    ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4663
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4664
    "Created: / 7.9.1998 / 18:16:07 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4665
    "Modified: / 7.9.1998 / 18:20:42 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4666
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4667
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4668
doCropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4669
    "find a right border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4670
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4671
    imageEditView cropLeft:false right:true top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4672
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4673
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4674
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4675
    "Modified: / 7.9.1998 / 14:26:44 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4676
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4677
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4678
doCropTop
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4679
    "find a top border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4680
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  4681
    imageEditView cropLeft:false right:false top:true bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4682
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4683
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4684
    "Created: / 7.9.1998 / 13:00:19 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4685
    "Modified: / 7.9.1998 / 14:26:52 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4686
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  4687
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4688
doDarkenImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4689
    imageEditView darkenImage.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4690
    self listOfColors removeAll.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4691
    self findColorMapMode.     
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4692
    imageEditView undoImages removeLast
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4693
!
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  4694
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4695
doEditMask
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4696
    ""
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4697
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4698
    self image mask edit
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4699
!
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  4700
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4701
doFlipHorizontal
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4702
    "flips horizontally current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4703
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4704
    imageEditView flipHorizontal
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4705
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4706
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4707
doFlipVertical
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4708
    "flips vertically current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4709
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4710
    imageEditView flipVertical
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4711
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4712
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4713
doInspectImage
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4714
    "opens a System Browser on the resourceClass and the resourceSelector"
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4715
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4716
    self image inspect
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4717
!
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4718
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4719
doMagnifyDown
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4720
    "magnifies current image one step down"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4721
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4722
    |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
  4723
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4724
    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
  4725
    (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
  4726
        magHolder value: mag - 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4727
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4728
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4729
    "Modified: / 26.7.1998 / 20:24:08 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4730
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4731
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4732
doMagnifyImage
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4733
    "magnifies the current image to a new size"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4734
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4735
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4736
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4737
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4738
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4739
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4740
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4741
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4742
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4743
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4744
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4745
    (box accepted 
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4746
    and: [(newSize := self pointFromString:(box contents)) notNil])
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4747
    ifTrue:[
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4748
        newSize isPoint ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4749
            self warn:'please enter the new size as ''x @ y''.'.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4750
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4751
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4752
        imageEditView magnifyImageTo:newSize.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4753
    ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4754
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4755
    self updateInfoLabel
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4756
!
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4757
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4758
doMagnifyImageBy
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4759
    "magnifies the current image (by a scale)"
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4760
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4761
    |box oldSize newSize scale image|
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4762
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4763
    image := imageEditView image.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4764
    oldSize := image extent.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4765
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4766
    box := EnterBox new.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4767
    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
  4768
    box okText:(resources string:'OK').
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4769
    box abortText:(resources string:'Cancel').
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4770
    box initialText:1 printString.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4771
    box showAtPointer.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4772
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4773
    (box accepted 
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4774
    and: [(scale := Object readFromString:(box contents) onError:nil) notNil])
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4775
    ifTrue:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4776
        scale isNumber ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4777
            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
  4778
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4779
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  4780
        newSize := oldSize * scale.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4781
        imageEditView magnifyImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4782
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4783
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4784
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  4785
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4786
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4787
doMagnifyUp
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4788
    "magnifies current image one step up"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4789
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4790
    |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
  4791
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4792
    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
  4793
    (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
  4794
        magHolder value: mag + 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4795
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4796
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4797
    "Modified: / 26.7.1998 / 20:23:52 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4798
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4799
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4800
doNegativeImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4801
    "negates current image by negating the color map"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4802
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4803
    self image depth ~~ 1 ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4804
        Dialog warn:'Only useful for depth 1 images'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4805
        ^ self
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4806
    ].
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4807
    imageEditView negativeImage.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4808
    self listOfColors removeAll.
901
ce482227787d several undos
tz
parents: 900
diff changeset
  4809
    self findColorMapMode.     
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4810
    imageEditView undoImages removeLast
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4811
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4812
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4813
doResizeImage
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4814
    "resizes the current image"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4815
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4816
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4817
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4818
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4819
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4820
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4821
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4822
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4823
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4824
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4825
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4826
    (box accepted 
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4827
    and: [(newSize := self pointFromString:(box contents)) notNil])
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4828
    ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4829
        imageEditView resizeImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4830
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4831
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4832
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4833
doRotateImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4834
    "rotates current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4835
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4836
    |box rotation|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4837
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4838
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4839
    box title:(resources string:'Rotate by (degrees, clockwise):').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4840
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4841
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4842
    box initialText: '0'.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4843
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4844
    (box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil])
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4845
    ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4846
        imageEditView rotateImageBy:rotation.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4847
        self updateInfoLabel.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4848
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4849
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4850
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4851
doShiftManual
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4852
    "let user specify amount and shift"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4853
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  4854
    |bindings amount img firstChange shiftAction acceptChannel wrapHolder|
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4855
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4856
    acceptChannel := TriggerValue new.
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4857
    wrapHolder := (lastShiftUsedWrap ? true) asValue.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4858
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4859
    firstChange := true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4860
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4861
    shiftAction := 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4862
        [:shiftH :shiftV | 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4863
            acceptChannel value:true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4864
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4865
            img := imageEditView image.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4866
            firstChange ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4867
                imageEditView makeUndo.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4868
                firstChange := false.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4869
            ].
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  4870
            imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value).
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4871
            self updateInfoLabel
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4872
        ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4873
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4874
    bindings := IdentityDictionary new.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4875
    bindings at:#shiftAmount put:(amount := 1 asValue).
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  4876
    bindings at:#wrap put:wrapHolder.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4877
    bindings at:#acceptChannel put:acceptChannel.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4878
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4879
    bindings at:#shiftLeftNow   put:[ shiftAction value:(-1*amount value) value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4880
    bindings at:#shiftRightNow  put:[ shiftAction value:amount value value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4881
    bindings at:#shiftUpNow     put:[ shiftAction value:0 value:(-1*amount value) ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4882
    bindings at:#shiftDownNow   put:[ shiftAction value:0 value:amount value ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4883
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4884
    (self openDialogInterface:#shiftDialogSpec withBindings:bindings) 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4885
    ifFalse:[ 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4886
        firstChange ~~ true ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4887
          imageEditView undo
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4888
        ]
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4889
    ].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4890
    lastShiftUsedWrap := wrapHolder value.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4891
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4892
    "Created: / 7.9.1998 / 18:16:07 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4893
    "Modified: / 7.9.1998 / 18:20:42 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4894
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  4895
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4896
doUnCropManual
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4897
    "let user specify borders and add them"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4898
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4899
    |bindings left top right bottom img|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4900
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4901
    bindings := IdentityDictionary new.
1704
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4902
    bindings at:#left put:(left := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4903
    bindings at:#right put:(right := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4904
    bindings at:#top put:(top := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  4905
    bindings at:#bottom put:(bottom := 1 asValue).
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  4906
    (self openDialogInterface:#uncropDialogSpec withBindings:bindings)
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4907
    ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4908
        left := left value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4909
        right := right value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4910
        top := top value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4911
        bottom := bottom value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4912
        img := imageEditView image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4913
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4914
        imageEditView
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4915
            makeBorderedImageX:left y:top 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4916
            width:(img width + left + right)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4917
            height:(img height + top + bottom).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4918
        self updateInfoLabel
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4919
    ].
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4920
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4921
    "Created: / 7.9.1998 / 18:16:07 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4922
    "Modified: / 7.9.1998 / 18:20:42 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4923
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  4924
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4925
doUndo
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4926
    "reverses last edit action"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4927
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  4928
    imageEditView undo.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4929
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4930
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  4931
!ImageEditor methodsFor:'user actions-loading'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4932
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4933
doLoadFromClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4934
    "opens a dialog for loading an image from class and a (resource-) selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4935
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4936
    |img|
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4937
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4938
    (imageEditView loadFromClass) notNil ifTrue:[
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4939
        imageSeqNr := nil.
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  4940
        (img := self image) notNil ifTrue: [
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4941
            self updateColorsFromImage:img.
574
8d82e8f101c1 undo disabling
tz
parents: 573
diff changeset
  4942
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4943
            self updateLabelsAndHistory.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4944
        ] ifFalse: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4945
            self updateForNoImage
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4946
        ].
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  4947
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4948
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4949
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4950
doLoadFromFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4951
    "opens a dialog for loading an image from a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4952
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  4953
    |img file filters|
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4954
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4955
    imageSeqNr := nil.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4956
    img := self image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4957
    img notNil ifTrue: [
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4958
        file := img fileName
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4959
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4960
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4961
    filters := FileSelectionBrowser loadImageFileNameFilters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4962
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4963
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4964
        file := FileSelectionBrowser
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4965
                    request:'Load Image From'
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4966
                    fileName:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4967
                    withFileFilters:filters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4968
    ] ifFalse:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4969
        file := FileSelectionBrowser
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4970
                    request:'Load Image From'
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  4971
                    inDirectory:LastDirectory
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4972
                    withFileFilters:filters.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4973
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4974
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4975
        LastDirectory := file asFilename directoryName.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4976
        self loadFromFile:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  4977
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4978
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4979
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4980
doNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4981
    "opens a dialog with choices of size and color map for creating a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4982
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4983
    |aspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext|
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4984
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4985
    defaultSize := (self class listOfDefaultSizes includes:'32x32') 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4986
                        ifTrue:['32x32'] 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4987
                        ifFalse:[self class listOfDefaultSizes first].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4988
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4989
    aspects  := IdentityDictionary new
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4990
        at:#listOfSizes         put: self class listOfDefaultSizes asValue;
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4991
        at:#listOfColorMaps     put: self class namesOfColorMaps values asSortedCollection asValue;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4992
        at:#selectionOfSize     put: (LastSizeString ? defaultSize) asValue;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4993
        at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue;
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4994
        yourself.
228524287573 intitial checkin
tz
parents:
diff changeset
  4995
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4996
    (self openDialogInterface:#dialogSpecForNewImage withBindings:aspects)
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4997
    ifTrue:[
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  4998
        szString := (aspects at:#selectionOfSize) value.
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4999
        ext := self pointFromString:szString.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  5000
        ext isNil ifTrue:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  5001
            width := height := 32
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  5002
        ] ifFalse:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  5003
            width := ext x.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  5004
            height := ext y.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  5005
        ].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  5006
"/        width  := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]).
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  5007
"/        height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5008
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  5009
        cMapString := (aspects at:#selectionOfColorMap) value.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5010
        cMapMode   := self class namesOfColorMaps keyAtEqualValue:cMapString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5011
        cMap       := self class listOfColorMaps at:cMapMode.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5012
        imageClass := Image implementorForDepth:(cMap size highBit-1).
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5013
        image      := imageClass width: width height: height.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5014
        image bits:(ByteArray new:(image bytesPerRow*height)).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5015
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  5016
        LastSizeString := szString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  5017
        LastColormapMode := cMapString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  5018
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5019
        (cMapMode startsWith: 'mask') ifTrue:[
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5020
            image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5021
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  5022
        image colorMap: cMap.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5023
        (imageEditView image: image) notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5024
            self updateListOfColorsAndColormapMode.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5025
            self updateLabelsAndHistory.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5026
        ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5027
        image fillRectangleX:0 y:0 width:width height:height with:Color white.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5028
    ]
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5029
!
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5030
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5031
doNewImageFromClipboard
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5032
    |image|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5033
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5034
    image := imageEditView clipBoard.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5035
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5036
    (imageEditView image:image) notNil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5037
    ifTrue:[
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5038
        self updateColorsFromImage:image.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5039
        self findColorMapMode.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5040
        self updateLabelsAndHistory.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5041
    ]
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5042
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5043
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5044
grabScreenImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5045
    "let user choose an area and grab that are for editing"
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5046
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  5047
    Processor 
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  5048
        addTimedBlock:[
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  5049
            |image d8image img|
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5050
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5051
            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
  5052
            image := Image fromUser.
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5053
            image isNil ifFalse:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5054
                image depth > 8 ifTrue:[
1687
f4543a556b89 Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 1682
diff changeset
  5055
                    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
  5056
                        (sig := ex signal) == HaltInterrupt ifTrue:[ex reject].
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  5057
                        sig == Signal noHandlerSignal ifTrue:[ex reject].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5058
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5059
                        self warn:'Could not convert to depth8 image (too many colors)'.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5060
                        d8image := nil.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5061
                    ] do:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5062
                        d8image := Depth8Image new.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5063
                        d8image fromImage:image.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5064
                    ].
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5065
                    d8image notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5066
                        image := d8image
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5067
                    ]
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  5068
                ].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5069
                (imageEditView image:image) notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5070
                    self listOfColors contents:(image colorMap).
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5071
                    self findColorMapMode.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5072
                    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
  5073
                ]
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5074
             ] 
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  5075
        ] 
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  5076
        afterSeconds:1
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5077
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  5078
    "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
  5079
    "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
  5080
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5081
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5082
nextImageInSequence
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5083
    "display the next image in the image sequence"
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  5084
    |img seq frame listOfColors|
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5085
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5086
    imageEditView releaseUndos.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5087
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5088
    seq := self image imageSequence.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5089
    imageSeqNr isNil ifTrue:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5090
        imageSeqNr := 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5091
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5092
    imageSeqNr := imageSeqNr + 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5093
    imageSeqNr > seq size ifTrue:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5094
        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
  5095
        imageSeqNr := 1.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5096
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5097
    frame := seq at:imageSeqNr.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5098
    imageEditView image:(frame image).
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5099
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5100
    (img := self image) notNil ifTrue:[          
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  5101
        listOfColors := self listOfColors.
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5102
        img colorMap notNil ifTrue:[
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  5103
            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
  5104
        ] ifFalse:[
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  5105
            listOfColors removeAll.
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5106
        ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5107
        self findColorMapMode.     
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5108
        self updateLabelsAndHistory.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5109
        img := img onDevice:device.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5110
        imageEditView image:img.
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5111
    ] ifFalse:[
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5112
        self updateForNoImage
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5113
    ].
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5114
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5115
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  5116
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  5117
!ImageEditor methodsFor:'user actions-saving'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5118
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5119
doPrint
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5120
    "prints current image on the current printer"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5121
1734
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  5122
    self withWaitCursorDo:[
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  5123
        imageEditView print
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  5124
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5125
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5126
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  5127
doSaveButtonImageToFileAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  5128
    "opens a dialog for saving current image to a file"
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  5129
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  5130
    imageEditView saveButtonImageToFileAs.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  5131
    self updateLabelsAndHistory.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  5132
!
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  5133
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5134
doSaveImageFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5135
    "saves current image to current file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5136
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  5137
    imageEditView save.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5138
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5139
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5140
doSaveImageFileAs
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5141
    "opens a dialog for saving an image to a file"
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5142
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5143
    |img file filters|
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5144
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5145
    img := self image.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5146
    img notNil ifTrue: [
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5147
        file := img fileName
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5148
    ].
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5149
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5150
    filters := FileSelectionBrowser loadImageFileNameFilters.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5151
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5152
    file notNil ifTrue:[
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5153
        file := FileSelectionBrowser
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5154
                    request:'Save Image To'
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5155
                    fileName:file
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5156
                    withFileFilters:filters.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5157
    ] ifFalse:[
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5158
        file := FileSelectionBrowser
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5159
                    request:'Save Image To'
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5160
                    inDirectory:LastDirectory
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5161
                    withFileFilters:filters.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5162
    ].
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5163
    file notNil ifTrue:[
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5164
        imageEditView saveImageFileAs:file.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5165
        LastDirectory := file asFilename directoryName.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5166
        self updateLabelsAndHistory.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  5167
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5168
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5169
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5170
doSaveImageMaskFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5171
    "opens a dialog for saving mask of current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5172
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  5173
    imageEditView saveImageMaskFileAs.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5174
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5175
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5176
doSaveMethod
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5177
    "saves current image on current class and selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5178
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  5179
    imageEditView saveMethod notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5180
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  5181
    [
694
88c7004cfb6c updateLabelsAndHistory
tz
parents: 688
diff changeset
  5182
        self updateLabelsAndHistory
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5183
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  5184
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5185
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5186
doSaveMethodAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5187
    "opens a dialog for saving current image on a class and a selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5188
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  5189
    imageEditView saveMethodAs notNil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5190
    ifTrue:
228524287573 intitial checkin
tz
parents:
diff changeset
  5191
    [
694
88c7004cfb6c updateLabelsAndHistory
tz
parents: 688
diff changeset
  5192
        self updateLabelsAndHistory
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5193
    ]
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5194
!
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5195
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5196
doShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5197
    "opens a dialog showing the storeString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5198
     (sometimes useful to embed an image into source code)"
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5199
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5200
    |img|
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5201
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5202
    img := imageEditView image.
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  5203
    TextBox openOn:img storeString
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5204
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  5205
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  5206
!ImageEditor methodsFor:'user actions-settings'!
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5207
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5208
doChangeGridMagnification
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5209
    "change grid magnification"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5210
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5211
    |box oldGridLimit newGridLimit|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5212
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5213
    oldGridLimit := imageEditView class gridMagnificationLimit asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5214
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5215
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5216
    box title:(resources string:'Grid Magnification Limit:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5217
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5218
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5219
    box initialText:(oldGridLimit x printString).
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5220
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5221
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5222
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5223
    and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5224
    ) ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5225
        newGridLimit := (99 min: (2 max:newGridLimit)) asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5226
        imageEditView class gridMagnificationLimit:newGridLimit.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5227
        imageEditView invalidate
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5228
    ]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5229
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5230
! !
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  5231
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5232
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
  5233
228524287573 intitial checkin
tz
parents:
diff changeset
  5234
version
228524287573 intitial checkin
tz
parents:
diff changeset
  5235
    ^ '$Header$'
228524287573 intitial checkin
tz
parents:
diff changeset
  5236
! !