ImageEditor.st
author Claus Gittinger <cg@exept.de>
Sun, 01 Feb 2015 14:16:33 +0100
changeset 3178 58100b56595d
parent 3173 801e6bfe2581
child 3180 9ee8f0e74b96
permissions -rw-r--r--
class: MenuEditor fixed the following redraw bug in ModelListView (which is already fixed in SelectionInListView): if a colored item is shown with selection, the color attribute should be removed (or relaxed), to avoid drawing the label invisible. I.e. if the text color is blue or grey, and the selection bg is blue. we should draw white-on-blue, instead of blue/grey on blue. For this to work, the info whether drawing a selection must be passed down through the renderer to the item's draw routine.
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
"
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
    12
"{ Package: 'stx:libtool2' }"
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
    13
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    14
ResourceSpecEditor subclass:#ImageEditor
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
    15
	instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
    16
		selectedColorIndex postOpenAction imageSeqNr drawingColormap
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
    17
		lastShiftUsedWrap lastGrabbedScreenArea
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
    18
		allowedToChangeImageDimensionAndDepth'
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
    19
	classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
    20
		DefaultRelativeSizes LastURL'
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
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    60
openLoadingImageWith:aBlock
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    61
    "opens an Image Editor on anImage"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    62
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    63
    |editor|
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    64
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    65
    editor := self new.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    66
    editor allButOpen.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    67
    aBlock value:editor.
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    68
    editor openWindow.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    69
    ^ editor
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    70
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    71
400
228524287573 intitial checkin
tz
parents:
diff changeset
    72
openModalOnClass: aClass andSelector: aSelector
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    73
    "opens a modal Image Editor on aClass and aSelector.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    74
     Returns the real name of the edited resource method (in case, user changed it)."
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    75
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    76
    |imageEditor imageEditView className resourceClass resourceSelector| 
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    77
400
228524287573 intitial checkin
tz
parents:
diff changeset
    78
    imageEditor := self new.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    79
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    80
    aClass isClass  ifTrue: [className := aClass name].
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    81
    aClass isString ifTrue: [className := aClass].      
903
63203d996e61 openModal bug fixed
tz
parents: 901
diff changeset
    82
    aClass isNil    ifTrue: [className := ''].      
400
228524287573 intitial checkin
tz
parents:
diff changeset
    83
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    84
    imageEditor postOpenAction: [
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    85
            imageEditView := imageEditor imageEditView. 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    86
            imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    87
        ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
    88
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
    89
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    90
    resourceClass := imageEditView resourceClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    91
    resourceSelector := imageEditView resourceSelector.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    92
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    93
    (resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    94
    ^ Array with:resourceClass with:resourceSelector
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    95
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    96
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    97
     self openModalOnClass: self andSelector: #leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
    98
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
    99
!
228524287573 intitial checkin
tz
parents:
diff changeset
   100
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   101
openModalOnImage:anImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   102
    "opens a modal Image Editor on an image.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   103
     Returns the modified image or nil if unsaved/unchanged"
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   104
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   105
    |imageEditor imageEditView newImage| 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   106
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   107
    imageEditor := self new.
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
   108
    imageEditor allowedToChangeImageDimensionAndDepth:false.
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   109
    imageEditor postOpenAction: [
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   110
            imageEditView := imageEditor imageEditView. 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   111
            imageEditor loadFromImage: anImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   112
        ].
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   113
    imageEditor openModal.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   114
2766
88fa6c4bf6d3 changed: #openModalOnImage:
Claus Gittinger <cg@exept.de>
parents: 2765
diff changeset
   115
    newImage := imageEditor savedImage.
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   116
    ^ newImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   117
!
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   118
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   119
openOnClass:aClass andSelector:aSelector
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   120
    "opens an Image Editor on aClass and aSelector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   121
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   122
    self openLoadingImageWith:[:editor | 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   123
        editor loadFromClass:aClass theNonMetaclass andSelector:aSelector.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   124
    ]
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   125
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   126
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   127
     self openOnClass:self andSelector:#leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   128
     self openOnClass:self andSelector:nil
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   129
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   130
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   131
    "Modified: / 16.3.1999 / 21:33:49 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   132
!
228524287573 intitial checkin
tz
parents:
diff changeset
   133
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   134
openOnFile:aFileName
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   135
    "opens an Image Editor on aFileName"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   136
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   137
    self openLoadingImageWith:[:editor | 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   138
        editor loadFromFile:aFileName.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   139
    ]
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   140
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   141
    "
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   142
     self openOnFile: '../../goodies/bitmaps/gifImages/back.gif'
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   143
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   144
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   145
    "Modified: / 16.3.1999 / 21:33:25 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   146
!
228524287573 intitial checkin
tz
parents:
diff changeset
   147
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   148
openOnImage:anImage
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   149
    "opens an Image Editor on anImage"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   150
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   151
    self openLoadingImageWith:[:editor | 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   152
        editor loadFromImage: anImage.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   153
    ]
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   154
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   155
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   156
     self openOnImage: Icon startIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   157
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   158
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   159
    "Modified: / 11.3.1999 / 16:18:33 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   160
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   161
228524287573 intitial checkin
tz
parents:
diff changeset
   162
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
   163
228524287573 intitial checkin
tz
parents:
diff changeset
   164
listOfColorMaps
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   165
    "returns the list of default color maps for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   166
228524287573 intitial checkin
tz
parents:
diff changeset
   167
    |colorMap|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   168
400
228524287573 intitial checkin
tz
parents:
diff changeset
   169
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   170
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   171
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   172
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   173
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   174
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   175
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   176
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   177
        add: Color magenta;
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   178
        add: (Color redByte: 127 greenByte:   0 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   179
        add: (Color redByte:   0 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   180
        add: (Color redByte:   0 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   181
        add: (Color redByte:   0 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   182
        add: (Color redByte: 127 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   183
        add: (Color redByte: 127 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   184
        add: (Color redByte: 127 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   185
        add: (Color redByte: 170 greenByte: 170 blueByte: 170).
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   186
400
228524287573 intitial checkin
tz
parents:
diff changeset
   187
    0 to: 5 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   188
    [:r|                                                    
228524287573 intitial checkin
tz
parents:
diff changeset
   189
        0 to: 5 do:         
228524287573 intitial checkin
tz
parents:
diff changeset
   190
        [:g|
228524287573 intitial checkin
tz
parents:
diff changeset
   191
            0 to: 5 do:                             
228524287573 intitial checkin
tz
parents:
diff changeset
   192
            [:b|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   193
                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
   194
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   195
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   196
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   197
228524287573 intitial checkin
tz
parents:
diff changeset
   198
    1 to: 25 do:
228524287573 intitial checkin
tz
parents:
diff changeset
   199
    [:g|                             
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   200
        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
   201
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   202
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   203
    ^ Dictionary new
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   204
        at: #depth32 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF);
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   205
        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
   206
        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
   207
        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
   208
        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
   209
        at: #depth8  put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   210
        at: #masked8 put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   211
        at: #depth4  put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   212
        at: #masked4 put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   213
        at: #depth2  put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   214
        at: #masked2 put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   215
        at: #depth1  put: (colorMap copyFrom: 1 to: 2);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   216
        at: #masked1 put: (colorMap copyFrom: 1 to: 2);
400
228524287573 intitial checkin
tz
parents:
diff changeset
   217
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   218
!
228524287573 intitial checkin
tz
parents:
diff changeset
   219
228524287573 intitial checkin
tz
parents:
diff changeset
   220
listOfDefaultSizes
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   221
    "returns the list of default sizes for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   222
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
   223
    ^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64')
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   224
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   225
    "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
   226
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   227
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   228
namesOfColorMaps
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   229
    ^ Dictionary new
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   230
        at: #depth32 put: '32-plane (rgba)';
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   231
        at: #depth24 put: '24-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   232
        at: #masked24 put: '24-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   233
        at: #depth16 put: '16-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   234
        at: #masked16 put: '16-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   235
        at: #depth8  put: ' 8-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   236
        at: #masked8 put: ' 8-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   237
        at: #depth4  put: ' 4-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   238
        at: #masked4 put: ' 4-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   239
        at: #depth2  put: ' 2-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   240
        at: #masked2 put: ' 2-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   241
        at: #depth1  put: ' 1-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   242
        at: #masked1 put: ' 1-plane + mask' ;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   243
        yourself
400
228524287573 intitial checkin
tz
parents:
diff changeset
   244
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   245
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   246
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   247
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   248
flyByHelpSpec
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   249
    <resource: #help>
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   250
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   251
    ^super flyByHelpSpec addPairsFrom:(self localHelpTexts)
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   252
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   253
    "Modified: / 19-01-2012 / 13:29:48 / cg"
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   254
!
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   255
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   256
helpSpec
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   257
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   258
     by the UIHelpTool of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   259
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   260
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   261
     the UIHelpTool may not be able to read the specification."
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   262
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   263
    "
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   264
     UIHelpTool openOnClass:ImageEditor    
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   265
    "
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   266
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   267
    <resource: #help>
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   268
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   269
    ^ super helpSpec addPairsFrom:(self localHelpTexts)
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   270
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   271
    "Modified: / 19-01-2012 / 13:29:42 / cg"
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   272
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   273
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   274
localHelpTexts
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   275
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   276
     by the UIHelpTool of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   277
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   278
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   279
     the UIHelpTool may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   280
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   281
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   282
     UIHelpTool openOnClass:ImageEditor    
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   283
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   284
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   285
    <resource: #help>
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   286
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   287
    ^ #(
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   288
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   289
#xdrawModeBox
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   290
'Rectangle'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   291
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   292
#xdrawModeCopy
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   293
'Copy'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   294
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   295
#xdrawModeFill
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   296
'Flood-fill'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   297
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   298
#xdrawModeFilledBox
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   299
'Filled rectangle'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   300
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   301
#xdrawModePaste
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   302
'Paste'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   303
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   304
#xdrawModePasteUnder
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   305
'Paste under'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   306
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   307
#xdrawModePasteWithMask
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   308
'Paste with Mask'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   309
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   310
#xdrawModePoint
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   311
'Point'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   312
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   313
#xfileGrabImage
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   314
'Pick from screen'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   315
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   316
#xfileLoadFromClass
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   317
'Load from method...'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   318
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   319
#xfileLoadFromFile
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   320
'Load from file...'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   321
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   322
#xfileNewImage
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   323
'New image'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   324
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   325
#filePrint
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   326
'Print'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   327
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   328
#xfileSaveAs
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   329
'Save to file...'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   330
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   331
#xfileSaveMaskAs
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   332
'Save mask to file...'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   333
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   334
#xfileSaveMethod
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   335
'Save as method'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   336
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   337
#xfileSaveMethodAs
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   338
'Save as Method...'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   339
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   340
#nextImageInSequence
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   341
'Go to the next image in the animated gif image sequence.'
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   342
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   343
#previousImageInSequence
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   344
'Go to the previous image in the animated gif image sequence.'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   345
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   346
#colorMap
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   347
'ColorMap functions'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   348
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   349
#colorMap1
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   350
'Convert to depth-1 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   351
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   352
#colorMap1M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   353
'Convert to depth-1 image plus mask'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   354
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   355
#colorMap2
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   356
'Convert to depth-2 image'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   357
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   358
#colorMap24
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   359
'Convert to depth-24 image (rgb)'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   360
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   361
#colorMap2M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   362
'Convert to depth-2 image plus mask'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   363
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   364
#colorMap32
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   365
'Convert to depth-32 image (rgba)'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   366
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   367
#colorMap4
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   368
'Convert to depth-4 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   369
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   370
#colorMap4M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   371
'Convert to depth-4 image plus mask'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   372
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   373
#colorMap8
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   374
'Convert to depth-8 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   375
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   376
#colorMap8M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   377
'Convert to depth-8 image plus mask'
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   378
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   379
#colorMapTable
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   380
'Shows a list of used colors of the image'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   381
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   382
#compressColormap
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   383
'Remove unneeded entries from the colorMap'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   384
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   385
#cropAll
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   386
'Find and remove all borders'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   387
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   388
#cropBottom
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   389
'Find and remove bottom border'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   390
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   391
#cropLeft
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   392
'Find and remove left border'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   393
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   394
#cropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   395
'Specify border(s) to remove.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   396
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   397
#cropRight
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   398
'Find and remove right border'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   399
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   400
#cropTop
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   401
'Find and remove top border'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   402
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   403
#drawModeBox
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   404
'Rectangle Drawing Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   405
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   406
#drawModeCircle
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   407
'Circle Drawing Mode'
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   408
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   409
#drawModeCopy
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   410
'Area Copy Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   411
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   412
#drawModeFill
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   413
'Flood Fill Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   414
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   415
#drawModeFilledBox
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   416
'Filled Rectangle Drawing Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   417
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   418
#drawModePaste
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   419
'Paste Mode'
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   420
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   421
#drawModePasteUnder
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   422
'Paste-Under Mode'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   423
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   424
#drawModePasteWithMask
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   425
'Paste-with-Mask Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   426
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   427
#drawModePoint
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   428
'Point Drawing Mode'
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   429
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   430
#drawModeSpecial
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   431
'Special operations (select rectangle, then choose operation)'
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   432
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   433
#drawModeSpray
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   434
'Spray Drawing Mode'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   435
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   436
#editFlipHorizontal
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   437
'Flip the image horizontally'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   438
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   439
#editFlipVertical
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   440
'Flip the image vertically'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   441
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   442
#editMagnifyImage
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   443
'Magnify the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   444
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   445
#editNegate
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   446
'Invert the images colors'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   447
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   448
#editResize
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   449
'Resize the image (preserving the old image)'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   450
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   451
#editRotate
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   452
'Rotate the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   453
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   454
#fileGrabImageFromScreen
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   455
'Pick an image from the screen (specify area)'
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   456
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   457
#fileGrabImageFromWindow
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   458
'Pick an image from a window on the screen (click on window)'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   459
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   460
#fileLoadFromClass
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   461
'Select and load an image from a resource method'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   462
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   463
#fileLoadFromFile
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   464
'Select and load an image from a file'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   465
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   466
#fileLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   467
'Load an image from the net, given its URL'
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   468
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   469
#fileNewImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   470
'Create a new image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   471
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   472
#filePrint
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   473
'Print the image on a postscript printer'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   474
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   475
#fileSave
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   476
'Save the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   477
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   478
#fileSaveAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   479
'Save the image to a file'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   480
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   481
#fileSaveButtonImageAs
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   482
'Save an image of a button with the image to a file (for html use)'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   483
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   484
#fileSaveMaskAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   485
'Save the mask of the image to a file'
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   486
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   487
#fileSaveMethod
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   488
'Save the image as resource method in the current class and selector'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   489
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   490
#fileSaveMethodAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   491
'Save the image as resource method in a class'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   492
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   493
#magnificationNumber
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   494
'Shows the current magnification'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   495
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   496
#magnifyImageDown
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   497
'Decrease magnification'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   498
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   499
#magnifyImageUp
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   500
'Increase magnification'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   501
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   502
#mouseKeyColorMode
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   503
'Toggle between left and right mouse button color'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   504
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   505
#previewView
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   506
'Shows a preview of the image'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   507
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   508
#settingsGridMagnification
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   509
'Change the grid magnification of the edit view'
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
   510
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   511
)
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   512
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   513
    "Created: / 19-01-2012 / 13:29:31 / cg"
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   514
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   515
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   516
!ImageEditor class methodsFor:'image specs'!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   517
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   518
circleIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   519
    <resource: #image>
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   520
    "This resource specification was automatically generated
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   521
     by the ImageEditor of ST/X."
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   522
    "Do not manually edit this!! If it is corrupted,
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   523
     the ImageEditor may not be able to read the specification."
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   524
    "
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   525
     self circleIcon inspect
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   526
     ImageEditor openOnClass:self andSelector:#circleIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   527
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   528
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   529
    ^ Icon constantNamed:'ImageEditor class circleIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   530
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   531
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   532
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   533
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   534
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   535
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   536
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   537
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   538
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   539
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   540
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   541
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   542
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   543
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   544
                                        fromPackedString:'@@@@@@N@CF@PDA@PH@  BB@HDA@PD@1 @8@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   545
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   546
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   547
        ]
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   548
!
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   549
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   550
copyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   551
    <resource: #image>
1637
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
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   555
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   556
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   557
     self copyIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   558
     ImageEditor openOnClass:self andSelector:#copyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   559
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   560
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   561
    ^ Icon constantNamed:'ImageEditor class copyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   562
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   563
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   564
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   565
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   566
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   567
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   568
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   569
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   570
                            fromPackedString:'@@@@@@@@@@@** @@J)UUTB*Z*)@*&**PJ)**$B*Z*)@*&**PJ)**$@@Z*)@@F**P@AUUT@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   571
                colorMapFromArray:#[ 0 0 0 0 0 128 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   572
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   573
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   574
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   575
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   576
                                        fromPackedString:'@@C? O>@??3??O?<??3??O?<??3??@_<A?0@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   577
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   578
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   579
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   580
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   581
2155
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   582
defaultIcon
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   583
    <resource: #programImage>
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   584
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   585
    ^ ToolbarIconLibrary startImageEditorIcon
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   586
!
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   587
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   588
fillGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   589
    <resource: #image>
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   590
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   591
     by the ImageEditor of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   592
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   593
     the ImageEditor may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   594
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   595
     self fillGradientRectIcon inspect
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   596
     ImageEditor openOnClass:self andSelector:#fillGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   597
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   598
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   599
    ^ Icon constantNamed:'ImageEditor class fillGradientRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   600
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   601
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   602
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   603
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   604
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   605
                bitsPerSample:(#[ 4 ]);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   606
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   607
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   608
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   609
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   610
                colorMapFromArray:#[ 0 0 0 255 0 0 127 0 0 191 0 0 63 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   611
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   612
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   613
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   614
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   615
                                        fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   616
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   617
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   618
        ]
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   619
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   620
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   621
fillHorizontalGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   622
    <resource: #image>
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   623
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   624
     by the ImageEditor of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   625
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   626
     the ImageEditor may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   627
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   628
     self fillHorizontalGradientRectIcon inspect
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   629
     ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   630
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   631
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   632
    ^ Icon constantNamed:'ImageEditor class fillHorizontalGradientRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   633
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   634
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   635
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   636
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   637
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   638
                bitsPerSample:(#[ 4 ]);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   639
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   640
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   641
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@@@@@@@
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   642
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   643
                colorMapFromArray:#[ 0 0 0 255 0 0 127 0 0 191 0 0 63 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   644
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   645
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   646
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   647
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   648
                                        fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   649
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   650
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   651
        ]
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   652
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   653
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   654
fillIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   655
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   656
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   657
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   658
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   659
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   660
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   661
     self fillIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   662
     ImageEditor openOnClass:self andSelector:#fillIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   663
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   664
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   665
    ^ Icon constantNamed:'ImageEditor class fillIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   666
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   667
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   668
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   669
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   670
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   671
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   672
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   673
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   674
                            fromPackedString:'@@@@@@@@@@@@@ @@@@*H@@D*(@@DUUP@EAUU@AAEU@@@@U@@DDA@@@@@@@@PP@@@@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   675
                colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   676
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   677
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   678
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   679
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   680
                                        fromPackedString:'C @Q@BN@I<@?8C?0[?!!G<@O P\@@ D@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   681
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   682
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   683
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   684
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   685
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   686
fillRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   687
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   688
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   689
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   690
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   691
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   692
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   693
     self fillRectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   694
     ImageEditor openOnClass:self andSelector:#fillRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   695
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   696
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   697
    ^ Icon constantNamed:'ImageEditor class fillRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   698
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   699
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   700
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   701
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   702
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   703
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   704
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   705
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   706
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   707
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   708
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   709
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   710
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   711
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   712
                                        fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   713
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   714
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   715
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   716
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   717
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   718
fillVerticalGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   719
    <resource: #image>
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   720
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   721
     by the ImageEditor of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   722
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   723
     the ImageEditor may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   724
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   725
     self fillGradientRectIcon inspect
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   726
     ImageEditor openOnClass:self andSelector:#fillGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   727
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   728
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   729
    ^ Icon constantNamed:'ImageEditor class fillGradientRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   730
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   731
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   732
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   733
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   734
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   735
                bitsPerSample:(#[ 4 ]);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   736
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   737
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   738
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   739
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   740
                colorMapFromArray:#[ 0 0 0 255 0 0 127 0 0 191 0 0 63 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   741
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   742
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   743
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   744
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   745
                                        fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   746
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   747
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   748
        ]
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   749
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   750
    "Created: / 19-01-2012 / 13:44:51 / cg"
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   751
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   752
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   753
flipHorizontalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   754
    <resource: #image>
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   755
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   756
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   757
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   758
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   759
    "
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   760
     self flipHorizontalIcon inspect
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   761
     ImageEditor openOnClass:self andSelector:#flipHorizontalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   762
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   763
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   764
    ^ Icon constantNamed:'ImageEditor class flipHorizontalIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   765
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   766
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   767
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   768
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   769
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   770
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   771
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   772
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   773
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   774
                colorMapFromArray:#[ 0 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   775
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   776
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   777
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   778
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   779
                                        fromPackedString:'@@@A@C?8HP )JC$8_?1??C$8JR !!BC?8@P@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   780
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   781
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   782
        ]
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   783
!
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   784
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   785
flipVerticalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   786
    <resource: #image>
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   787
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   788
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   789
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   790
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   791
    "
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   792
     self flipVerticalIcon inspect
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   793
     ImageEditor openOnClass:self andSelector:#flipVerticalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   794
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   795
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   796
    ^ Icon constantNamed:'ImageEditor class flipVerticalIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   797
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   798
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   799
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   800
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   801
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   802
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   803
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   804
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   805
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   806
                colorMapFromArray:#[ 0 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   807
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   808
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   809
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   810
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   811
                                        fromPackedString:'@@@C@C?0I9@/4BLPH1A?>BLPH1@/4B^PO?@C@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   812
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   813
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   814
        ]
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   815
!
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
   816
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   817
leftMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   818
    <resource: #image>
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   819
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   820
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   821
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   822
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   823
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
   824
     self leftMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   825
     ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   826
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   827
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   828
    ^ Icon constantNamed:'ImageEditor class leftMouseKeyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   829
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   830
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   831
                width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   832
                height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   833
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   834
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   835
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   836
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   837
                            fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   838
                colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   839
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   840
                            width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   841
                            height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   842
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   843
                                        fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   844
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   845
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   846
        ]
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
   847
!
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   848
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   849
pasteIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   850
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   851
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   852
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   853
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   854
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   855
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   856
     self pasteIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   857
     ImageEditor openOnClass:self andSelector:#pasteIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   858
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   859
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   860
    ^ Icon constantNamed:'ImageEditor class pasteIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   861
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   862
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   863
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   864
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   865
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   866
                bitsPerSample:(#( 4 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   867
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   868
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   869
                            fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3A&Y&X@@SL0Y A&@@D3LF@@A @AL3A&@FX@@QDPY&Y&
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   870
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   871
                colorMapFromArray:#[ 0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   872
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   873
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   874
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   875
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   876
                                        fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   877
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   878
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   879
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   880
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   881
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   882
pasteUnderIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   883
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   884
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   885
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   886
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   887
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   888
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   889
     self pasteUnderIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   890
     ImageEditor openOnClass:self andSelector:#pasteUnderIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   891
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   892
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   893
    ^ Icon constantNamed:'ImageEditor class pasteUnderIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   894
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   895
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   896
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   897
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   898
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   899
                bitsPerSample:(#( 4 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   900
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   901
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   902
                            fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L3LP@@@AL3L3E&X@@SL3L0A&@@D3L3@@A @AL3L3@FX@@QDQDQY&
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   903
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   904
                colorMapFromArray:#[ 0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   905
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   906
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   907
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   908
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   909
                                        fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   910
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   911
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   912
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   913
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   914
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   915
pasteWithMaskIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   916
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   917
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   918
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   919
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   920
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   921
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   922
     self pasteWithMaskIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   923
     ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   924
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   925
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   926
    ^ Icon constantNamed:'ImageEditor class pasteWithMaskIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   927
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   928
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   929
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   930
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   931
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   932
                bitsPerSample:(#( 4 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   933
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   934
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   935
                            fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L3A&@@D3LCL0A @AL3@3LFX@@QDPY&Y&
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   936
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   937
                colorMapFromArray:#[ 0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   938
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   939
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   940
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   941
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   942
                                        fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   943
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   944
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   945
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   946
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   947
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   948
pointIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   949
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   950
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   951
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   952
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   953
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   954
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   955
     self pointIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   956
     ImageEditor openOnClass:self andSelector:#pointIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   957
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   958
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   959
    ^ Icon constantNamed:'ImageEditor class pointIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   960
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   961
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   962
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   963
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   964
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   965
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   966
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   967
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   968
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   969
                colorMapFromArray:#[ 0 0 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   970
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   971
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   972
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   973
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   974
                                        fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8@G@@X@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   975
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   976
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   977
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   978
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   979
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   980
rectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   981
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   982
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   983
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   984
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   985
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   986
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   987
     self rectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   988
     ImageEditor openOnClass:self andSelector:#rectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   989
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   990
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   991
    ^ Icon constantNamed:'ImageEditor class rectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   992
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   993
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   994
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   995
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   996
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   997
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   998
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   999
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1000
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1001
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1002
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1003
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1004
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1005
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1006
                                        fromPackedString:'@@@@@C?0HA@ DB@PHA@ DB@PHA@ DC?0@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1007
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1008
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1009
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1010
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1011
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1012
rightMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1013
    <resource: #image>
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1014
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1015
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1016
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1017
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1018
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  1019
     self rightMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1020
     ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1021
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1022
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1023
    ^ Icon constantNamed:'ImageEditor class rightMouseKeyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1024
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1025
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1026
                width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1027
                height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1028
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1029
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1030
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1031
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1032
                            fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1033
                colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1034
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1035
                            width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1036
                            height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1037
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1038
                                        fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1039
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1040
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1041
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1042
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1043
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1044
specialCircleIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1045
    <resource: #image>
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1046
    "This resource specification was automatically generated
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1047
     by the ImageEditor of ST/X."
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1048
    "Do not manually edit this!! If it is corrupted,
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1049
     the ImageEditor may not be able to read the specification."
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1050
    "
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1051
     self specialCircleIcon inspect
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1052
     ImageEditor openOnClass:self andSelector:#specialCircleIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1053
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1054
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1055
    ^ Icon constantNamed:'ImageEditor class specialCircleIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1056
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1057
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1058
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1059
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1060
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1061
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1062
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1063
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1064
                            fromPackedString:'@@L@@@!!BDB@ D4@HP@!!@BD@HHA@PHP!!@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1065
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1066
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1067
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1068
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1069
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1070
                                        fromPackedString:'@@@@@@-@D2@''$D^HQ8!!G"DLHH1@PH@-@@0@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1071
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1072
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1073
        ]
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1074
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1075
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1076
specialIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1077
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1078
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1079
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1080
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1081
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1082
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1083
     self specialIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1084
     ImageEditor openOnClass:self andSelector:#specialIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1085
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1086
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1087
    ^ Icon constantNamed:'ImageEditor class specialIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1088
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1089
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1090
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1091
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1092
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1093
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1094
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1095
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1096
                            fromPackedString:'@@L@@G!!:P@!!@B4@HP@!!@BD@HP@!!@BW!!8@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1097
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1098
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1099
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1100
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1101
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1102
                                        fromPackedString:'@@@@@G-8P0!!G"D^HQ8!!G"DLHP0!!@BG-8@0@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1103
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1104
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1105
        ]
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1106
!
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1107
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1108
sprayIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1109
    <resource: #image>
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1110
    "This resource specification was automatically generated
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1111
     by the ImageEditor of ST/X."
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1112
    "Do not manually edit this!! If it is corrupted,
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1113
     the ImageEditor may not be able to read the specification."
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1114
    "
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1115
     self sprayIcon inspect
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1116
     ImageEditor openOnClass:self andSelector:#sprayIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1117
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1118
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1119
    ^ Icon constantNamed:'ImageEditor class sprayIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1120
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1121
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1122
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1123
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1124
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1125
                bitsPerSample:(#[ 4 ]);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1126
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1127
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1128
                            fromPackedString:'@@@@@@@@@@@@@@@@@D@@@@@@@DA@@@@@@D@D@@@@@@A@PD@@@@@@A@P@@@@@@@A@P@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1129
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1130
                colorMapFromArray:#[ 0 0 0 84 84 84 170 170 170 255 255 255 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1131
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1132
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1133
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1134
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1135
                                        fromPackedString:'@@@@B@@(A)@F*@IPA2 H$@"@BH@H @"@BH@O @@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1136
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1137
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1138
        ]
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1139
! !
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1140
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1141
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1142
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1143
changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1144
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1145
     by the UIPainter of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1146
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1147
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1148
     the UIPainter may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1149
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1150
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1151
     UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1152
     ImageEditor new openInterface:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1153
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1154
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1155
    <resource: #canvas>
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1156
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1157
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1158
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1159
        name: changeHLSDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1160
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1161
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1162
          label: 'HLS Edit Dialog'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1163
          name: 'HLS Edit Dialog'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1164
          min: (Point 10 10)
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1165
          bounds: (Rectangle 0 0 312 258)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1166
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1167
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1168
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1169
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1170
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1171
              label: 'Hue-Shift:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1172
              name: 'HueLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1173
              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
  1174
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1175
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1176
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1177
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1178
              name: 'HueShiftEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1179
              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
  1180
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1181
              model: hueShiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1182
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1183
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1184
              maxValue: 360
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1185
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1186
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1187
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1188
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1189
              name: 'HueWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1190
              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
  1191
              model: hueShiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1192
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1193
              step: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1194
              endlessRotation: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1195
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1196
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1197
              label: 'Light Factor:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1198
              name: 'LightLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1199
              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
  1200
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1201
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1202
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1203
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1204
              name: 'LightEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1205
              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
  1206
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1207
              model: lightAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1208
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1209
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1210
              maxValue: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1211
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1212
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1213
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1214
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1215
              name: 'LightWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1216
              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
  1217
              model: lightAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1218
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1219
              stop: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1220
              step: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1221
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1222
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1223
              label: 'Saturation Factor:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1224
              name: 'SaturationLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1225
              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
  1226
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1227
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1228
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1229
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1230
              name: 'SaturationEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1231
              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
  1232
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1233
              model: saturationAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1234
              type: numberInRange
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1235
              minValue: 0
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1236
              maxValue: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1237
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1238
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1239
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1240
           (ThumbWheelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1241
              name: 'SaturationWheel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1242
              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
  1243
              model: saturationAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1244
              orientation: horizontal
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1245
              stop: 1000
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1246
              step: 1
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1247
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1248
           (LabelSpec
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1249
              label: 'Color Shift'
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1250
              name: 'Label2'
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1251
              layout: (LayoutFrame 5 0 110 0 -15 0.5 132 0)
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1252
              translateLabel: true
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1253
            )
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1254
           (LabelSpec
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1255
              name: 'HueColorLabel'
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1256
              layout: (LayoutFrame 18 0.0 133 0 -41 0.5 217 0)
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1257
              level: -1
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  1258
              backgroundChannel: hlsColor
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1259
              translateLabel: true
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1260
            )
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1261
           (LabelSpec
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1262
              label: 'Preview'
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1263
              name: 'Label3'
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1264
              layout: (LayoutFrame 5 0.5 110 0 -5 1 132 0)
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1265
              translateLabel: true
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1266
            )
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1267
           (LabelSpec
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1268
              name: 'PreviewLabel'
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1269
              layout: (LayoutFrame 36 0.5 133 0 -23 1.0 217 0)
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1270
              level: -1
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1271
              translateLabel: true
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1272
              labelChannel: previewImageHolder
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  1273
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1274
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1275
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1276
              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
  1277
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1278
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1279
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1280
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1281
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1282
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1283
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1284
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1285
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1286
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1287
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1288
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1289
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1290
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1291
                    extent: (Point 151 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1292
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1293
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1294
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1295
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1296
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1297
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1298
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1299
                    extent: (Point 152 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1300
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1301
                 )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1302
               
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1303
              )
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1304
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1305
           )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1306
         
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1307
        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1308
      )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1309
!
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1310
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1311
cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1312
    "This resource specification was automatically generated
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1313
     by the UIPainter of ST/X."
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1314
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1315
    "Do not manually edit this!! If it is corrupted,
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1316
     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
  1317
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1318
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1319
     UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1320
     ImageEditor new openInterface:#cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1321
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1322
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1323
    <resource: #canvas>
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1324
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1325
    ^ 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1326
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1327
        name: cropDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1328
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1329
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1330
          label: 'Crop Border(s)'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1331
          name: 'Crop Border(s)'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1332
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1333
          bounds: (Rectangle 14 46 259 229)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1334
        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1335
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1336
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1337
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1338
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1339
              label: 'Left:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1340
              name: 'GropLeftLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1341
              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
  1342
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1343
              adjust: right
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1344
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1345
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1346
              name: 'GropLeftEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1347
              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
  1348
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1349
              model: left
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1350
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1351
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1352
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1353
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1354
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1355
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1356
              name: 'GropLeftNowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1357
              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
  1358
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1359
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1360
              model: gropLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1361
              autoRepeat: true
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1362
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1363
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1364
              label: 'Right:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1365
              name: 'GropRightLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1366
              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
  1367
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1368
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1369
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1370
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1371
              name: 'GropRightEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1372
              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
  1373
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1374
              model: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1375
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1376
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1377
              acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1378
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1379
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1380
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1381
              name: 'GropRightButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1382
              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
  1383
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1384
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1385
              model: gropRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1386
              autoRepeat: true
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1387
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1388
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1389
              label: 'Top:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1390
              name: 'GropTopLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1391
              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
  1392
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1393
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1394
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1395
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1396
              name: 'GropTopEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1397
              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
  1398
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1399
              model: top
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1400
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1401
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1402
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1403
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1404
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1405
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1406
              name: 'GropTopButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1407
              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
  1408
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1409
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1410
              model: gropTopNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1411
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1412
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1413
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1414
              label: 'Bottom:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1415
              name: 'GropBottomLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1416
              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
  1417
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1418
              adjust: right
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1419
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1420
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1421
              name: 'GropBottomEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1422
              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
  1423
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1424
              model: bottom
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1425
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1426
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1427
              acceptOnPointerLeave: false
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1428
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1429
           (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1430
              label: 'Now'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1431
              name: 'GropBottomButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1432
              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
  1433
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1434
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1435
              model: gropBottomNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1436
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1437
            )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1438
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1439
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1440
              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
  1441
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1442
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1443
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1444
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1445
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1446
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1447
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1448
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1449
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1450
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1451
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1452
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1453
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1454
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1455
                    extent: (Point 77 22)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1456
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1457
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1458
                    label: 'Apply'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1459
                    name: 'Button3'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1460
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1461
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1462
                    model: applyAction
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1463
                    extent: (Point 78 22)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1464
                  )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1465
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1466
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1467
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1468
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1469
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1470
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1471
                    extent: (Point 78 22)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1472
                  )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1473
                 )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1474
               
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1475
              )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1476
            )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1477
           )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1478
         
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1479
        )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1480
      )
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1481
!
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1482
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1483
dialogSpecForNewImage
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1484
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1485
     by the UIPainter of ST/X."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1486
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1487
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1488
     the UIPainter may not be able to read the specification."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1489
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1490
    "
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1491
     UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1492
     ImageEditor new openInterface:#dialogSpecForNewImage
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1493
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1494
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1495
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1496
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1497
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1498
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1499
        name: dialogSpecForNewImage
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1500
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1501
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1502
          label: 'New Image'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1503
          name: 'New Image'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1504
          min: (Point 10 10)
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1505
          bounds: (Rectangle 0 0 301 119)
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1506
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1507
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1508
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1509
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1510
           (ViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1511
              name: 'View'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1512
              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
  1513
              level: 1
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1514
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1515
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1516
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1517
                 (FramedBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1518
                    label: 'Size'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1519
                    name: 'framedBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1520
                    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
  1521
                    style: (FontDescription helvetica medium roman 12)
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1522
                    labelPosition: topLeft
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1523
                    translateLabel: true
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1524
                    component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1525
                   (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1526
                      collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1527
                       (ComboBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1528
                          name: 'defaultSizesComboBox'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1529
                          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
  1530
                          model: selectionOfSize
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1531
                          type: string
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1532
                          acceptOnPointerLeave: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1533
                          comboList: listOfDefaultSizes
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1534
                          isFilenameBox: false
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1535
                        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1536
                       )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1537
                     
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1538
                    )
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  1539
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1540
                 (FramedBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1541
                    label: 'Color Map'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1542
                    name: 'framedBox2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1543
                    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
  1544
                    style: (FontDescription helvetica medium roman 12)
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1545
                    labelPosition: topLeft
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
  1546
                    translateLabel: true
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1547
                    component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1548
                   (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1549
                      collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1550
                       (ComboListSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1551
                          name: 'colorMapComboBox'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1552
                          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
  1553
                          model: selectionOfColorMap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1554
                          comboList: listOfColorMaps
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1555
                          useIndex: false
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  1556
                          hidePullDownMenuButton: false
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1557
                        )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1558
                       )
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1559
                     
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1560
                    )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1561
                  )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1562
                 )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1563
               
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1564
              )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1565
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1566
           (UISubSpecification
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1567
              name: 'windowSpecForCommitWithoutChannels'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1568
              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
  1569
              minorKey: windowSpecForCommitWithoutChannels
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1570
            )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1571
           )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1572
         
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1573
        )
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1574
      )
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1575
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1576
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1577
shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1578
    "This resource specification was automatically generated
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1579
     by the UIPainter of ST/X."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1580
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1581
    "Do not manually edit this!! If it is corrupted,
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1582
     the UIPainter may not be able to read the specification."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1583
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1584
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1585
     UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1586
     ImageEditor new openInterface:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1587
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1588
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1589
    <resource: #canvas>
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1590
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1591
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1592
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1593
        name: shiftDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1594
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1595
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1596
          label: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1597
          name: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1598
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1599
          bounds: (Rectangle 14 46 259 229)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1600
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1601
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1602
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1603
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1604
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1605
              label: 'Amount:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1606
              name: 'AmountLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1607
              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
  1608
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1609
              adjust: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1610
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1611
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1612
              name: 'AmountEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1613
              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
  1614
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1615
              model: shiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1616
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1617
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1618
              acceptOnPointerLeave: false
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1619
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1620
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1621
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1622
              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
  1623
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1624
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1625
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1626
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1627
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1628
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1629
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1630
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1631
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1632
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1633
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1634
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1635
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1636
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1637
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1638
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1639
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1640
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1641
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1642
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1643
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1644
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1645
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1646
                  )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1647
                 )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1648
               
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1649
              )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1650
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1651
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1652
              name: 'upArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1653
              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
  1654
              model: shiftUpNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1655
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1656
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1657
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1658
              direction: up
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1659
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1660
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1661
              name: 'leftArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1662
              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
  1663
              model: shiftLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1664
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1665
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1666
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1667
              direction: left
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1668
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1669
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1670
              name: 'rightArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1671
              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
  1672
              model: shiftRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1673
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1674
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1675
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1676
              direction: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1677
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1678
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1679
              name: 'downArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1680
              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
  1681
              model: shiftDownNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1682
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1683
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1684
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1685
              direction: down
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1686
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1687
           (CheckBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1688
              label: 'Wrap'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1689
              name: 'CheckBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1690
              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
  1691
              model: wrap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1692
              translateLabel: true
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  1693
            )
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1694
           )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1695
         
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1696
        )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1697
      )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1698
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  1699
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1700
uncropDialogSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1701
    "This resource specification was automatically generated
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1702
     by the UIPainter of ST/X."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1703
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1704
    "Do not manually edit this!! If it is corrupted,
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1705
     the UIPainter may not be able to read the specification."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1706
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1707
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1708
     UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1709
     ImageEditor new openInterface:#uncropDialogSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1710
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1711
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1712
    <resource: #canvas>
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1713
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1714
    ^ 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1715
     #(FullSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1716
        name: uncropDialogSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1717
        window: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1718
       (WindowSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1719
          label: 'Add Border(s)'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1720
          name: 'Add Border(s)'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1721
          min: (Point 10 10)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1722
          max: (Point 800 478)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1723
          bounds: (Rectangle 0 0 261 228)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1724
        )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1725
        component: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1726
       (SpecCollection
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1727
          collection: (
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1728
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1729
              label: 'Left:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1730
              name: 'Label1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1731
              layout: (LayoutFrame 14 0 21 0 90 0 43 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1732
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1733
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1734
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1735
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1736
              name: 'EntryField1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1737
              layout: (LayoutFrame 95 0 21 0 132 0 43 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1738
              model: left
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1739
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1740
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1741
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1742
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1743
              label: 'Right:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1744
              name: 'Label2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1745
              layout: (LayoutFrame 14 0 51 0 90 0 73 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1746
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1747
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1748
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1749
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1750
              name: 'EntryField2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1751
              layout: (LayoutFrame 95 0 51 0 132 0 73 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1752
              model: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1753
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1754
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1755
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1756
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1757
              label: 'Top:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1758
              name: 'Label3'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1759
              layout: (LayoutFrame 14 0 81 0 90 0 103 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1760
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1761
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1762
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1763
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1764
              name: 'EntryField3'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1765
              layout: (LayoutFrame 95 0 81 0 132 0 103 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1766
              model: top
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1767
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1768
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1769
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1770
           (LabelSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1771
              label: 'Bottom:'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1772
              name: 'Label4'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1773
              layout: (LayoutFrame 14 0 111 0 90 0 133 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1774
              translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1775
              adjust: right
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1776
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1777
           (InputFieldSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1778
              name: 'EntryField4'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1779
              layout: (LayoutFrame 95 0 111 0 132 0 133 0)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1780
              model: bottom
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1781
              type: number
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1782
              acceptOnPointerLeave: false
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1783
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1784
           (HorizontalPanelViewSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1785
              name: 'HorizontalPanel1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1786
              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
  1787
              horizontalLayout: fitSpace
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1788
              verticalLayout: center
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1789
              horizontalSpace: 3
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1790
              verticalSpace: 3
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1791
              reverseOrderIfOKAtLeft: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1792
              component: 
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1793
             (SpecCollection
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1794
                collection: (
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1795
                 (ActionButtonSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1796
                    label: 'Cancel'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1797
                    name: 'Button1'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1798
                    translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1799
                    model: cancel
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1800
                    extent: (Point 118 22)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1801
                  )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1802
                 (ActionButtonSpec
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1803
                    label: 'OK'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1804
                    name: 'Button2'
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1805
                    translateLabel: true
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1806
                    model: accept
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1807
                    extent: (Point 118 22)
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1808
                  )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1809
                 )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1810
               
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1811
              )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1812
            )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1813
           )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1814
         
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1815
        )
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  1816
      )
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1817
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  1818
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1819
windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1820
    "This resource specification was automatically generated
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1821
     by the UIPainter of ST/X."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1822
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1823
    "Do not manually edit this!! If it is corrupted,
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1824
     the UIPainter may not be able to read the specification."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1825
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1826
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1827
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1828
     ImageEditor new openInterface:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1829
     ImageEditor open
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1830
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1831
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1832
    <resource: #canvas>
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1833
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1834
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1835
     #(FullSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1836
        name: windowSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1837
        window: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1838
       (WindowSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1839
          label: 'Image Editor'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1840
          name: 'Image Editor'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1841
          min: (Point 400 320)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1842
          bounds: (Rectangle 0 0 450 350)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1843
          menu: menu
2155
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
  1844
          icon: defaultIcon
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1845
        )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1846
        component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1847
       (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1848
          collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1849
           (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1850
              name: 'menuToolbarView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1851
              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
  1852
              style: (FontDescription helvetica medium roman 10)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1853
              menu: menuToolbar
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1854
              showSeparatingLines: true
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1855
            )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1856
           (VariableHorizontalPanelSpec
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  1857
              name: 'mainPanel'
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1858
              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
  1859
              snapMode: both
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  1860
              barLevel: 0
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1861
              component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1862
             (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1863
                collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1864
                 (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1865
                    name: 'leftView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1866
                    level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1867
                    component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1868
                   (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1869
                      collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1870
                       (VariableVerticalPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1871
                          name: 'verticalPanel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1872
                          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
  1873
                          level: 0
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1874
                          snapMode: both
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1875
                          component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1876
                         (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1877
                            collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1878
                             (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1879
                                name: 'View1'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1880
                                component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1881
                               (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1882
                                  collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1883
                                   (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1884
                                      name: 'MouseButtonColorToolBar'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1885
                                      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
  1886
                                      level: 0
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1887
                                      menu: menuMouseButtonColors
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1888
                                    )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1889
                                   (DataSetSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1890
                                      name: 'colorDataSetView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1891
                                      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
  1892
                                      activeHelpKey: colorMapTable
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1893
                                      style: (FontDescription helvetica medium roman 10)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1894
                                      model: selectionOfColor
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1895
                                      menu: colorMapMenu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1896
                                      hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1897
                                      hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1898
                                      miniScrollerHorizontal: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1899
                                      miniScrollerVertical: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1900
                                      dataList: listOfColors
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1901
                                      has3Dseparators: true
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  1902
                                      doubleClickSelector: doubleClickOnColor:
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  1903
                                      columnHolder: colorTableColumns
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1904
                                      verticalSpacing: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1905
                                      columnAdaptor: colorColumnAdaptor
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1906
                                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1907
                                   )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1908
                                 
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1909
                                )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1910
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1911
                             (ArbitraryComponentSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1912
                                name: 'imagePreView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1913
                                activeHelpKey: previewView
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1914
                                menu: previewMenu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1915
                                hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1916
                                hasVerticalScrollBar: true
2728
7b0f0d920794 changed:
Claus Gittinger <cg@exept.de>
parents: 2718
diff changeset
  1917
                                miniScrollerHorizontal: false
7b0f0d920794 changed:
Claus Gittinger <cg@exept.de>
parents: 2718
diff changeset
  1918
                                miniScrollerVertical: false
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1919
                                hasBorder: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1920
                                component: ImageView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1921
                              )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1922
                             )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1923
                           
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1924
                          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1925
                          handles: (Any 0.5 1.0)
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1926
                        )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1927
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1928
                     
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1929
                    )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1930
                  )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1931
                 (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1932
                    name: 'rightView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1933
                    component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1934
                   (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1935
                      collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1936
                       (MenuPanelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1937
                          name: 'ToolBar1'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1938
                          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
  1939
                          level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1940
                          menu: toolsMenuToolbar
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1941
                          verticalLayout: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1942
                          centerItems: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1943
                          textDefault: true
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  1944
                        )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1945
                       (ViewSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1946
                          name: 'editingView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1947
                          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
  1948
                          level: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1949
                          component: 
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1950
                         (SpecCollection
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1951
                            collection: (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1952
                             (ArbitraryComponentSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1953
                                name: 'imageEditView'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1954
                                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
  1955
                                hasHorizontalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1956
                                hasVerticalScrollBar: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1957
                                hasBorder: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1958
                                component: ImageEditView
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1959
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1960
                             (LabelSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1961
                                name: 'coordLabel'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1962
                                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
  1963
                                level: -1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1964
                                labelChannel: imageInfoHolder
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1965
                                resizeForLabel: false
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1966
                                adjust: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1967
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1968
                             (ArrowButtonSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1969
                                name: 'magnifyDownButton'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1970
                                layout: (LayoutFrame -80 1 -22 1 -58 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1971
                                activeHelpKey: magnifyImageDown
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1972
                                model: doMagnifyDown
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  1973
                                enableChannel: imageIsLoadedHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1974
                                isTriggerOnDown: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1975
                                direction: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1976
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1977
                             (ArrowButtonSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1978
                                name: 'magnifyUpButton'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1979
                                layout: (LayoutFrame -24 1 -22 1 -2 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1980
                                activeHelpKey: magnifyImageUp
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1981
                                model: doMagnifyUp
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  1982
                                enableChannel: imageIsLoadedHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1983
                                isTriggerOnDown: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1984
                                direction: right
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1985
                              )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1986
                             (InputFieldSpec
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1987
                                name: 'magnificationInputField'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1988
                                layout: (LayoutFrame -57 1 -22 1 -26 1 0 1)
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1989
                                activeHelpKey: magnificationNumber
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  1990
                                enableChannel: imageIsLoadedHolder
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  1991
                                model: magnificationHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1992
                                type: numberInRange
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  1993
                                acceptOnReturn: true
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  1994
                                acceptOnTab: true
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1995
                                numChars: 2
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1996
                                minValue: 1
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  1997
                                maxValue: 99
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  1998
                                acceptOnPointerLeave: true
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1999
                              )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2000
                             )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2001
                           
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2002
                          )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2003
                        )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2004
                       )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2005
                     
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2006
                    )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2007
                  )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2008
                 )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2009
               
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2010
              )
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  2011
              handles: (Any 0.288889 1.0)
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2012
            )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2013
           (UISubSpecification
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2014
              name: 'infoBarSubSpec'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2015
              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
  2016
              majorKey: ToolApplicationModel
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  2017
              minorKey: windowSpecForInfoBar
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2018
            )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2019
           )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2020
         
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2021
        )
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2022
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2023
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2024
    "Modified: / 04-07-2010 / 10:18:33 / cg"
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2025
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2026
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2027
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2028
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2029
colorMapMenu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2030
    "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
  2031
     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
  2032
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2033
    "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
  2034
     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
  2035
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2036
    "
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2037
     MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2038
     (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
  2039
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2040
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2041
    <resource: #menu>
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2042
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2043
    ^ 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2044
     #(Menu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2045
        (
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2046
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2047
            enabled: hasColormapHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2048
            label: 'Add Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2049
            itemValue: addColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2050
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2051
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2052
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2053
            enabled: hasColormapHolder
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2054
            label: 'Pick and Add Color...'
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2055
            itemValue: pickAndAddColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2056
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2057
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2058
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2059
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2060
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2061
         (MenuItem
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2062
            enabled: hasColormapAndColorSelected
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2063
            label: 'Cut Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2064
            itemValue: cutColorFromColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2065
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2066
            isVisible: false
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2067
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2068
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2069
            enabled: hasColorSelectedHolder
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2070
            label: 'Copy Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2071
            itemValue: copyColorFromColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2072
            translateLabel: true
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  2073
            shortcutKey: Copy
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2074
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2075
         (MenuItem
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2076
            enabled: hasColormapAndColorSelected
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2077
            label: 'Pick and Paste Color...'
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  2078
            itemValue: pickAndPasteColor
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2079
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2080
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2081
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2082
            label: 'Paste Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2083
            itemValue: pasteColorIntoColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2084
            translateLabel: true
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  2085
            shortcutKey: Paste
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2086
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2087
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2088
            label: '-'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2089
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2090
         (MenuItem
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2091
            enabled: hasColormapAndColorSelected
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2092
            label: 'Edit Color...'
1931
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2093
            itemValue: editSelectedColor
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2094
            translateLabel: true
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2095
          )
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2096
         (MenuItem
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2097
            enabled: hasColormapAndColorSelected
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2098
            label: 'Brighter'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2099
            itemValue: makeSelectedColorBrighter
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2100
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2101
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2102
         (MenuItem
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2103
            enabled: hasColormapAndColorSelected
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2104
            label: 'Darker'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2105
            itemValue: makeSelectedColorDarker
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2106
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2107
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2108
         (MenuItem
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2109
            enabled: hasColormapAndColorSelected
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2110
            label: 'Make Gray'
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2111
            itemValue: makeSelectedColorGray
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2112
            translateLabel: true
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2113
          )
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2114
         (MenuItem
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2115
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2116
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2117
         (MenuItem
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  2118
            enabled: hasColorSelectedHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2119
            label: 'Inspect Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2120
            itemValue: inspectColor
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2121
            translateLabel: true
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2122
          )
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2123
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2124
            enabled: hasColormapHolder
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2125
            label: 'Inspect Colormap'
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2126
            itemValue: inspectColormap
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2127
            translateLabel: true
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2128
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2129
         )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2130
        nil
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2131
        nil
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2132
      )
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2133
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2134
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2135
menu
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2136
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2137
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2138
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2139
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2140
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2141
228524287573 intitial checkin
tz
parents:
diff changeset
  2142
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2143
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
  2144
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  2145
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2146
228524287573 intitial checkin
tz
parents:
diff changeset
  2147
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  2148
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2149
    ^ 
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2150
     #(Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2151
        (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2152
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2153
            label: '&File'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2154
            translateLabel: true
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2155
            submenuChannel: menuFile
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2156
            "/ keepLinkedMenu: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2157
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2158
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2159
            label: 'Edit'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2160
            translateLabel: true
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2161
            submenuChannel: menuEdit
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2162
            "/ keepLinkedMenu: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2163
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2164
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2165
            label: 'Mode'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2166
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2167
            submenuChannel: modeMenu
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2168
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2169
         (MenuItem
1924
73271e3c217f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1923
diff changeset
  2170
            label: 'Colors'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2171
            translateLabel: true
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2172
            submenuChannel: menuColors
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2173
          )
1882
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: 'Settings'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2176
            translateLabel: true
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2177
            submenuChannel: menuSettings
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2178
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2179
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2180
            label: 'History'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2181
            translateLabel: true
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  2182
            isVisible: isStandAlone
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2183
            submenuChannel: menuHistory
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2184
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2185
         (MenuItem
2136
bb10485fa455 support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents: 2125
diff changeset
  2186
            label: 'MENU_Help'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2187
            translateLabel: true
2125
22ad4aa3e495 #conditionalRight
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
  2188
            startGroup: conditionalRight
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2189
            submenuChannel: menuHelp
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2190
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2191
         )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2192
        nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2193
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2194
      )
228524287573 intitial checkin
tz
parents:
diff changeset
  2195
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2196
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2197
menuColors
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2198
    "This resource specification was automatically generated
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2199
     by the MenuEditor of ST/X."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2200
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2201
    "Do not manually edit this!! If it is corrupted,
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2202
     the MenuEditor may not be able to read the specification."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2203
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2204
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2205
     MenuEditor new openOnClass:ImageEditor andSelector:#menuColors
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2206
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2207
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2208
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2209
    <resource: #menu>
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2210
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2211
    ^ 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2212
     #(Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2213
        (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2214
         (MenuItem
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2215
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2216
            label: 'Depth'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2217
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2218
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2219
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2220
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2221
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2222
                  activeHelpKey: colorMap1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2223
                  label: '1-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2224
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2225
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2226
                  argument: depth1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2227
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2228
                  choiceValue: depth1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2229
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2230
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2231
                  activeHelpKey: colorMap1M
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2232
                  label: '1-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2233
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2234
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2235
                  argument: masked1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2236
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2237
                  choiceValue: masked1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2238
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2239
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2240
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2241
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2242
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2243
                  activeHelpKey: colorMap2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2244
                  label: '2-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2245
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2246
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2247
                  argument: depth2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2248
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2249
                  choiceValue: depth2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2250
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2251
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2252
                  activeHelpKey: colorMap2M
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2253
                  label: '2-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2254
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2255
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2256
                  argument: masked2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2257
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2258
                  choiceValue: masked2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2259
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2260
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2261
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2262
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2263
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2264
                  activeHelpKey: colorMap4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2265
                  label: '4-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2266
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2267
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2268
                  argument: depth4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2269
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2270
                  choiceValue: depth4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2271
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2272
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2273
                  activeHelpKey: colorMap4M
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2274
                  label: '4-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2275
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2276
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2277
                  argument: masked4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2278
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2279
                  choiceValue: masked4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2280
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2281
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2282
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2283
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2284
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2285
                  activeHelpKey: colorMap8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2286
                  label: '8-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2287
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2288
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2289
                  argument: depth8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2290
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2291
                  choiceValue: depth8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2292
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2293
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2294
                  activeHelpKey: colorMap8M
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2295
                  label: '8-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2296
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2297
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2298
                  argument: masked8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2299
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2300
                  choiceValue: masked8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2301
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2302
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2303
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2304
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2305
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2306
                  activeHelpKey: colorMap16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2307
                  label: '16-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2308
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2309
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2310
                  argument: depth16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2311
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2312
                  choiceValue: depth16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2313
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2314
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2315
                  activeHelpKey: colorMap16M
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2316
                  label: '16-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2317
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2318
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2319
                  argument: masked16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2320
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2321
                  choiceValue: masked16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2322
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2323
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2324
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2325
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2326
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2327
                  activeHelpKey: colorMap24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2328
                  label: '24-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2329
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2330
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2331
                  argument: depth24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2332
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2333
                  choiceValue: depth24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2334
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2335
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2336
                  activeHelpKey: colorMap24M
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2337
                  label: '24-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2338
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2339
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2340
                  argument: masked24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2341
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2342
                  choiceValue: masked24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2343
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2344
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2345
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2346
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2347
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2348
                  activeHelpKey: colorMap32
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2349
                  label: '32-Plane (rgba)'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2350
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2351
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2352
                  argument: depth32
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2353
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2354
                  choiceValue: depth32
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2355
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2356
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2357
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2358
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2359
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2360
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2361
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2362
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2363
            label: 'ColorMap'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2364
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2365
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2366
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2367
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2368
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2369
                  activeHelpKey: compressColormap
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2370
                  enabled: hasColormapHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2371
                  label: 'Compress Colormap'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2372
                  itemValue: #'menu_compressColorMap'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2373
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2374
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2375
               (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2376
                  enabled: hasColormapHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2377
                  label: 'Sort Colormap'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2378
                  itemValue: #'menu_sortColorMap'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2379
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2380
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2381
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2382
                  label: 'Reduce Number of Colors by Rounding...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2383
                  itemValue: reduceNumberOfColors2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2384
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2385
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2386
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2387
                  label: 'Reduce Number of Colors by Masking Bits...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2388
                  itemValue: reduceNumberOfColors
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2389
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2390
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2391
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2392
                  label: 'Dither to Depth...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2393
                  itemValue: ditherToDepth
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2394
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2395
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2396
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2397
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2398
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2399
               (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2400
                  enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2401
                  label: 'Brighten'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2402
                  itemValue: doBrightenImage
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2403
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2404
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2405
               (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2406
                  enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2407
                  label: 'Darken'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2408
                  itemValue: doDarkenImage
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2409
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2410
                )
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2411
               (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2412
                  enabled: imageIsLoadedHolder
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2413
                  label: 'Invert'
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2414
                  itemValue: doNegativeImage
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2415
                  translateLabel: true
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2416
                )
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2417
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2418
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2419
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2420
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2421
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2422
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2423
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2424
            label: 'Process'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2425
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2426
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2427
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2428
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2429
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2430
                  label: 'Make GrayScale'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2431
                  itemValue: makeGrayScaleImage
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2432
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2433
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2434
               (MenuItem
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2435
                  enabled: allowedToChangeImageDimensionAndDepth
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2436
                  label: 'Make dithered 8Bit Palette'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2437
                  itemValue: makeDitheredPaletteImage
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2438
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2439
                  isVisible: false
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2440
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2441
               (MenuItem
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2442
                  label: 'Make Inverse'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2443
                  itemValue: makeInverse
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2444
                  translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2445
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2446
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2447
                  label: '-'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2448
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2449
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2450
                  label: 'Make Slightly Brighter'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2451
                  itemValue: makeSlightlyBrighter
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2452
                  translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2453
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2454
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2455
                  label: 'Make Slightly Darker'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2456
                  itemValue: makeSlightlyDarker
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2457
                  translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2458
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2459
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2460
                  label: '-'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2461
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2462
               (MenuItem
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2463
                  label: 'Make Brighter'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2464
                  itemValue: makeBrighter
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2465
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2466
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2467
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2468
                  label: 'Make Darker'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2469
                  itemValue: makeDarker
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2470
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2471
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2472
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2473
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2474
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2475
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2476
                  label: 'Change HLS...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2477
                  itemValue: changeHLS
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2478
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2479
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2480
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2481
                  label: 'Colorize...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2482
                  itemValue: colorize
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2483
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2484
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2485
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2486
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2487
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2488
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2489
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2490
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2491
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2492
            label: 'Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2493
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2494
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2495
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2496
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2497
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2498
                  activeHelpKey: copyMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2499
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2500
                  label: 'Copy Mask'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2501
                  itemValue: #'menu_copyMask'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2502
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2503
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2504
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2505
                  activeHelpKey: pasteMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2506
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2507
                  label: 'Paste Mask'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2508
                  itemValue: #'menu_pasteMask'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2509
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2510
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2511
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2512
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2513
                  label: 'Clear Masked Pixels'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2514
                  itemValue: #'menu_clearMaskedPixels'
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2515
                  translateLabel: true
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2516
                )
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2517
               (MenuItem
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  2518
                  enabled: hasMask
2653
f0e64b82fa93 changed: #menuColors
Claus Gittinger <cg@exept.de>
parents: 2652
diff changeset
  2519
                  label: 'Clear Colormap Entry for Masked Pixels'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2520
                  itemValue: #'menu_clearColormapEntry0AndMaskedPixels'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2521
                  translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2522
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2523
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2524
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2525
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2526
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2527
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2528
         )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2529
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2530
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2531
      )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2532
!
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2533
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2534
menuEdit
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2535
    "This resource specification was automatically generated
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2536
     by the MenuEditor of ST/X."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2537
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2538
    "Do not manually edit this!! If it is corrupted,
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2539
     the MenuEditor may not be able to read the specification."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2540
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2541
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2542
     MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2543
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2544
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2545
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2546
    <resource: #menu>
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2547
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2548
    ^ 
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2549
     #(Menu
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2550
        (
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2551
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2552
            activeHelpKey: editUndo
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2553
            enabled: canUndoHolder
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2554
            label: 'Undo'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2555
            itemValue: doUndo
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2556
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2557
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2558
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2559
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2560
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2561
         (MenuItem
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2562
            enabled: imageIsLoadedHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2563
            label: 'Copy to Clipboard'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2564
            itemValue: doCopyImageToClipboard
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2565
            translateLabel: true
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2566
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2567
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2568
            label: '-'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2569
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2570
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2571
            activeHelpKey: editResize
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2572
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2573
            label: 'Resize...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2574
            itemValue: doResizeImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2575
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2576
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2577
         (MenuItem
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2578
            activeHelpKey: editMagnifyImage
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2579
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2580
            label: 'Magnify...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2581
            itemValue: doMagnifyImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2582
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2583
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2584
         (MenuItem
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2585
            activeHelpKey: editMagnifyImage
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2586
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2587
            label: 'Magnify By...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2588
            itemValue: doMagnifyImageBy
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2589
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2590
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2591
         (MenuItem
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2592
            activeHelpKey: editRotate
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2593
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2594
            label: 'Rotate...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2595
            itemValue: doRotateImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2596
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2597
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2598
         (MenuItem
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2599
            activeHelpKey: edit3DProjection
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2600
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2354
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  2601
            label: '3D Projection...'
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  2602
            itemValue: do3DProjection
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  2603
            translateLabel: true
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  2604
          )
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  2605
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2606
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2607
            label: 'Flip'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2608
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2609
            submenu: 
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2610
           (Menu
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2611
              (
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2612
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2613
                  activeHelpKey: editFlipVertical
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2614
                  enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2615
                  label: 'Flip - Vertical'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2616
                  itemValue: doFlipVertical
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2617
                  translateLabel: true
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  2618
                  labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical')
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2619
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2620
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2621
                  activeHelpKey: editFlipHorizontal
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2622
                  enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2623
                  label: 'Flip - Horizontal'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2624
                  itemValue: doFlipHorizontal
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2625
                  translateLabel: true
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  2626
                  labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal')
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2627
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2628
               )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2629
              nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2630
              nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2631
            )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2632
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2633
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2634
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2635
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2636
         (MenuItem
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2637
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2638
            label: 'Crop'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2639
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2640
            submenu: 
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2641
           (Menu
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2642
              (
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2643
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2644
                  activeHelpKey: cropManual
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2645
                  label: 'Manual...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2646
                  itemValue: doCropManual
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2647
                  translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2648
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2649
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2650
                  label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2651
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2652
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2653
                  activeHelpKey: cropAll
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2654
                  label: 'All'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2655
                  itemValue: doCropAll
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2656
                  translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2657
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2658
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2659
                  label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2660
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2661
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2662
                  activeHelpKey: cropLeft
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2663
                  label: 'Left'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2664
                  itemValue: doCropLeft
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2665
                  translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2666
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2667
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2668
                  activeHelpKey: cropRight
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2669
                  label: 'Right'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2670
                  itemValue: doCropRight
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2671
                  translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2672
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2673
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2674
                  activeHelpKey: cropTop
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2675
                  label: 'Top'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2676
                  itemValue: doCropTop
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2677
                  translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2678
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2679
               (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2680
                  activeHelpKey: cropBottom
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2681
                  label: 'Bottom'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2682
                  itemValue: doCropBottom
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2683
                  translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2684
                )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2685
               )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2686
              nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2687
              nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2688
            )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2689
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2690
         (MenuItem
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2691
            activeHelpKey: uncropManual
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  2692
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2693
            label: 'Uncrop (Add Border)...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2694
            itemValue: doUnCropManual
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2695
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2696
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2697
         (MenuItem
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2698
            activeHelpKey: shiftManual
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2699
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2700
            label: 'Shift...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2701
            itemValue: doShiftManual
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2702
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2703
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2704
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2705
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2706
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2707
         (MenuItem
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2708
            activeHelpKey: fileEditMask
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2709
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2710
            label: 'Edit Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2711
            itemValue: doEditMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2712
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2713
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2714
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2715
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2716
            label: 'Text...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2717
            itemValue: doInsertTextFromUser
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2718
            translateLabel: true
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2719
          )
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2720
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2721
            label: '-'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2722
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2723
         (MenuItem
2814
ca2fc304931a changed: #menuEdit
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
  2724
            label: 'Animation Sequence'
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2725
            translateLabel: true
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2726
            submenu: 
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2727
           (Menu
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2728
              (
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2729
               (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2730
                  enabled: imageHasNextImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2731
                  label: 'Next in Sequence'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2732
                  itemValue: nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2733
                  translateLabel: true
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2734
                )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2735
               (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2736
                  enabled: imageHasPreviousImageHolder
2813
0192e44405fc changed: #menuEdit
Claus Gittinger <cg@exept.de>
parents: 2812
diff changeset
  2737
                  label: 'Previous in Sequence'
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2738
                  itemValue: previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2739
                  translateLabel: true
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2740
                )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2741
               (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2742
                  label: '-'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2743
                )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2744
               (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2745
                  enabled: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2746
                  label: 'Edit each from Sequence'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2747
                  itemValue: editEachImageFromSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2748
                  translateLabel: true
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2749
                )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2750
               )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2751
              nil
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2752
              nil
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2753
            )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  2754
          )
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2755
         )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2756
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2757
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2758
      )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2759
!
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2760
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2761
menuFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2762
    "This resource specification was automatically generated
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2763
     by the MenuEditor of ST/X."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2764
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2765
    "Do not manually edit this!! If it is corrupted,
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2766
     the MenuEditor may not be able to read the specification."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2767
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  2768
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2769
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2770
     MenuEditor new openOnClass:ImageEditor andSelector:#menuFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2771
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2772
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2773
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2774
    <resource: #menu>
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2775
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2776
    ^ 
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2777
     #(Menu
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2778
        (
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2779
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2780
            activeHelpKey: fileNewImageEditor
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2781
            label: 'New ImageEditor'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2782
            itemValue: doNewImageEditor
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2783
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2784
         (MenuItem
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  2785
            label: '-'
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  2786
          )
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  2787
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2788
            activeHelpKey: fileNewImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2789
            label: 'New...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2790
            itemValue: doNewImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2791
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2792
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2793
            activeHelpKey: fileNewImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2794
            label: 'New from ClipBoard'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2795
            itemValue: doNewImageFromClipboard
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2796
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2797
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2798
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2799
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2800
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2801
            activeHelpKey: fileLoadFromClass
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2802
            label: 'Load...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2803
            itemValue: doLoadFromClass
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2804
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2805
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2806
            activeHelpKey: fileLoadFromFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2807
            label: 'Load from File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2808
            itemValue: doLoadFromFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2809
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2810
         (MenuItem
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  2811
            activeHelpKey: fileLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  2812
            label: 'Load from URL...'
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  2813
            itemValue: doLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  2814
          )
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  2815
         (MenuItem
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2816
            label: 'Grab'
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2817
            submenu: 
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2818
           (Menu
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2819
              (
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2820
               (MenuItem
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2821
                  activeHelpKey: fileGrabImageFromScreen
2717
fac7e5156235 changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2712
diff changeset
  2822
                  label: 'Grab from Screen Area...'
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2823
                  itemValue: grabScreenImage
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2824
                )
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2825
               (MenuItem
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2826
                  activeHelpKey: fileGrabImageFromScreen
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2827
                  enabled: hasLastGrabScreenArea
2711
4700f54d0040 changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2708
diff changeset
  2828
                  label: 'Grab again from same Screen Area'
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2829
                  itemValue: grabScreenImageFromLastArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2830
                )
2771
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2831
               (MenuItem
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2832
                  label: '-'
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2833
                )
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2834
               (MenuItem
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2835
                  activeHelpKey: fileGrabImageFromWindow
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2836
                  label: 'Grab from Window...'
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2837
                  itemValue: grabWindowImage
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  2838
                )
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2839
               )
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2840
              nil
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2841
              nil
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  2842
            )
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  2843
          )
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  2844
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2845
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2846
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2847
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2848
            activeHelpKey: fileSaveMethod
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2849
            enabled: imageIsLoadedAndClassDefined
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2850
            label: 'Save'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2851
            itemValue: doSaveMethod
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2852
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2853
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2854
            activeHelpKey: fileSaveMethodAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2855
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2856
            label: 'Save As...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2857
            itemValue: doSaveMethodAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2858
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2859
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2860
            activeHelpKey: fileSaveAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2861
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2862
            label: 'Save to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2863
            itemValue: doSaveImageFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2864
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2865
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2866
            activeHelpKey: fileSaveMaskAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2867
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2868
            label: 'Save Mask to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2869
            itemValue: doSaveImageMaskFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2870
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2871
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2872
            activeHelpKey: fileSaveButtonImageAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2873
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2874
            label: 'Save as Button to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2875
            itemValue: doSaveButtonImageToFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2876
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2877
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2878
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2879
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2880
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2881
            activeHelpKey: filePrint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2882
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2883
            label: 'Print'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2884
            itemValue: doPrint
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2885
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2886
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2887
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2888
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2889
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2890
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2891
            activeHelpKey: fileBrowseClass
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2892
            enabled: hasClassDefinedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2893
            label: 'Browse Class'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2894
            itemValue: doBrowseClass
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2895
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2896
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2897
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2898
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2899
            label: 'Inspect Image'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2900
            itemValue: doInspectImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2901
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2902
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2903
         (MenuItem
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2904
            activeHelpKey: fileShowStoreString
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2905
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2906
            label: 'Show storeString'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2907
            itemValue: doShowStoreString
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  2908
          )
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  2909
         (MenuItem
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  2910
            activeHelpKey: fileShowStoreString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  2911
            enabled: imageIsLoadedHolder
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  2912
            label: 'Show Pixel Array Literal String'
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  2913
            itemValue: doShowPixelArrayLiteralString
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2914
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2915
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2916
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2917
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2918
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2919
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2920
            activeHelpKey: fileExit
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2921
            label: 'Exit'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2922
            itemValue: closeRequest
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2923
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2924
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2925
         )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2926
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2927
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2928
      )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2929
!
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2930
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2931
menuMouseButtonColors
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2932
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2933
     by the MenuEditor of ST/X."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2934
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2935
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2936
     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
  2937
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2938
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2939
     MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2940
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2941
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2942
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2943
    <resource: #menu>
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2944
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2945
    ^
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2946
     
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2947
       #(#Menu
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2948
          
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2949
           #(
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2950
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2951
                #label: 'Left Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2952
                #nameKey: #leftMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2953
                #activeHelpKey: #mouseKeyColorMode
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2954
                #enabled: #imageIsLoadedHolder
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2955
                #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2956
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2957
                #choiceValue: 1
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2958
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2959
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2960
                #label: 'Right Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2961
                #nameKey: #rightMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2962
                #activeHelpKey: #mouseKeyColorMode
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2963
                #enabled: #imageIsLoadedHolder
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2964
                #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2965
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  2966
                #choiceValue: 2
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2967
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2968
          ) nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2969
          nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2970
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2971
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2972
    "Modified: / 04-07-2010 / 10:17:37 / cg"
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2973
!
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  2974
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2975
menuSettings
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2976
    "This resource specification was automatically generated
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2977
     by the MenuEditor of ST/X."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2978
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2979
    "Do not manually edit this!! If it is corrupted,
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2980
     the MenuEditor may not be able to read the specification."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2981
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  2982
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2983
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2984
     MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2985
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2986
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2987
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2988
    <resource: #menu>
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2989
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2990
    ^ 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2991
     #(Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2992
        (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2993
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2994
            activeHelpKey: settingsGridMagnification
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2995
            label: 'Grid Magnification Limit...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2996
            itemValue: doChangeGridMagnification
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2997
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2998
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2999
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3000
            label: 'Pen'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3001
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3002
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3003
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3004
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3005
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3006
                  label: '1'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3007
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3008
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3009
                  choiceValue: 1
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3010
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3011
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3012
                  label: '5'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3013
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3014
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3015
                  choiceValue: 5
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3016
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3017
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3018
                  label: '10'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3019
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3020
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3021
                  choiceValue: 10
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3022
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3023
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3024
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3025
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3026
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3027
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3028
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3029
            label: 'Spray'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3030
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3031
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3032
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3033
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3034
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3035
                  label: '4'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3036
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3037
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3038
                  choiceValue: 4
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3039
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3040
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3041
                  label: '8'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3042
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3043
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3044
                  choiceValue: 8
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3045
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3046
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3047
                  label: '16'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3048
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3049
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3050
                  choiceValue: 16
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3051
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3052
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3053
                  label: '32'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3054
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3055
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3056
                  choiceValue: 32
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3057
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3058
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3059
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3060
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3061
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3062
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3063
         )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3064
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3065
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3066
      )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3067
!
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3068
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3069
menuToolbar
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3070
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3071
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3072
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3073
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3074
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3075
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3076
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3077
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  3078
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
  3079
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  3080
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  3081
228524287573 intitial checkin
tz
parents:
diff changeset
  3082
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  3083
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3084
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3085
     #(Menu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3086
        (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3087
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3088
            activeHelpKey: fileNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3089
            label: 'newImage'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3090
            itemValue: doNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3091
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3092
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  3093
            labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3094
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3095
         (MenuItem
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3096
            activeHelpKey: fileGrabImageFromScreen
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3097
            label: 'grabScreenImage'
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3098
            itemValue: grabScreenImage
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3099
            translateLabel: true
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3100
            isButton: true
2877
1a7cd3e6eea1 changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2876
diff changeset
  3101
            labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon)
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3102
          )
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3103
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3104
            label: '-'
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3105
          )
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3106
         (MenuItem
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3107
            activeHelpKey: fileLoadFromClass
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3108
            label: 'loadFromClass'
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3109
            itemValue: doLoadFromClass
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3110
            translateLabel: true
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3111
            isButton: true
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  3112
            isVisible: isStandAlone
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3113
            submenuChannel: menuHistory
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3114
            labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon)
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3115
            keepLinkedMenu: true
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3116
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3117
         (MenuItem
2567
903843f8a824 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2556
diff changeset
  3118
            activeHelpKey: fileSaveMethodAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3119
            enabled: imageIsLoadedHolder
2567
903843f8a824 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2556
diff changeset
  3120
            label: 'fileSaveMethodAs'
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3121
            itemValue: doSaveMethodAs
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3122
            translateLabel: true
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3123
            isButton: true
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  3124
            isVisible: isStandAlone
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3125
            labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon)
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3126
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3127
         (MenuItem
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3128
            activeHelpKey: fileSaveMethod
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3129
            enabled: imageIsLoadedHolder
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3130
            label: 'saveAsMethod'
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3131
            itemValue: doSaveMethod
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3132
            translateLabel: true
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3133
            isButton: true
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  3134
            isVisible: isNotStandAlone
2590
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  3135
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon)
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3136
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3137
         (MenuItem
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3138
            label: '-'
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3139
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3140
         (MenuItem
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3141
            activeHelpKey: fileLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3142
            label: 'loadFromFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3143
            itemValue: doLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3144
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3145
            isButton: true
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  3146
            labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3147
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3148
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3149
            activeHelpKey: fileSaveAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3150
            enabled: imageIsLoadedHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3151
            label: 'saveAsFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3152
            itemValue: doSaveImageFileAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3153
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3154
            isButton: true
1885
a09ede39c43f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1884
diff changeset
  3155
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3156
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3157
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3158
            label: '-'
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3159
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3160
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3161
            activeHelpKey: editUndo
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3162
            enabled: canUndoHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3163
            label: 'Undo'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3164
            itemValue: doUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3165
            translateLabel: true
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3166
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  3167
            labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3168
          )
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3169
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3170
            label: '-'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3171
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3172
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3173
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3174
            activeHelpKey: previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3175
            enabled: imageHasPreviousImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3176
            label: 'Previous Image'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3177
            itemValue: previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3178
            translateLabel: true
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3179
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3180
            labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon)
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3181
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3182
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3183
            activeHelpKey: nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3184
            enabled: imageHasNextImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3185
            label: 'Next Image'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3186
            itemValue: nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3187
            translateLabel: true
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3188
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3189
            labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon)
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3190
          )
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3191
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3192
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3193
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3194
      )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3195
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3196
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3197
modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3198
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3199
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3200
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3201
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3202
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3203
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3204
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3205
     MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3206
     (Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3207
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3208
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3209
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3210
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3211
    ^ 
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3212
     #(Menu
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3213
        (
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3214
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3215
            activeHelpKey: drawModePoint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3216
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3217
            label: 'Point'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3218
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3219
            labelImage: (ResourceRetriever ImageEditor pointIcon 'Point')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3220
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3221
            choiceValue: point
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3222
          )
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3223
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3224
            activeHelpKey: drawModePoint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3225
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3226
            label: 'Spray'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3227
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3228
            labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3229
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3230
            choiceValue: spray
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3231
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3232
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3233
            activeHelpKey: drawModeBox
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3234
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3235
            label: 'Rect'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3236
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3237
            labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3238
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3239
            choiceValue: box
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3240
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3241
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3242
            activeHelpKey: drawModeFilledBox
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3243
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3244
            label: 'Filled Rectangle'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3245
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3246
            labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3247
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3248
            choiceValue: filledBox
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3249
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3250
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3251
            activeHelpKey: drawModeBox
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3252
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3253
            label: 'Circle'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3254
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3255
            labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3256
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3257
            choiceValue: circle
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3258
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3259
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3260
            activeHelpKey: drawModeFill
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3261
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3262
            label: 'Fill'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3263
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3264
            labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3265
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3266
            choiceValue: fill
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3267
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3268
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3269
            activeHelpKey: drawModeCopy
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3270
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3271
            label: 'Copy'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3272
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3273
            labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3274
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3275
            choiceValue: copy
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3276
          )
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3277
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3278
            activeHelpKey: drawModePaste
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3279
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3280
            label: 'Paste'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3281
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3282
            labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3283
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3284
            choiceValue: paste
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3285
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3286
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3287
            activeHelpKey: drawModePasteUnder
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3288
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3289
            label: 'Paste Under'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3290
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3291
            labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3292
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3293
            choiceValue: pasteUnder
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3294
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3295
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3296
            activeHelpKey: drawModePasteWithMask
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3297
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3298
            label: 'Paste with Mask'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3299
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3300
            labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3301
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3302
            choiceValue: pasteWithMask
1579
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  3303
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3304
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3305
            activeHelpKey: drawModeSpecial
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3306
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3307
            label: 'Special'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3308
            translateLabel: true
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3309
            labelImage: (ResourceRetriever ImageEditor specialIcon 'Special')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3310
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3311
            choiceValue: specialOperation
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  3312
          )
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3313
         )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3314
        nil
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3315
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3316
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3317
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3318
    "Modified: / 04-07-2010 / 10:18:08 / cg"
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3319
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3320
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3321
previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3322
    "This resource specification was automatically generated
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3323
     by the MenuEditor of ST/X."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3324
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3325
    "Do not manually edit this!! If it is corrupted,
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3326
     the MenuEditor may not be able to read the specification."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3327
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3328
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3329
     MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3330
     (Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3331
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3332
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3333
    <resource: #menu>
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3334
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3335
    ^ 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3336
     #(Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3337
        (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3338
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3339
            label: 'TileMode'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3340
            translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3341
            indication: tileModeHolder
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3342
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3343
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3344
            label: '-'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3345
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3346
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3347
            label: 'Background Color'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3348
            translateLabel: true
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3349
            submenu: 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3350
           (Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3351
              (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3352
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3353
                  label: 'Gray'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3354
                  translateLabel: true
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3355
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3356
                  choiceValue: nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3357
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3358
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3359
                  label: 'Black'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3360
                  translateLabel: true
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3361
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3362
                  choiceValue: black
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3363
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3364
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3365
                  label: 'White'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3366
                  translateLabel: true
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3367
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3368
                  choiceValue: white
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3369
                )
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3370
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3371
                  label: '-'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3372
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3373
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3374
                  label: 'Red'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3375
                  translateLabel: true
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3376
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3377
                  choiceValue: red
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3378
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3379
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3380
                  label: 'Green'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3381
                  translateLabel: true
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3382
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3383
                  choiceValue: green
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3384
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3385
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3386
                  label: 'Blue'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3387
                  translateLabel: true
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3388
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3389
                  choiceValue: blue
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  3390
                )
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3391
               )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3392
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3393
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3394
            )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3395
          )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3396
         )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3397
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3398
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3399
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3400
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3401
    "Modified: / 04-07-2010 / 10:20:09 / cg"
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3402
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3403
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3404
toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3405
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3406
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3407
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3408
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3409
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3410
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3411
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3412
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3413
     MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3414
     (Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3415
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3416
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3417
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3418
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3419
    ^ 
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3420
     #(Menu
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3421
        (
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3422
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3423
            activeHelpKey: drawModePoint
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3424
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3425
            label: 'Point'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3426
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3427
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3428
            labelImage: (ResourceRetriever ImageEditor pointIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3429
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3430
            choiceValue: point
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3431
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3432
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3433
            activeHelpKey: drawModeSpray
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3434
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3435
            label: 'Spray'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3436
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3437
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3438
            labelImage: (ResourceRetriever ImageEditor sprayIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3439
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3440
            choiceValue: spray
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  3441
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3442
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3443
            activeHelpKey: drawModeBox
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3444
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3445
            label: 'Rect'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3446
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3447
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3448
            labelImage: (ResourceRetriever ImageEditor rectIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3449
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3450
            choiceValue: box
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3451
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3452
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3453
            activeHelpKey: drawModeFilledBox
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3454
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3455
            label: 'FillRect'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3456
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3457
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3458
            labelImage: (ResourceRetriever ImageEditor fillRectIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3459
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3460
            choiceValue: filledBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3461
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3462
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3463
            activeHelpKey: drawModeCircle
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3464
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3465
            label: 'Circle'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3466
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3467
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3468
            labelImage: (ResourceRetriever ImageEditor circleIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3469
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3470
            choiceValue: circle
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  3471
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3472
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3473
            activeHelpKey: drawModeFill
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3474
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3475
            label: 'Fill'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3476
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3477
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3478
            labelImage: (ResourceRetriever ImageEditor fillIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3479
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3480
            choiceValue: fill
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3481
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3482
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3483
            activeHelpKey: drawModeCopy
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3484
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3485
            label: 'Copy'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3486
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3487
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3488
            labelImage: (ResourceRetriever ImageEditor copyIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3489
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3490
            choiceValue: copy
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3491
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3492
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3493
            activeHelpKey: drawModePasteWithMask
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3494
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3495
            label: 'Paste With Mask'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3496
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3497
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3498
            labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3499
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3500
            choiceValue: pasteWithMask
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3501
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3502
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3503
            activeHelpKey: drawModePaste
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3504
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3505
            label: 'Paste'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3506
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3507
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3508
            labelImage: (ResourceRetriever ImageEditor pasteIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3509
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3510
            choiceValue: paste
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3511
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3512
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3513
            activeHelpKey: drawModePasteUnder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3514
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3515
            label: 'Paste Under'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3516
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3517
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3518
            labelImage: (ResourceRetriever ImageEditor pasteUnderIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3519
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3520
            choiceValue: pasteUnder
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3521
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3522
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3523
            activeHelpKey: drawModeSpecial
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3524
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3525
            label: 'Special'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3526
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3527
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3528
            labelImage: (ResourceRetriever ImageEditor specialIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3529
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3530
            choiceValue: specialOperation
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3531
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3532
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3533
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3534
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3535
      )
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3536
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3537
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3538
!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
  3539
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  3540
colorTableColumns
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3541
    "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
  3542
     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
  3543
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3544
    "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
  3545
     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
  3546
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3547
    "
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  3548
     DataSetBuilder new openOnClass:ImageEditor andSelector:#colorTableColumns
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3549
    "
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3550
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3551
    <resource: #tableColumns>
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3552
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3553
    ^#(
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3554
      (DataSetColumnSpec
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  3555
         activeHelpKey: ''
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3556
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3557
         rendererType: rowSelector
2712
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  3558
         backgroundSelector: theColorItself:
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  3559
         selectedBackgroundSelector: theColorItself:
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3560
         isResizeable: false
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3561
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3562
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3563
         label: 'R'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3564
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3565
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3566
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3567
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3568
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3569
         model: redFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3570
         writeSelector: redAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3571
         selectSelector: canSelectRedInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3572
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3573
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3574
         label: 'G'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3575
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3576
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3577
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3578
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3579
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3580
         model: greenFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3581
         writeSelector: greenAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3582
         selectSelector: canSelectGreenInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3583
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3584
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3585
         label: 'B'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3586
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3587
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3588
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3589
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3590
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3591
         model: blueFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3592
         writeSelector: blueAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3593
         selectSelector: canSelectBlueInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3594
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3595
      )
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  3596
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  3597
    "Modified: / 22-07-2007 / 13:21:57 / cg"
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3598
! !
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  3599
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3600
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3601
228524287573 intitial checkin
tz
parents:
diff changeset
  3602
image
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3603
    "returns the current editing image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3604
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3605
    ^ imageEditView image
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3606
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3607
228524287573 intitial checkin
tz
parents:
diff changeset
  3608
postOpenAction: anAction
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3609
   "sets an action which is evaluated after opening"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3610
228524287573 intitial checkin
tz
parents:
diff changeset
  3611
    postOpenAction := anAction
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  3612
!
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  3613
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  3614
resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  3615
    imageEditView resourceClass:aClass
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3616
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3617
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3618
!ImageEditor methodsFor:'accessing-behavior'!
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3619
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3620
allowedToChangeImageDimensionAndDepth
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3621
    "used to edit an existing image's contents only (Expecco)"
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3622
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3623
    ^ allowedToChangeImageDimensionAndDepth ? true
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3624
!
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3625
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3626
allowedToChangeImageDimensionAndDepth:aBoolean
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3627
    "used to edit an existing image's contents only (Expecco)"
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3628
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3629
    allowedToChangeImageDimensionAndDepth := aBoolean
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3630
! !
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3631
1398
284781677ae1 category changes
Claus Gittinger <cg@exept.de>
parents: 1393
diff changeset
  3632
!ImageEditor methodsFor:'accessing-views'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3633
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3634
colorDataSetView
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3635
    "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
  3636
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  3637
    ^(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
  3638
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3639
    "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
  3640
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3641
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  3642
coordLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3643
    "returns the view the coord label"
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  3644
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  3645
    ^self componentAt: #coordLabel
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  3646
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  3647
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3648
imageEditView
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  3649
    "returns the view of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3650
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3651
    imageEditView isNil ifTrue:[
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  3652
        imageEditView := (self componentAt: #imageEditView) scrolledView.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3653
        imageEditView addDependent:self.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3654
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  3655
    ^ imageEditView
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3656
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  3657
    "Modified: / 10.2.2000 / 23:19:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3658
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3659
228524287573 intitial checkin
tz
parents:
diff changeset
  3660
imagePreView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3661
    "returns the preview of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3662
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  3663
    |imagePreViewSubViews|
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  3664
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  3665
    imagePreViewSubViews := (self componentAt: #imagePreView) subViews.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  3666
2043
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  3667
    "subViews is an empty array at closing image Editor"
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  3668
    imagePreViewSubViews isEmptyOrNil ifTrue:[
2043
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  3669
        ^ nil
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  3670
    ].
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  3671
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  3672
    ^ imagePreViewSubViews first 
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  3673
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  3674
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3675
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  3676
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3677
activityInfoHolder
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3678
    ^ self infoLabelHolder
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3679
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3680
    "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
  3681
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3682
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3683
colorColumnAdaptor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3684
    ^ self
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3685
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3686
    "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
  3687
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  3688
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3689
hasClassAndSelectorDefinedHolder
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3690
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  3691
        |cls|
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  3692
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  3693
        (cls := imageEditView resourceClass) notNil
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  3694
        and:[imageEditView resourceSelector notNil]
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3695
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3696
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3697
    "Created: / 04-07-2010 / 10:11:10 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3698
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3699
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3700
hasClassDefinedHolder
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3701
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  3702
        imageEditView resourceClass notNil
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3703
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3704
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3705
    "Created: / 04-07-2010 / 10:11:47 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3706
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3707
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3708
hasColorSelectedHolder
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3709
    ^ [ self selectedColorIndexOrNil notNil ]
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3710
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3711
    "Created: / 04-07-2010 / 10:12:22 / cg"
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  3712
!
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  3713
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3714
hasColormap
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3715
    ^ self image notNil and:[self image colorMap notNil]
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3716
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3717
    "Created: / 30-09-1998 / 23:53:55 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3718
    "Modified: / 04-07-2010 / 10:13:26 / cg"
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3719
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  3720
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  3721
hasColormapAndColorSelected
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3722
    ^ [ self hasColormapHolder value and:[self hasColorSelectedHolder value]]
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3723
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3724
    "Modified: / 04-07-2010 / 10:13:13 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3725
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3726
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3727
hasColormapHolder
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3728
    ^ [self hasColormap]
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3729
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3730
    "Created: / 04-07-2010 / 10:13:05 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3731
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3732
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3733
imageHasImageSequence
3080
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  3734
    |img|
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  3735
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  3736
    ^ (img := self image) notNil and:[img imageSequence notNil]
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3737
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3738
    "Created: / 21-10-2010 / 14:35:45 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3739
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3740
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3741
imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3742
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3743
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3744
    (holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3745
        builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3746
        holder value:(self imageHasImageSequence).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3747
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3748
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3749
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3750
    "Modified: / 21-10-2010 / 14:36:57 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3751
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3752
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3753
imageHasNextImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3754
    ^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3755
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3756
    "Created: / 21-10-2010 / 14:37:10 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3757
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3758
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3759
imageHasNextImageHolder
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3760
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3761
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3762
    (holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3763
        builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3764
        holder value:(self imageHasNextImage).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3765
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3766
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3767
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3768
    "Modified: / 21-10-2010 / 14:37:40 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3769
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3770
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3771
imageHasPreviousImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3772
    ^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3773
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3774
    "Created: / 21-10-2010 / 14:37:21 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3775
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3776
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3777
imageHasPreviousImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3778
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3779
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3780
    (holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3781
        builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3782
        holder value:(self imageHasPreviousImage).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3783
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3784
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3785
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3786
    "Modified: / 21-10-2010 / 14:37:48 / cg"
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3787
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  3788
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3789
imageInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3790
    |holder|
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3791
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3792
    (holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3793
        builder aspectAt:#imageInfoHolder put:(holder :=  '' asValue).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3794
    ].
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3795
    ^ holder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  3796
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3797
    "Modified: / 04-07-2010 / 10:15:14 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3798
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3799
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3800
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3801
    "returns whether an image is loaded as value holder"
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3802
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3803
    ^ [ 
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3804
        self imageIsLoadedHolder value
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3805
        and:[ self allowedToChangeImageDimensionAndDepth ] 
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3806
      ]
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3807
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3808
    "Modified: / 04-07-2010 / 10:15:43 / cg"
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3809
!
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  3810
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3811
imageIsLoadedAndClassDefined
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3812
    "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
  3813
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3814
    ^ [self hasClassAndSelectorDefinedHolder value
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3815
       and:[self imageIsLoadedHolder value]]
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3816
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3817
    "Created: / 31-07-1998 / 02:04:18 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3818
    "Modified: / 04-07-2010 / 10:15:48 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3819
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3820
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3821
imageIsLoadedHolder
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3822
    "returns whether an image is loaded as value holder"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3823
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3824
    |holder|
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3825
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3826
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3827
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3828
    ].
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3829
    ^ holder
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3830
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3831
    "Created: / 04-07-2010 / 10:15:38 / cg"
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3832
!
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  3833
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3834
listOfColors
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3835
    "returns the list of colors"
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3836
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3837
    |list|
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3838
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3839
    (list := builder bindingAt:#listOfColors) isNil ifTrue:[
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3840
        builder aspectAt:#listOfColors put:(list :=  List new).
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3841
        list addDependent:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3842
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3843
    ^ list
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3844
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3845
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3846
magnificationHolder
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3847
    "returns current magnification of the image as an AspectAdaptor"
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3848
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3849
    |holder|
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3850
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3851
        builder aspectAt:#valueOfMagnification put:(
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3852
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3853
    ].
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3854
    ^ holder
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3855
!
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3856
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3857
penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3858
    |holder|
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3859
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3860
    (holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3861
        builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue).
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3862
        holder onChangeSend:#penWidthHolderChanged to:self.
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3863
    ].
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3864
    ^ holder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3865
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3866
    "Created: / 15-02-2012 / 22:30:58 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3867
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3868
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3869
previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3870
    |holder|
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3871
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3872
    (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
  3873
        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
  3874
        holder addDependent:self.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3875
    ].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3876
    ^ holder
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3877
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3878
    "Created: / 04-07-2010 / 10:19:34 / cg"
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3879
!
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3880
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3881
selectionOfColor
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3882
    "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
  3883
     Here, an AspectAdaptor which accesses selectedColorIndex is returned."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3884
228524287573 intitial checkin
tz
parents:
diff changeset
  3885
    |holder|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3886
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3887
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  3888
        builder aspectAt:#selectionOfColor put:(
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  3889
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3890
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  3891
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  3892
!
228524287573 intitial checkin
tz
parents:
diff changeset
  3893
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3894
spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3895
    |holder|
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3896
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3897
    (holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3898
        builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue).
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3899
        holder onChangeSend:#spraySpotHolderChanged to:self.
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3900
    ].
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3901
    ^ holder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3902
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3903
    "Created: / 15-02-2012 / 22:36:38 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3904
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3905
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3906
tileModeHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3907
    |holder|
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3908
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3909
    (holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3910
        builder aspectAt:#tileModeHolder put:(holder := false asValue).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3911
        holder addDependent:self.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3912
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3913
    ^ holder
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3914
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3915
    "Modified: / 21-10-2010 / 14:35:24 / cg"
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3916
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3917
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3918
valueOfMagnification
2308
60722577a10a Mark obsolete methods
Stefan Vogel <sv@exept.de>
parents: 2272
diff changeset
  3919
    <resource: #obsolete>
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3920
    "returns current magnification of the image as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3921
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3922
    self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'.
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3923
    ^ self magnificationHolder
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3924
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  3925
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3926
!ImageEditor methodsFor:'change & update'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3927
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3928
findColorMapMode
899
43b744c647ba comment grammar
tz
parents: 898
diff changeset
  3929
    "finds the colorMapMode for a new image"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3930
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3931
    |image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors|
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3932
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3933
    image := self image.
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  3934
    image isNil ifTrue:[^ self ].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3935
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3936
    image mask notNil ifTrue: [             
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3937
        colorMapModeKey := 'masked'.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3938
    ] ifFalse:[
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3939
        colorMapModeKey := 'depth'.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  3940
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  3941
    colorMapModeKey := colorMapModeKey , image depth printString.
1967
c95484b7da49 some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1966
diff changeset
  3942
    self colorMapMode setValue:colorMapModeKey.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3943
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  3944
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3945
    image depth > 12 ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  3946
        newListOfColors := OrderedCollection new.
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  3947
        (image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[
1927
c5068006116d colors of deep images
Claus Gittinger <cg@exept.de>
parents: 1926
diff changeset
  3948
            someOrAllUsedColors := image usedColorsMax:10000.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3949
            someOrAllUsedColors notNil ifTrue:[
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3950
                someOrAllUsedColors := someOrAllUsedColors asArray.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3951
                someOrAllUsedColors sort:self sortBlockForColors.
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3952
                newListOfColors addAll:someOrAllUsedColors.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3953
                "/ listOfColors add:Color black; add:Color white.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3954
            ]
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  3955
        ] ifFalse:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3956
            newListOfColors addAll:(image colorMap).
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3957
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3958
    ] ifFalse:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  3959
        newListOfColors := OrderedCollection withAll:(self listOfColors).
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3960
        newListOfColors isEmpty ifTrue:[   
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3961
            self colorMapMode: colorMapMode value.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3962
            image := self image.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  3963
        ].                               
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3964
    ].  
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3965
    newListOfColors notEmptyOrNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3966
        drawColor1 := newListOfColors at:1.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3967
        drawColor2 := newListOfColors at:2 ifAbsent:drawColor1.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3968
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3969
        self hasMask ifTrue: [             
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3970
            (newListOfColors contains: [:clr| clr = (Color colorId:0)]) 
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3971
            ifFalse:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3972
                newListOfColors addFirst:(Color colorId:0).
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3973
                drawColor1 := newListOfColors at:2. 
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3974
                drawColor2 := newListOfColors at:3 ifAbsent:drawColor1.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3975
            ]
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  3976
        ].
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3977
"/        imageEditView drawingColors:(Array with: drawColor1 with: drawColor2).
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3978
"/        self selectionOfColor 
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3979
"/            setValue: 0;
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  3980
"/            value: (listOfColors indexOf: imageEditView selectedColor).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3981
    ].
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  3982
    self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  3983
        self listOfColors contents:newListOfColors.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  3984
    ].
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  3985
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  3986
    "Modified: / 18-01-2012 / 13:58:38 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3987
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  3988
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  3989
update:something with:aParameter from:changedObject
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  3990
    |clrIndex img imagePreView clr changedColor|
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3991
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  3992
    img := self image.
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  3993
    imagePreView := self imagePreView.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3994
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  3995
    changedObject == self tileModeHolder ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  3996
        imagePreView 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3997
            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
  3998
            clear; 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  3999
            invalidate.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4000
        ^ self
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4001
    ].
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4002
    changedObject == self previewBackgroundColorHolder ifTrue:[
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4003
        clr := changedObject value isNil 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4004
                    ifTrue:[imageEditView viewBackground]
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4005
                    ifFalse:[Color perform:changedObject value].
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  4006
        imagePreView 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4007
            viewBackground:clr;
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4008
            clear; 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4009
            invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4010
        ^ self
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4011
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4012
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4013
    changedObject == self listOfColors ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4014
        something == #at: ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4015
            "/ colormap entry changed at aParameter
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4016
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4017
            clrIndex := aParameter.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4018
            (self hasMask) ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4019
                clrIndex := clrIndex - 1.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4020
            ].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4021
            changedColor := changedObject at:aParameter.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4022
            img colorMap notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4023
                img colorMap at:clrIndex put:changedColor.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4024
                self colorMapChanged.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4025
            ] ifFalse:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4026
                drawingColormap notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4027
                    drawingColormap at:clrIndex put:changedColor.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4028
                ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4029
            ].
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4030
            ^ self
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4031
        ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4032
        ^ self
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4033
    ].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4034
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4035
    changedObject == imageEditView undoImages ifTrue:[
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  4036
        self canUndoHolder value:(changedObject notEmpty).
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4037
        ^ self.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4038
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  4039
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4040
    changedObject == imageEditView ifTrue:[
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4041
        something == #imageColors ifTrue:[
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4042
            self updateListOfColorsAndColormapMode.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4043
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4044
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4045
        something == #image ifTrue:[
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4046
            self updateAfterImageChange.
2728
7b0f0d920794 changed:
Claus Gittinger <cg@exept.de>
parents: 2718
diff changeset
  4047
            imagePreView image:img scroll:false.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4048
            self updateListOfColorsAndColormapMode.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4049
            self tileModeHolder value ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  4050
                imagePreView tileMode:true tileOffset:(img extent).
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4051
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4052
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4053
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4054
        something == #subImageIn ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  4055
            imagePreView image ~~ img ifTrue:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  4056
                self error:'internal error' mayProceed:true.
1406
6de5c78f5bcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  4057
            ].
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4058
            self tileModeHolder value ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  4059
                imagePreView invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4060
            ] ifFalse:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  4061
                imagePreView invalidate:aParameter.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4062
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4063
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4064
        ].
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  4065
        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
  4066
            (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
  4067
                "/ no color/mask */
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4068
                "/ self halt.
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4069
                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
  4070
            ] ifFalse:[
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4071
                clrIndex := self listOfColors indexOf:aParameter.
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  4072
            ].
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  4073
            self selectionOfColor value:clrIndex.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  4074
            ^ self.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  4075
        ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4076
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4077
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4078
1880
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  4079
    changedObject == imageEditView modifiedHolder ifTrue:[
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  4080
        "/ self halt:'to be implemented'.
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  4081
        ^ self
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  4082
    ].
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  4083
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4084
    changedObject == imageEditView image ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  4085
        "/ self halt:'to be implemented'.
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4086
        self updateAfterImageChange.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4087
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4088
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4089
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4090
    super update:something with:aParameter from:changedObject
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4091
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4092
    "Modified: / 21-10-2010 / 14:34:31 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4093
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4094
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4095
updateAfterImageChange
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4096
    |img|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4097
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4098
    (img := self image) notNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4099
        img := img onDevice:device.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4100
        self updateColorsFromImage:img.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4101
        self findColorMapMode.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4102
        self updateLabelsAndHistory.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4103
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4104
        imageSeqNr isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4105
            imageSeqNr := 1
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4106
        ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4107
        self imageHasImageSequenceHolder value:(self imageHasImageSequence).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4108
        self imageHasNextImageHolder value:(self imageHasNextImage).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4109
        self imageHasPreviousImageHolder value:(self imageHasPreviousImage).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4110
    ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4111
        self updateForNoImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4112
    ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4113
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4114
    "Modified: / 21-10-2010 / 14:40:45 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4115
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4116
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4117
updateColorsFromImage:image
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4118
    |colors|
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4119
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4120
    image depth > 16 ifTrue:[
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4121
        self listOfColors contents:#().
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4122
        ^ self.
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4123
    ].
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4124
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  4125
    colors := image colorMap.
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  4126
    colors isNil ifTrue:[
1906
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  4127
        Error handle:[:ex |
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  4128
            colors := OrderedCollection new.
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  4129
        ] do:[
2d7a21c00135 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1905
diff changeset
  4130
            colors := image usedColors asSet.
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4131
        ].
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4132
    ].
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  4133
    self listOfColors contents:(colors asOrderedCollection).
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4134
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  4135
    "Modified: / 18-01-2012 / 13:57:43 / cg"
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4136
!
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4137
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4138
updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4139
    "updates channels and view, if image is loaded"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4140
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4141
    self imageIsLoadedHolder value: false.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4142
    self listOfColors removeAll.
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4143
    self imagePreView image: nil.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4144
    self imageHasImageSequenceHolder value:false.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4145
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4146
    "Modified: / 21-10-2010 / 14:39:13 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4147
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4148
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4149
updateLabelsAndHistory
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4150
    "updates labels and history, if something has changed"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4151
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  4152
    |image|
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  4153
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  4154
    image := self image.
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  4155
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4156
    self imageIsLoadedHolder value: image notNil.
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  4157
    image isNil ifTrue: [^nil].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4158
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4159
    self updateInfoLabel.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4160
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4161
    imageEditView resourceClass notNil ifTrue:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4162
        imageEditView resourceSelector notNil ifTrue:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4163
            self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4164
        ]
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4165
    ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4166
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4167
    image fileName notNil ifTrue: [
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4168
        self addHistoryEntryForFile:image fileName.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4169
    ].
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4170
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4171
    "Modified: / 04-07-2010 / 10:16:02 / cg"
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4172
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4173
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4174
updateListOfColorsAndColormapMode
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  4175
    |selectedColor colorMap image|
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  4176
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  4177
    selectedColor := self selectedColorOrNil.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4178
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4179
    image := self image.
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4180
    image isNil ifTrue:[
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4181
        self listOfColors removeAll.
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4182
    ] ifFalse:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4183
        colorMap := image colorMap.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4184
        colorMap notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4185
            (colorMap size <= 4096) ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4186
                image mask notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4187
                    colorMap := (Array with:(Color noColor)),colorMap.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4188
                ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4189
                self listOfColors contents:colorMap.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4190
            ] ifFalse:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4191
                self listOfColors removeAll.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4192
                colorMap isFixedPalette ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4193
                    image colorMap:nil.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4194
                    image photometric:#rgb.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4195
                    image samplesPerPixel:3.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4196
                    
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4197
                    image bitsPerSample:(Array 
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4198
                                            with:(colorMap bitsRed)
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4199
                                            with:(colorMap bitsGreen)
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4200
                                            with:(colorMap bitsBlue)).
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4201
                ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4202
            ]
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4203
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4204
    ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4205
    self findColorMapMode.
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  4206
    selectedColor notNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  4207
        self selectColor:selectedColor.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  4208
    ].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4209
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4210
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4211
!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
  4212
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  4213
atColor:anOldColor put:newColor
1952
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  4214
    "a color changed to a new color"
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  4215
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4216
    |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
  4217
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4218
    list  := self listOfColors.
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  4219
    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
  4220
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4221
    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
  4222
    index ~~ 0 ifTrue:[
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4223
        oldColor := list at:index.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4224
        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
  4225
    ] ifFalse:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  4226
        self error:'internal error' mayProceed:true.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4227
        list add:newColor
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4228
    ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4229
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4230
    image := self image.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4231
    (image colorMap isNil 
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4232
    and:[drawingColormap isNil]) ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4233
        oldColor notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4234
            imageEditView makeUndo.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4235
            newImage := image copy.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4236
            newImage
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4237
                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
  4238
                do:[:x :y :clr |
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4239
                    |newClr|
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4240
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  4241
                    newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4242
                    newImage colorAtX:x y:y put:newClr
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4243
                ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4244
            imageEditView image:newImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4245
            imageEditView setModified.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4246
            self updateImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4247
            self updateImagePreView.
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4248
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4249
            self selectionOfColor value:oldSel.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4250
            imageEditView selectedColorIndex:oldSel.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  4251
            imageEditView selectedColor:(self listOfColors at:oldSel).
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  4252
        ]
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4253
    ].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4254
!
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4255
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4256
blueAtColor:aColor put:newBlue
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4257
    "helper used to return a new row element, when blue is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4258
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4259
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4260
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4261
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4262
    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
  4263
    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
  4264
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4265
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4266
             put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4267
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4268
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4269
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
  4270
    "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
  4271
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4272
    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
  4273
    ^ 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
  4274
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4275
    "Created: / 26.7.1998 / 12:30:35 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4276
    "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
  4277
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4278
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4279
canSelectBlueInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4280
    ^ aColor blueByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4281
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4282
    "Created: / 7.8.1998 / 22:50:34 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4283
    "Modified: / 7.8.1998 / 22:52:57 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4284
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4285
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4286
canSelectGreenInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4287
    ^ aColor greenByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4288
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4289
    "Created: / 7.8.1998 / 22:50:22 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4290
    "Modified: / 7.8.1998 / 22:52:46 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4291
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4292
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4293
canSelectRedInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4294
    ^ aColor redByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4295
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4296
    "Created: / 7.8.1998 / 22:50:00 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4297
    "Modified: / 7.8.1998 / 22:51:03 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4298
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  4299
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4300
greenAtColor:aColor put:newGreen
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4301
    "helper used to return a new row element, when green is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4302
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4303
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4304
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4305
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4306
    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
  4307
    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
  4308
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4309
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4310
             put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4311
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4312
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4313
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
  4314
    "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
  4315
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4316
    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
  4317
    ^ 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
  4318
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4319
    "Created: / 26.7.1998 / 12:30:29 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4320
    "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
  4321
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4322
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4323
redAtColor:aColor put:newRed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4324
    "helper used to return a new row element, when red is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4325
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4326
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4327
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4328
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4329
    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
  4330
    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
  4331
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4332
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  4333
             put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4334
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  4335
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4336
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
  4337
    "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
  4338
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4339
    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
  4340
    ^ 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
  4341
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  4342
    "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
  4343
!
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  4344
2712
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  4345
theColorItself:aColor
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  4346
    "an accessor for the table-column"
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  4347
1449
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  4348
    ^ 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
  4349
! !
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4350
2663
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  4351
!ImageEditor methodsFor:'defaults'!
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  4352
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  4353
aboutIcon
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  4354
    ^ self class defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  4355
! !
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  4356
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4357
!ImageEditor methodsFor:'drag & drop'!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4358
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4359
canDropObjects:aCollectionOfDropObjects in:aWidget
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4360
    ^ (aCollectionOfDropObjects size == 1) 
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4361
      and:[ aCollectionOfDropObjects 
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4362
                contains:[:dropObject | dropObject isFileObject]]
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4363
!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4364
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4365
dropObjects:aCollectionOfDropObjects in:aWidget at:position
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4366
    |dropObject|
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4367
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4368
    dropObject := aCollectionOfDropObjects first.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4369
    dropObject isFileObject ifTrue:[
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4370
        self loadFromFile:dropObject asFilename.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4371
    ]
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4372
! !
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4373
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4374
!ImageEditor methodsFor:'event handling'!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4375
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4376
processEvent:anEvent
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4377
    "Return true, if I have eaten the event"
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4378
2945
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  4379
    <resource: #keyboard (#Paste #Copy )>
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  4380
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4381
    |view focusView p transformation|
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4382
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4383
    view := anEvent view.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4384
    view notNil ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4385
        view == self imagePreView ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4386
            ((anEvent isButtonPressEvent and:[ anEvent button == 1 ])
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4387
            or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]])  ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4388
                p := anEvent x @ anEvent y.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4389
                (transformation := view transformation) notNil ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4390
                    p := transformation applyInverseTo:p.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4391
                ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4392
                self imageEditView scrollToMakeVisible:p.    
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4393
                ^ true.
2546
b69247f503b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2539
diff changeset
  4394
            ].
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4395
        ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4396
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4397
        anEvent isKeyPressEvent ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4398
            focusView := view windowGroup focusView ? view.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4399
            (focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4400
                anEvent key == #Paste ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4401
                    self pasteColorIntoColormap.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4402
                    ^ true.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4403
                ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4404
                anEvent key == #Copy ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4405
                    self copyColorFromColormap.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4406
                    ^ true.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4407
                ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4408
            ].
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4409
        ].
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4410
    ].
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4411
    ^ false.
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4412
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  4413
    "Modified: / 04-04-2011 / 13:50:09 / cg"
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4414
! !
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4415
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  4416
!ImageEditor methodsFor:'help'!
738210a2fa06 revised version
tz
parents: 651
diff changeset
  4417
738210a2fa06 revised version
tz
parents: 651
diff changeset
  4418
defaultInfoLabel
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  4419
    "returns the text shown in the info label, when the mouse is NOT over
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  4420
     some widget with a help text."
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  4421
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4422
    |resourceClass resourceSelector|
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4423
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4424
    resourceClass := imageEditView resourceClass.
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4425
    resourceClass notNil ifTrue:[
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  4426
        resourceSelector := imageEditView resourceSelector.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4427
        resourceSelector notNil ifTrue:[
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  4428
            ^ resourceClass name, ' >> ', resourceSelector
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4429
        ].
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  4430
    ].
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4431
    ^ 'No class and selector defined.'
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  4432
!
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  4433
702
c9de7a9bc416 docu call changed
tz
parents: 694
diff changeset
  4434
openDocumentation
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4435
    "opens the documentation file of the Image Editor"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  4436
763
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  4437
    self openHTMLDocument: 'tools/uipainter/ImageEditor.html'
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  4438
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  4439
! !
738210a2fa06 revised version
tz
parents: 651
diff changeset
  4440
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4441
!ImageEditor methodsFor:'loading'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4442
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4443
loadFromClass:aClass andSelector:aSelector
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4444
    "loads an image from the method specified by class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4445
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4446
    self assert:(aClass isNil or:[aClass isClass]).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4447
2932
7f305ee14e98 changed: #loadFromClass:andSelector:
Claus Gittinger <cg@exept.de>
parents: 2893
diff changeset
  4448
    (aClass isNil or:[aSelector isNil]) ifTrue:[
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4449
        imageEditView resourceClass:aClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4450
        imageEditView resourceSelector:aSelector.
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  4451
        imageEditView image:nil.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4452
        self clearModified.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4453
        ^ self.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4454
    ].
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4455
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4456
"/    (imageEditView resourceClass == aClass
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4457
"/    and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4458
"/        imageEditView modified ifFalse:[
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4459
"/            ^ self.
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4460
"/        ].
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4461
"/    ].
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  4462
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4463
    (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4464
        self updateAfterImageChange.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4465
        self clearModified.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4466
    ]
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4467
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4468
    "Modified: / 16.3.1999 / 21:44:41 / cg"
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4469
!
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4470
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4471
loadFromFile:aFileName
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4472
    "loads an image from aFileName and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4473
980
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  4474
    self withCursor:Cursor wait do:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  4475
        (imageEditView loadFromFile: aFileName) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4476
            self updateAfterImageChange
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4477
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4478
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4479
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4480
    "Modified: / 16.3.1999 / 21:44:26 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4481
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4482
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4483
loadFromImage:anImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4484
    "loads an image from anImage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4485
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4486
    |img|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4487
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4488
    anImage notNil ifTrue:[    
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4489
        img := anImage onDevice:device.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4490
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4491
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4492
    imageEditView image:img.
1799
e605f0af928a clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents: 1796
diff changeset
  4493
    imageEditView clearModified.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4494
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4495
    self updateAfterImageChange.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4496
"/    img notNil ifTrue:[    
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4497
"/        self updateColorsFromImage:img.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4498
"/        self findColorMapMode.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4499
"/        self updateLabelsAndHistory.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4500
"/    ] ifFalse:[
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4501
"/        self updateForNoImage
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  4502
"/    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4503
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4504
    "Modified: / 16.3.1999 / 21:43:56 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4505
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4506
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4507
loadFromOrPrepareForClass: aClass andSelector: aSelector
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4508
    "loads an image by evaluating aMessage;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4509
     if no image could extract from aMessage; do set the class and the selector from 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4510
     the aMessage for a saving at the end of editing"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4511
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4512
    (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4513
        self updateColorsFromImage:self image.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4514
        self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4515
    ] ifFalse: [
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4516
        imageEditView resourceClass: aClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4517
        imageEditView resourceSelector:aSelector.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4518
    ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4519
    self updateLabelsAndHistory.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4520
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4521
    "Modified: / 16.3.1999 / 21:45:07 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4522
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4523
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4524
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  4525
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4526
colorMapMode
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4527
    "returns the colorMapMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4528
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4529
    colorMapMode isNil ifTrue: [colorMapMode := '' asValue].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4530
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4531
    ^colorMapMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4532
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4533
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4534
editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4535
    "returns editMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4536
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4537
    editMode isNil ifTrue: [
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4538
        editMode := #point asValue.
1329
a38c2e29d1fb use onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
  4539
        editMode onChangeEvaluate:[imageEditView editMode:(editMode value)]
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4540
    ].
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4541
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4542
    ^editMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4543
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4544
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4545
mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4546
    "returns mouseKeyColorMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4547
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4548
    mouseKeyColorMode isNil ifTrue:[
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4549
        mouseKeyColorMode := 1 asValue.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4550
        mouseKeyColorMode onChangeEvaluate: [
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4551
            imageEditView mouseKeyColorMode:mouseKeyColorMode value. 
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4552
            self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor).
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4553
        ]
956
dc4df8952e82 check whether imageEditView is nil
ca
parents: 951
diff changeset
  4554
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4555
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  4556
    ^mouseKeyColorMode
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4557
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4558
    "Modified: / 10.2.2000 / 23:16:42 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4559
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4560
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4561
!ImageEditor methodsFor:'private'!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4562
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4563
checkModified
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4564
    imageEditView modified value ifTrue:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4565
        (Dialog
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4566
            confirm:(resources string:'Image was not saved. Proceed anyway ?')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4567
            yesLabel:(resources string:'Proceed')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4568
            noLabel:(resources string:'Cancel')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4569
            initialAnswer:false
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4570
        ) ifFalse: [^false].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4571
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4572
        imageEditView clearModified.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4573
    ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4574
    ^ true
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4575
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4576
    "Modified: / 29.7.1998 / 18:55:24 / cg"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4577
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4578
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4579
pointFromString:aString
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4580
    |p s x y|
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4581
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4582
    p := Object readFromString:aString onError:nil.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  4583
    p isPoint ifTrue:[^ p].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4584
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4585
    s := aString readStream.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4586
    x := Number readFrom:s onError:nil.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4587
    x notNil ifTrue:[
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4588
        s skipSeparators.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  4589
        [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
  4590
        y := Number readFrom:s onError:nil.
1961
d9082e597adb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1960
diff changeset
  4591
        ^ x @ (y ? x)
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4592
    ].
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  4593
    ^ nil
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4594
!
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  4595
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4596
sortBlockForColors
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4597
    ^ [:a :b |
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4598
            a redByte == b redByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4599
                a greenByte == b greenByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4600
                    a blueByte < b blueByte
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4601
                ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4602
                    a greenByte < b greenByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4603
                ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4604
            ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4605
                a redByte < b redByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4606
            ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4607
      ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4608
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  4609
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4610
updateImage
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4611
    |img|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4612
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4613
    img := imageEditView image.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4614
    imageEditView image:img.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4615
    self fetchImageData.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4616
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  4617
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4618
updateImagePreView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4619
    self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4620
        self imagePreView tileMode:true tileOffset:(self image extent).
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4621
    ].
2546
b69247f503b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2539
diff changeset
  4622
    self imagePreView setImage:(self image) scroll:false invalidate:true.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4623
! !
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4624
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  4625
!ImageEditor methodsFor:'queries'!
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  4626
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  4627
hasLastGrabScreenArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  4628
    ^ [ lastGrabbedScreenArea notNil ]
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  4629
!
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  4630
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4631
hasMask
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4632
    ^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask']
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4633
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4634
    "Created: / 18.8.1998 / 17:17:38 / cg"
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4635
!
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  4636
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4637
modified
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4638
    ^ imageEditView modified
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4639
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4640
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4641
modified:aBoolean
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4642
    super modified:aBoolean.
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4643
    imageEditView modified:aBoolean
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4644
!
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  4645
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  4646
preferredExtent
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4647
    "returns the preferred extent"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  4648
2423
0c5ac1daf0e4 changed #preferredExtent - formating
Stefan Vogel <sv@exept.de>
parents: 2420
diff changeset
  4649
    ^ super preferredExtent max: (Screen current width//3)@(Screen current height//3.5)
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  4650
! !
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  4651
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4652
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  4653
228524287573 intitial checkin
tz
parents:
diff changeset
  4654
magnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4655
    "returns the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4656
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4657
    self imageEditView isNil ifTrue: [^1].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4658
    ^imageEditView magnification x
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4659
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4660
228524287573 intitial checkin
tz
parents:
diff changeset
  4661
magnification: aValue
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4662
    "sets the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4663
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  4664
    |magnification|        
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  4665
    magnification := (aValue ? 1) asPoint.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4666
    (magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  4667
    imageEditView magnification: magnification
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4668
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4669
228524287573 intitial checkin
tz
parents:
diff changeset
  4670
selectedColorIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4671
    "returns the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4672
228524287573 intitial checkin
tz
parents:
diff changeset
  4673
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  4674
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4675
228524287573 intitial checkin
tz
parents:
diff changeset
  4676
selectedColorIndex: anIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4677
    "sets the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4678
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4679
    |clr pixel|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4680
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4681
    selectedColorIndex := anIndex.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  4682
    anIndex isNil ifTrue:[^ self].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4683
    clr := self listOfColors at:anIndex ifAbsent:nil.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4684
    clr isNil ifTrue:[^ self].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4685
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  4686
    pixel := anIndex - 1.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4687
    (self listOfColors at:1) = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4688
        anIndex == 1 ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4689
            pixel := nil.       "/ mask
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4690
        ] ifFalse:[
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  4691
            pixel := pixel - 1
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4692
        ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4693
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4694
    imageEditView selectedColorIndex:pixel.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4695
    imageEditView selectedColor:clr.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4696
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4697
1716
5ae373f6fef0 method category rename
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
  4698
!ImageEditor methodsFor:'startup & release'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4699
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4700
closeDownViews
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4701
    builder notNil ifTrue:[
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4702
        DefaultRelativeSizes :=
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4703
            Array 
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  4704
                with:(builder componentAt:#mainPanel) relativeCorners    
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4705
                with:(builder componentAt:#verticalPanel) relativeCorners.
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4706
    ].
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4707
    super closeDownViews
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4708
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4709
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4710
closeRequest
2016
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  4711
    "asks for permission before closing"
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  4712
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  4713
    imageEditView checkModified ifTrue:[
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  4714
        super closeRequest
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  4715
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4716
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4717
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4718
commonPostBuild
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4719
    imageEditView undoImages addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4720
    imageEditView imageInfoHolder:(self imageInfoHolder).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4721
    imageEditView activityInfoHolder:(self activityInfoHolder).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4722
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4723
    imageEditView clickInfoCallBack:[:button :point | 
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4724
                        |mouseButtonColorToolBar|
3170
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  4725
                        button <= 2 ifTrue:[
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  4726
                            mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar.
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  4727
                            (mouseButtonColorToolBar itemAt:button) toggleIndication.
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  4728
                            mouseButtonColorToolBar do: [:i| i updateIndicators].
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  4729
                        ].
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4730
                  ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4731
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4732
    imageEditView addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4733
    imageEditView modifiedHolder addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4734
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4735
    DefaultRelativeSizes notNil ifTrue:[
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  4736
        (builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first.
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4737
        (builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second.
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4738
    ].
1995
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  4739
1996
d18588052ade infoHolder handling
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
  4740
    "/ using masters infoHolder ?
d18588052ade infoHolder handling
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
  4741
    (builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  4742
        (builder componentAt:#mainPanel) layout bottomOffset:0.
1995
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  4743
        (builder componentAt:#infoBarSubSpec) beInvisible
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  4744
    ]
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4745
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  4746
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4747
open
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4748
    "after opening, sets the masterApplication of the imageEditView to self"
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4749
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4750
    super open.
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4751
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4752
    imageEditView := (self componentAt: #imageEditView) subViews first.
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4753
!
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  4754
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4755
postOpenWith:aBuilder
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4756
    "after opening, sets the masterApplication of the imageEditView to self;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4757
     evaluate the postOpenAction"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4758
1921
699dca2ebb51 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1916
diff changeset
  4759
    postOpenAction value.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4760
1250
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  4761
    super postOpenWith:aBuilder.
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  4762
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  4763
    aBuilder keyboardProcessor menuBar:nil.
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4764
    self windowGroup addPreEventHook:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4765
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4766
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  4767
!ImageEditor methodsFor:'user actions-colormap'!
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  4768
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4769
addColorToColormap
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4770
    self addColorToColormap:(Color black)
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4771
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4772
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4773
addColorToColormap:newColor
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4774
    |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
  4775
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4776
    img := self image.
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  4777
    img isNil ifTrue:[
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  4778
        self warn:'No Image.'.
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  4779
        ^ self
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  4780
    ].
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  4781
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4782
    depth := img depth.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4783
    cMap := img colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4784
    cMap isNil ifTrue:[
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4785
        drawingColormap isNil ifTrue:[
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  4786
            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
  4787
            drawingColormap := OrderedCollection new.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4788
        ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4789
        drawingColormap add:newColor.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4790
        self listOfColors contents:drawingColormap.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4791
        self selectionOfColor value:(drawingColormap size).
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4792
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4793
        "/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4794
        ^ self
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4795
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4796
1583
c21cb650b2a0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1579
diff changeset
  4797
    ("(depth == 1)" false
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4798
    or:[cMap size == (1 bitShift:depth)]) ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4799
        depth >= 8 ifTrue:[
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4800
            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
  4801
            ^ self
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4802
        ].
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  4803
        (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
  4804
        ifFalse:[
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4805
            ^ self
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4806
        ].
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4807
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4808
        imageEditView makeUndo.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4809
        img mask notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4810
            newMode := 'masked' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4811
        ] ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4812
            newMode := 'depth' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  4813
        ].
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4814
        self colorMapMode:newMode.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4815
    ] ifFalse:[
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4816
        imageEditView makeUndo.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4817
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4818
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4819
    cMap := cMap asArray.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4820
    listOfColors := self listOfColors.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4821
    oldCListSize := listOfColors size.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4822
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  4823
    newColorMap := cMap copyWith:newColor.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4824
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4825
    newImage := img species new
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4826
                    width:img width
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4827
                    height:img height
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4828
                    depth:depth
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4829
                    fromArray:img bits.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4830
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4831
    newImage colorMap:newColorMap.  
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4832
    newImage fileName:img fileName.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4833
    newImage mask:(img mask copy).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4834
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4835
    (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
  4836
        listOfColors contents: newImage colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4837
        self findColorMapMode.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4838
        "/ 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
  4839
        listOfColors size > (oldCListSize + 1) ifTrue:[
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4840
            listOfColors removeLast
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4841
        ].
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  4842
        self selectionOfColor value:(listOfColors size).
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4843
        self updateLabelsAndHistory.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4844
    ]
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4845
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4846
    "Created: / 12.3.1999 / 00:20:28 / cg"
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  4847
    "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
  4848
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  4849
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4850
changeHLS
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4851
    "interactive Hue/Light/Saturation editing"
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4852
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4853
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4854
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4855
     originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4856
     anyChange |
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4857
1741
5f515a0c10c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  4858
    "/ compute the averageColor in the background (while asking user)
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4859
    avgColorHolder := nil asValue.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4860
    previewImageHolder := nil asValue.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4861
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4862
    readySema := Semaphore new.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4863
    [
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4864
        |image|
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4865
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4866
        image := imageEditView image.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4867
        originalColormap := image colorMap copy.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4868
        originalPixels := image bits.
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4869
        avgColor := image averageColor.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4870
        avgColorHolder value:avgColor.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4871
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4872
        previewImage := self image magnifiedPreservingRatioTo:100@100.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4873
        previewImageHolder value: previewImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4874
        originalPreviewColormap := previewImage colorMap copy.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4875
        originalPreviewPixels := previewImage bits.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4876
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4877
        readySema signal.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4878
    ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4879
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4880
    acceptChannel := TriggerValue new.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4881
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4882
    firstChange := true.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4883
    anyChange := false.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4884
1651
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  4885
    shiftedColor := [:clr :hShift :lFactor :sFactor |
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  4886
                        Color 
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  4887
                                hue:((clr hue) ? 0 + hShift) 
3172
5eed004ed60b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3170
diff changeset
  4888
                                light:((clr light * lFactor / 100) min:100)
5eed004ed60b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3170
diff changeset
  4889
                                saturation:((clr saturation * sFactor / 100) min:100)].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4890
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4891
    shiftAction := 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4892
        [
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4893
            |hShift lFactor sFactor|
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4894
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4895
            acceptChannel value:true.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4896
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4897
            firstChange ifTrue:[
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4898
                imageEditView makeUndo.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4899
                firstChange := false.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4900
                anyChange := true.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4901
            ].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4902
            readySema notNil ifTrue:[readySema wait. readySema := nil].
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4903
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4904
            hShift := hueShift value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4905
            lFactor := lightValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4906
            sFactor := saturationValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4907
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4908
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4909
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4910
            previewImage
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4911
                colorMap:originalPreviewColormap copy;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4912
                bits:originalPreviewPixels copy;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4913
                release;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4914
                colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4915
            previewImageHolder value:nil; value:previewImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4916
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4917
            shiftProcess notNil ifTrue:[
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4918
                shiftProcess terminate.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4919
                shiftProcess waitUntilTerminated.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4920
                shiftProcess := nil.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4921
            ].
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4922
            shiftProcess := 
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4923
                [
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4924
                    [
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  4925
                        imageEditView image 
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  4926
                            colorMap:originalColormap copy;
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4927
                            bits:originalPixels copy;
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4928
                            release;
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  4929
                            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
  4930
                        self updateImage.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4931
                        self updateInfoLabel.
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4932
                        self updateImagePreView.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4933
                    ] ensure:[ shiftProcess := nil ].    
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4934
                ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4935
        ].
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4936
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4937
    bindings := IdentityDictionary new.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4938
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  4939
    hueShift onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4940
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4941
    bindings at:#lightAmount put:(lightValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  4942
    lightValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4943
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4944
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  4945
    saturationValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4946
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4947
    bindings at:#acceptChannel put:acceptChannel.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  4948
    bindings at:#hlsColor put:avgColorHolder.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4949
    bindings at:#previewImageHolder put:previewImageHolder.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4950
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  4951
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4952
    ifFalse:[ 
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4953
        anyChange ifTrue:[
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4954
            imageEditView undo
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4955
        ]
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4956
    ].
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4957
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4958
    (p := shiftProcess) notNil ifTrue:[
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4959
        p waitUntilTerminated.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  4960
    ].
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4961
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4962
    anyChange ifTrue:[
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4963
        self updateImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4964
        self updateImagePreView.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  4965
    ].
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4966
!
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  4967
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4968
clearColormapEntry0AndMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4969
    "ensure that there is a colorMap entry with 0/0/0 at position
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4970
     0 and then clear all masked pixels (to pixelValue 0).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4971
     This is required for windows icons to be really transparent"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4972
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4973
    |index colorMap| 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4974
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4975
    self compressColorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4976
    colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4977
    (colorMap includes:(Color black)) ifFalse:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4978
        self addColorToColormap:(Color black).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4979
        colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4980
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4981
    index := colorMap indexOf:(Color black).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4982
    index == 1 ifFalse:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4983
        self sortColorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4984
        colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4985
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4986
    self clearMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4987
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4988
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  4989
clearMaskedPixels
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  4990
    "clear all masked pixels (to pixelValue 0)"
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  4991
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4992
    |newImage| 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4993
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4994
    newImage := self image clearMaskedPixels.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4995
    0 to:newImage height - 1 do:[:y |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4996
        0 to:newImage width - 1 do:[:x |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4997
            (newImage maskAtX:x y:y) == 0 ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  4998
                newImage pixelAtX:x y:y put:0
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  4999
            ]
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  5000
        ]
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5001
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5002
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5003
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5004
        self fetchImageData.
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  5005
    ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  5006
!
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  5007
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5008
colorMapChanged
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5009
    |img|
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5010
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5011
    img := self image.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5012
    img release.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5013
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5014
    self imageEditView invalidate.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5015
    self imagePreView invalidate.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5016
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5017
"/    (imageEditView image:img) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5018
"/        self updateLabelsAndHistory.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5019
"/        self imagePreView image:img
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5020
"/    ]
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5021
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5022
    "Created: / 7.8.1998 / 22:26:10 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5023
    "Modified: / 18.8.1998 / 17:08:55 / cg"
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5024
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5025
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5026
colorMapMode:aMode
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5027
    "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
  5028
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5029
    |depth numColors newColorMap newImage 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5030
     oldImage image newColors realColorMap oldFileName
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5031
     usedColors useNearest usageCounts tmpBits tmpMap quest
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5032
     prevMode maskThreshold maskImage| 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5033
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5034
    self withExecuteCursorDo:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5035
        oldImage := self image.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5036
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  5037
        prevMode := colorMapMode value.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5038
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5039
        newColorMap := self class listOfColorMaps at:aMode.
2572
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  5040
        aMode == #depth32 ifTrue:[
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  5041
            depth := 32. 
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  5042
        ] ifFalse:[
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  5043
            depth := (newColorMap size log:2) asInteger. 
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  5044
        ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5045
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5046
        useNearest := false.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5047
        depth == 1 ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5048
            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
  5049
        ] ifFalse:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5050
            prevMode isNil ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5051
                quest := 'Compute colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5052
            ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5053
                quest := 'Keep colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5054
            ]
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5055
        ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5056
        ((prevMode = aMode)
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5057
        or:[depth > oldImage depth
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5058
        or:[self confirm:(resources string:quest)]]) ifTrue:[
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  5059
            (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5060
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5061
                "/ keep the colormap
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5062
                newColorMap atAllPut:Color black.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5063
                depth > oldImage depth ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5064
                    "/ easy - simply copy the part
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5065
                    numColors := 1 bitShift:oldImage depth.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5066
                    0 to:numColors-1 do:[:pixel |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5067
                        newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel)
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5068
                    ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5069
                ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5070
                    "/ see if all used color fit the new colormap
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5071
                    usedColors := oldImage usedColorsMax:(1 bitShift:depth).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5072
                    (usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5073
                        usedColors := oldImage realUsedColors
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5074
                    ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5075
                    (usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5076
                        "/ yea - just install them
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5077
                        usedColors asArray keysAndValuesDo:[:idx :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5078
                            newColorMap at:idx put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5079
                        ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5080
                    ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5081
                        "/ copy over those that are most often used.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5082
                        oldImage depth < 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5083
                            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5084
                            oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5085
                                expandPixels:(oldImage depth)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5086
                                width:oldImage width
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5087
                                height:oldImage height 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5088
                                into:tmpBits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5089
                                mapping:nil.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  5090
                        ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5091
                            oldImage depth == 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5092
                                tmpBits := oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5093
                            ] ifFalse:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5094
                                colorMapMode value:prevMode.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5095
                                self findColorMapMode.    
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5096
                                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
  5097
                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5098
    "/                            (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
  5099
    "/                            ifFalse:[.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5100
    "/                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5101
    "/                            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5102
    "/                            self image: (Image newForDepth:depth) fromImage:oldImage.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5103
    "/                            ^ self.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5104
                            ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5105
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5106
                        usageCounts := tmpBits usageCounts.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5107
                        tmpMap := Array new:usageCounts size.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5108
                        oldImage colorMap asArray keysAndValuesDo:[:i :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5109
                            tmpMap at:i put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5110
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5111
                        usageCounts sort:[:a :b | a > b] with:tmpMap.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5112
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5113
                        1 to:(1 bitShift:depth) do:[:idx |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5114
                            newColorMap at:idx put:(tmpMap at:idx)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5115
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5116
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5117
                        useNearest := Dialog 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5118
                                            confirmWithCancel:(resources 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5119
                                                                  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
  5120
                                                                  with:usedColors size
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5121
                                                                  with:(1 bitShift:depth))
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5122
                                            labels:(resources array:#('Cancel' 'First' 'Nearest')).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5123
                        useNearest isNil ifTrue:[
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5124
                            colorMapMode value:prevMode.
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5125
                            ^ self   "/ cancel
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5126
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5127
                    ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5128
                ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5129
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5130
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5131
            "/ standard colormap
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  5132
            usedColors := oldImage usedColors.
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  5133
            (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
  5134
                useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5135
                                    confirmWithCancel:(resources 
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  5136
                                                           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
  5137
                                                       ) 
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  5138
                                    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
  5139
                useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  5140
                    colorMapMode value:prevMode.
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  5141
                    ^ self   "/ cancel
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  5142
                ].
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  5143
            ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5144
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5145
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5146
        imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5147
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5148
        newImage := Image newForDepth:depth.
1424
d7367ae7f85e fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
  5149
        newImage depth:depth.
3125
9d5624af77ab Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents: 3122
diff changeset
  5150
"/        newImage photometric:oldImage photometric.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5151
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5152
        oldFileName := oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5153
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5154
        Image imageErrorSignal handle:[:ex|
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5155
            Color colorErrorSignal handle:[:ex|
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  5156
                colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5157
                imageEditView undo.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5158
                ^ self warn:(resources string:'Conversion failed !!')
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5159
            ] do:[
1393
c4a11a7d407f use Image>>newForDepth:
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  5160
                newImage := Image newForDepth:depth.
3103
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5161
                newImage 
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5162
                    width:oldImage width height:oldImage height depth:depth;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5163
                    colorMap:newColorMap;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5164
                    photometric:#palette;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5165
                    bits:(ByteArray new:(newImage bytesPerRow * newImage height));
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5166
                    mask:oldImage mask.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5167
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5168
                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
  5169
                [:x :y :clr |
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5170
                    |newColor|
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5171
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5172
                    (newColorMap includes:clr)
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5173
                        ifTrue: [newColor := clr]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5174
                        ifFalse: [
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5175
                            newColor := clr nearestIn:newColorMap.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5176
                            useNearest ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5177
                                (newColor deltaFrom:clr) > 0.5 ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5178
                                    newColor := oldImage colorFromValue:0
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5179
                                ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5180
                            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5181
                        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5182
                    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
  5183
                ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5184
                image := newImage
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5185
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5186
        ] do:[ 
3103
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5187
            image := newImage fromImage:oldImage photometric:newImage photometric.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5188
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5189
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5190
        (aMode asString startsWith:'mask') ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5191
            image mask isNil ifTrue:[
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  5192
                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
  5193
                    maskThreshold := 0.1.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5194
                    maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5195
                ] ifFalse:[
3122
8b3c2b6d3fb2 class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3121
diff changeset
  5196
                    maskImage := ImageMask extent:image extent.
1770
9000adb21f79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1769
diff changeset
  5197
                    maskImage bits:(ByteArray 
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5198
                                        new:(maskImage bytesPerRow * maskImage height)
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5199
                                        withAll:16rFF).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5200
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5201
"/                    maskImage fillRectangle:(image bounds) withColor:(Color colorId:1).
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5202
                ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5203
                image mask:maskImage.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5204
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5205
        ] ifFalse:[ 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5206
            image mask: nil.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5207
        ]. 
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5208
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  5209
        (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5210
            realColorMap := OrderedCollection new.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5211
            image realColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5212
                (realColorMap includes: clr) ifFalse: [realColorMap add: clr]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5213
            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5214
            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
  5215
            newColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5216
                ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5217
                ifTrue:[      
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5218
                    newColors add: clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5219
                ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5220
            ].                  
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  5221
            image colorMap: newColors.   
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5222
        ].
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5223
        image fileName: oldFileName.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5224
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5225
        (imageEditView image: image) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5226
            self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5227
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5228
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5229
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  5230
    "Modified: / 20-07-2007 / 09:18:59 / cg"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5231
!
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5232
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5233
colorize
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5234
    "interactive Hue editing"
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5235
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5236
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5237
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5238
     originalPixels p|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5239
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5240
    "/ compute the averageColor in the background (while asking user)
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5241
    readySema := Semaphore new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5242
    [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5243
        |image|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5244
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5245
        image := imageEditView image.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5246
        originalColormap := image colorMap copy.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5247
        avgColor := image averageColor.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5248
        originalPixels := image bits.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5249
        readySema signal.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5250
    ] forkAt:7.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5251
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5252
    acceptChannel := TriggerValue new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5253
    avgColorHolder := avgColor asValue.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5254
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5255
    firstChange := true.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5256
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5257
    shiftedColor := [:clr :hShift :lFactor :sFactor |
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5258
                        Color 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5259
                                hue:((clr hue) ? 0 + hShift) 
3173
801e6bfe2581 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
  5260
                                light:((clr light * lFactor / 100) min:100)
801e6bfe2581 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
  5261
                                saturation:(((clr saturation max:20) * sFactor / 100) min:100)].
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5262
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5263
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5264
    shiftAction := 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5265
        [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5266
            |hShift lFactor sFactor|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5267
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5268
            acceptChannel value:true.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5269
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5270
            firstChange ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5271
                imageEditView makeUndo.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5272
                firstChange := false.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5273
            ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5274
            readySema notNil ifTrue:[readySema wait. readySema := nil].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5275
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5276
            hShift := hueShift value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5277
            lFactor := lightValue value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5278
            sFactor := saturationValue value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5279
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5280
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5281
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5282
            shiftProcess notNil ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5283
                shiftProcess terminate.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5284
                shiftProcess waitUntilTerminated.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5285
                shiftProcess := nil.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5286
            ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5287
            shiftProcess := 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5288
                [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5289
                    [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5290
                        imageEditView image 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5291
                            colorMap:originalColormap copy;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5292
                            bits:originalPixels copy;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5293
                            release;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5294
                            colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5295
                        self updateImage.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5296
                        self updateInfoLabel.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5297
                        self updateImagePreView.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5298
                    ] ensure:[ shiftProcess := nil ].    
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5299
                ] forkAt:7.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5300
        ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5301
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5302
    bindings := IdentityDictionary new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5303
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5304
    hueShift onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5305
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5306
    bindings at:#lightAmount put:(lightValue := 100 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5307
    lightValue onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5308
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5309
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5310
    saturationValue onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5311
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5312
    bindings at:#acceptChannel put:acceptChannel.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5313
    bindings at:#hlsColor put:avgColorHolder.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5314
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5315
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5316
    ifFalse:[ 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5317
        firstChange ~~ true ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5318
            imageEditView undo
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5319
        ]
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5320
    ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5321
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5322
    (p := shiftProcess) notNil ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5323
        p waitUntilTerminated.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5324
    ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5325
    self updateImage.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5326
    self updateImagePreView.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5327
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5328
    "Created: / 01-11-2007 / 23:27:37 / cg"
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5329
!
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  5330
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5331
compressColorMap
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5332
    "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
  5333
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  5334
    |newImage| 
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  5335
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  5336
    newImage := self image.
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  5337
    newImage compressColorMap.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5338
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5339
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5340
        self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5341
    ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5342
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5343
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5344
copyColorFromColormap
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  5345
    imageEditView setClipboardObject:(self selectedColorOrNil)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5346
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5347
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5348
ditherToDepth
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5349
    |depth|
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5350
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5351
    depth := Dialog request:'New depth ?'.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5352
    depth isEmptyOrNil ifTrue:[^ self].
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5353
    depth := Number readFrom:depth onError:nil.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5354
    depth isNil ifTrue:[^ self].
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5355
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5356
    self ditherToDepth:depth
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5357
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5358
    "Created: / 07-07-2006 / 13:22:10 / cg"
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5359
!
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5360
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5361
ditherToDepth:depth
2576
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5362
    |ditherColors newImage useStandardColors nGrey greyColorsAlready additionalGreyColors moreColors d|
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5363
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5364
    useStandardColors := true.
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5365
"/    useStandardColors := Dialog confirmWithCancel:'Dither in standard colors or use a new (optimized) colormap ?'.
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5366
"/    useStandardColors isNil ifTrue:[^ self].
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5367
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5368
    useStandardColors ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5369
        depth = 1 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5370
            ditherColors := Array with:(Color black) with:(Color white).
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5371
        ] ifFalse:[ depth = 2 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5372
            ditherColors := Array 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5373
                                with:(Color black) 
3140
5a25f22cb054 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  5374
                                with:(Color darkGray)
5a25f22cb054 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  5375
                                with:(Color lightGray)
2576
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5376
                                with:(Color white).
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5377
        ] ifFalse:[ depth = 3 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5378
            ditherColors := Color colorCubeWithRed:2 green:2 blue:2. 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5379
        ] ifFalse:[ depth = 4 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5380
            ditherColors := Color vgaColors. 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5381
        ] ifFalse:[ depth = 5 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5382
            ditherColors := Color colorCubeWithRed:4 green:4 blue:2. 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5383
        ] ifFalse:[ depth = 6 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5384
            ditherColors := Color colorCubeWithRed:4 green:4 blue:3.
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5385
        ] ifFalse:[ depth <= 8 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5386
            ditherColors := Color colorCubeWithRed:6 green:6 blue:5. 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5387
        ] ifFalse:[ 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5388
            self error:'unsupported depth'.
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5389
        ]]]]]]].
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5390
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5391
        nGrey := (2 raisedTo:depth) - ditherColors size.  
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5392
        nGrey > 0 ifTrue:[
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5393
            nGrey := nGrey min:128.
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5394
            greyColorsAlready := ditherColors select:[:clr | clr isGreyColor].
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5395
            d := 1 / nGrey.
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5396
            moreColors := (1 to:nGrey-1) 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5397
                            collect:[:i | Color brightness:(d * i)] 
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5398
                            thenReject:[:clr | greyColorsAlready includes:clr ].
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5399
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5400
            ditherColors := ditherColors , moreColors.
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5401
        ].
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5402
    ] ifFalse:[
3020
7ee98e6a7aab class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 2996
diff changeset
  5403
        self halt:'unhandled dither color setup'.
2576
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5404
    ].
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5405
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5406
    self withExecuteCursorDo:[
2576
9e8d63aadb11 more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents: 2575
diff changeset
  5407
        "/ newImage := self image asDitheredImageUsing:ditherColors depth:depth.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5408
        newImage := self image asDitheredImageUsing:ditherColors depth:8.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5409
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5410
        imageEditView makeUndo.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5411
        imageEditView image:newImage.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5412
        imageEditView setModified.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5413
        self updateImage.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5414
        self updateImagePreView.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5415
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5416
        self fetchImageData.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5417
    ].
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5418
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5419
    "Created: / 07-07-2006 / 13:20:56 / cg"
2073
df9bd2816495 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2058
diff changeset
  5420
    "Modified: / 05-09-2006 / 16:13:25 / cg"
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5421
!
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5422
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  5423
doubleClickOnColor:aColorIndex
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  5424
    self editSelectedColor.
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  5425
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  5426
    "Created: / 22-07-2007 / 13:14:37 / cg"
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  5427
!
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  5428
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5429
editSelectedColor
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5430
    self processSelectedColorWith:[:clr | 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5431
        |editor|
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5432
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5433
        editor := ColorEditDialog new.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5434
        editor color:clr.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5435
        editor open.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5436
        editor accepted ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5437
            AbortOperationRequest raise.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5438
        ].
2575
43e98f6d71d2 ColorEditDialog was grazy - adapted to changed protocol
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  5439
        editor colorNameOrColor
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5440
    ]
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5441
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5442
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5443
fetchImageData
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  5444
    |image|
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  5445
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  5446
    (image := imageEditView image) notNil ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  5447
        self findColorMapMode.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  5448
        self updateLabelsAndHistory.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  5449
    ]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5450
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5451
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  5452
inspectColor
2573
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5453
    |clrIndex clr|
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5454
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5455
    self hasColormap ifFalse:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5456
        clr := self selectedColorOrNil
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5457
    ] ifTrue:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5458
        clrIndex := self selectedColorIndexOrNil.
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5459
        clrIndex isNil ifTrue:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5460
            ^ self
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5461
        ].
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5462
        clr := self image colorFromValue:clrIndex-1
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  5463
    ].
2573
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  5464
    clr inspect
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  5465
!
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  5466
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  5467
inspectColormap
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  5468
    self hasColormap ifTrue:[
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  5469
        self image colorMap inspect
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  5470
    ].
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  5471
!
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  5472
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5473
makeBrighter
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5474
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5475
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5476
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5477
        anyChange := imageEditView makeBrighter.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5478
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5479
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5480
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5481
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5482
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5483
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5484
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5485
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5486
makeDarker
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5487
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5488
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5489
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5490
        anyChange := imageEditView makeDarker.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5491
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5492
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5493
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5494
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5495
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5496
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5497
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5498
1926
b3d2dab90f9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1925
diff changeset
  5499
makeGrayScaleImage
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5500
    |anyChange|
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5501
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5502
    self withExecuteCursorDo:[
1926
b3d2dab90f9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1925
diff changeset
  5503
        anyChange := imageEditView makeGrayScaleImage.
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5504
        anyChange ifFalse:[
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5505
            Dialog warn:'Image unchanged'.
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5506
        ] ifTrue:[
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5507
            self updateImage.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5508
        ]
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5509
    ].
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5510
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5511
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5512
makeInverse
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5513
    | anyChange|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5514
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5515
    self withExecuteCursorDo:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5516
        anyChange := imageEditView makeInverse.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5517
        anyChange ifFalse:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5518
            Dialog warn:'Image unchanged'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5519
        ] ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  5520
            self updateImage.
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5521
        ]
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5522
    ].
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5523
!
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  5524
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5525
makeSelectedColorBrighter
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5526
    self processSelectedColorWith:[:clr | clr lightened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5527
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5528
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5529
makeSelectedColorDarker
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5530
    self processSelectedColorWith:[:clr | clr darkened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5531
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5532
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  5533
makeSelectedColorGray
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  5534
    self processSelectedColorWith:[:clr | Color brightness:(clr brightness)]
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  5535
!
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  5536
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5537
makeSlightlyBrighter
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5538
    | anyChange|
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5539
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5540
    self withExecuteCursorDo:[
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5541
        anyChange := imageEditView makeSlightlyBrighter.
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5542
        anyChange ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5543
            Dialog warn:'Image unchanged'.
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5544
        ] ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5545
            self updateImage.
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5546
        ]
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5547
    ].
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5548
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5549
    "Created: / 24-11-2010 / 11:06:11 / cg"
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5550
!
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5551
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5552
makeSlightlyDarker
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5553
    | anyChange|
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5554
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5555
    self withExecuteCursorDo:[
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5556
        anyChange := imageEditView makeSlightlyDarker.
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5557
        anyChange ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5558
            Dialog warn:'Image unchanged'.
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5559
        ] ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5560
            self updateImage.
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5561
        ]
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5562
    ].
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5563
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5564
    "Created: / 24-11-2010 / 11:06:23 / cg"
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5565
!
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5566
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5567
menu_clearColormapEntry0AndMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5568
    "ensure that there is a colorMap entry with 0/0/0 at position
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5569
     0 and then clear all masked pixels (to pixelValue 0)"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5570
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5571
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5572
    self withExecuteCursorDo:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5573
        self clearColormapEntry0AndMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5574
    ]
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5575
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5576
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5577
menu_clearMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5578
    "clear all masked pixels (to pixelValue 0)"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5579
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5580
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5581
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5582
    self withExecuteCursorDo:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5583
        self clearMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5584
    ]
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5585
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5586
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5587
menu_compressColorMap
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5588
    "calculates a new color map for the image, using only used colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5589
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  5590
    |depth oldImage usedColors colorMap| 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5591
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5592
    oldImage := self image.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5593
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5594
    oldImage photometric ~~ #palette ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5595
        self information:'Compress colorMap: Only palette images have colormaps.'.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5596
        ^ self
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5597
    ].
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  5598
    depth := oldImage depth.
3103
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  5599
    colorMap := oldImage colorMap asArray.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5600
    usedColors := oldImage realUsedColors.
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  5601
    usedColors size == colorMap size ifTrue:[
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5602
        self information:'Compress colorMap: Colormap already compressed - no compression.'.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5603
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5604
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5605
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5606
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5607
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5608
    self withExecuteCursorDo:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5609
        self compressColorMap
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5610
    ]
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5611
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5612
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5613
menu_copyMask
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5614
    |mask|
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5615
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5616
    mask := self image mask.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5617
    MaskClipboard := mask subImageIn: (0@0 extent:mask extent).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5618
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5619
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5620
menu_pasteMask
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5621
    |img mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5622
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5623
    imageEditView makeUndo.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5624
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5625
    img := self image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5626
    mask := img mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5627
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5628
    mask 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5629
         copyFrom:MaskClipboard
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5630
         x:0 y:0
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5631
         toX:0 y:0 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5632
         width:(mask width min:MaskClipboard width)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5633
         height:(mask height min:MaskClipboard height).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5634
    img mask:mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5635
    (imageEditView image:img copy) notNil ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5636
        self fetchImageData.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5637
    ]
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5638
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  5639
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5640
menu_sortColorMap
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5641
    "calculates a new color map for the image, sorting colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5642
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5643
    self menu_sortColorMapWith:self sortBlockForColors
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5644
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5645
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5646
menu_sortColorMapWith:sortBlock
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5647
    "calculates a new color map for the image, sorting colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5648
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5649
    self image photometric ~~ #palette ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5650
        self information:'Compress colorMap: Only palette images have colormaps.'.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5651
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5652
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5653
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5654
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5655
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5656
    self withExecuteCursorDo:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5657
        self sortColorMapWith:sortBlock
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5658
    ]
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5659
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5660
    "Modified: / 15.9.1998 / 17:53:32 / cg"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5661
    "Created: / 30.9.1998 / 23:51:23 / cg"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5662
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5663
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5664
pasteColorIntoColormap
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5665
    |copyBufferColor|
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5666
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5667
    copyBufferColor := imageEditView getClipboardObject.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5668
    copyBufferColor isColor ifFalse:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5669
        UserPreferences current beepInEditor ifTrue:[                
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5670
            self window beep.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5671
        ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5672
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5673
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5674
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5675
    self processSelectedColorWith:[:clr |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5676
        copyBufferColor
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5677
    ]
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5678
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5679
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5680
pickAndAddColorToColormap
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5681
    self addColorToColormap:(Color fromUser)
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5682
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5683
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  5684
pickAndPasteColor
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  5685
    self pickColor.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  5686
    self pasteColorIntoColormap.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  5687
!
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  5688
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5689
pickColor
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  5690
    imageEditView setClipboardObject:(Color fromUser)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5691
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5692
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5693
processSelectedColorWith:aBlock
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5694
    "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
  5695
     value of aBlock"
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5696
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5697
    |img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5698
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5699
    selectedColorIndex := self selectedColorIndexOrNil.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5700
    selectedColorIndex isNil ifTrue:[^ self].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5701
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5702
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5703
    cMap := img colorMap.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5704
    cMap isNil ifTrue:[
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  5705
        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
  5706
        ^ self
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5707
    ].
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5708
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5709
    oldColor := cMap at:selectedColorIndex.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5710
    imageEditView makeUndo.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5711
2992
a970017936e7 Refactor:
Stefan Vogel <sv@exept.de>
parents: 2945
diff changeset
  5712
    modifiedColormap := cMap asNewArray.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5713
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5714
    newColor := aBlock value:oldColor.
1859
254fc0e37550 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1852
diff changeset
  5715
    modifiedColormap at:selectedColorIndex put:newColor.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5716
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5717
    newImage := img species new
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5718
                    width:img width
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5719
                    height:img height
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  5720
                    depth:img depth
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5721
                    fromArray:img bits.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5722
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5723
    newImage colorMap:modifiedColormap.  
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5724
    newImage fileName:img fileName.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5725
    newImage mask:(img mask copy).
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5726
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5727
    oldSelection := self selectionOfColor value.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5728
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5729
    (imageEditView image:newImage) notNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5730
        self fetchImageData.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5731
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5732
    self selectionOfColor value:oldSelection.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5733
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5734
    "Created: / 12.3.1999 / 00:20:28 / cg"
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5735
    "Modified: / 16.3.1999 / 21:57:26 / cg"
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5736
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5737
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5738
reduceNumberOfColors
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  5739
    |s n anyChange img usedColors|
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5740
2817
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  5741
    s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3.
1435
f39893848245 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  5742
    s size == 0 ifTrue:[^ self].
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5743
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5744
    n := Integer readFrom:s onError:0.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5745
    (n between:1 and:7) ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5746
        Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5747
        ^ self
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5748
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5749
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5750
    self withExecuteCursorDo:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5751
        anyChange := imageEditView reduceColorResolutionBy:n.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5752
        anyChange ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5753
            Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5754
        ] ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5755
            img := imageEditView image.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5756
            imageEditView image:img.
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5757
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  5758
            self fetchImageData.
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  5759
            usedColors := img usedColorsMax:10000.
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  5760
            usedColors size == 10000 ifTrue:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  5761
                Dialog information:('>= ' , usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  5762
            ] ifFalse:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  5763
                Dialog information:(usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  5764
            ]
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5765
        ]
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5766
    ].
2817
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  5767
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  5768
    "Modified: / 29-10-2010 / 18:08:01 / cg"
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5769
!
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5770
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5771
reduceNumberOfColors2
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5772
    |s rndR rndG rndB usedColors image newImage|
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5773
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5774
    s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4.
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5775
    s size == 0 ifTrue:[^ self].
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5776
    rndR := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5777
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5778
    s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5779
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5780
    rndG := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5781
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5782
    s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5783
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5784
    rndB := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5785
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5786
    ((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5787
        Dialog warn:'Image unchanged'.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5788
        ^ self
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5789
    ].
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5790
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5791
    self withExecuteCursorDo:[
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5792
        image := self image.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5793
        "/ usedColors := image usedColorsMax:4096.
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5794
        imageEditView makeUndo.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5795
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5796
        newImage := image copy.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5797
        newImage photometric == #palette ifTrue:[
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5798
            newImage colorMap:(OrderedCollection new).
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5799
        ].
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5800
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5801
        image
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5802
            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
  5803
            do:[:x :y :clr |
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5804
                |r g b nr ng nb newClr|
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5805
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5806
                r := clr redByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5807
                g := clr greenByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5808
                b := clr blueByte. 
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5809
                nr := (r roundTo:rndR) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5810
                ng := (g roundTo:rndG) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  5811
                nb := (b roundTo:rndB) min:255. 
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5812
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5813
                newClr := Color redByte:nr greenByte:ng blueByte:nb.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5814
                newImage photometric == #palette ifTrue:[
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5815
                    (newImage colorMap includes:newClr) ifFalse:[
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5816
                        newImage colorMap add:newClr
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5817
                    ].
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  5818
                ].
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5819
                newImage colorAtX:x y:y put:newClr
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5820
            ].
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5821
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5822
        imageEditView image:newImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5823
        imageEditView setModified.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5824
        self updateImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5825
        self updateImagePreView.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5826
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5827
        self fetchImageData.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5828
        usedColors := newImage usedColorsMax:10000.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5829
        usedColors size == 10000 ifTrue:[
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5830
            Dialog information:('>= ' , usedColors size printString , ' colors used.')
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5831
        ] ifFalse:[
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5832
            Dialog information:(usedColors size printString , ' colors used.')
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  5833
        ]
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5834
    ].
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5835
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5836
    "Modified: / 07-07-2006 / 13:10:42 / cg"
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5837
!
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5838
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5839
selectColor:aColor
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5840
    |idx img cMap|
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5841
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5842
    aColor isNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5843
        idx := nil.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5844
    ] ifFalse:[
2791
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5845
        img := self image.
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5846
        img notNil ifTrue: [
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5847
            aColor == Color noColor ifTrue:[
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5848
                (img mask notNil) ifTrue:[
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5849
                    idx := 1.
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5850
                ]
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5851
            ] ifFalse:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5852
                (cMap := self listOfColors) notNil ifTrue:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5853
                    idx := cMap indexOf:aColor ifAbsent:nil.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5854
                ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5855
                idx isNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5856
                    "/ should not happen...
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5857
                    (cMap := img colorMap) notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5858
                        idx := cMap indexOf:aColor ifAbsent:nil.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5859
                        idx notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5860
                            img mask notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5861
                                idx := idx + 1.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5862
                            ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5863
                        ]
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5864
                    ].
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5865
                ].
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5866
            ].
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5867
        ].
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5868
    ].
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5869
    self selectionOfColor value:idx.
2790
2c90a15a0011 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2771
diff changeset
  5870
2791
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  5871
    "Modified: / 02-07-2010 / 12:06:07 / cg"
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5872
!
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5873
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5874
selectedColorIndexOrNil
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  5875
    |img clrIndex|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5876
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5877
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5878
    img isNil ifTrue:[
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
  5879
        "/ self warn:'No Image.'.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5880
        ^ nil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5881
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5882
    clrIndex := self selectionOfColor value.
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5883
    self hasMask "img mask notNil" ifTrue: [ 
2449
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  5884
        (clrIndex isInteger and:[clrIndex > 1]) ifTrue:[
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  5885
            ^ clrIndex - 1 
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  5886
        ].
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  5887
        ^ nil
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5888
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5889
    ^ clrIndex
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5890
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5891
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5892
selectedColorOrNil
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5893
    |cmapIndex img cMap colorList|
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5894
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5895
    cmapIndex := self selectedColorIndexOrNil.
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5896
    cmapIndex isNil ifTrue:[^ nil].
2556
736533777318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2546
diff changeset
  5897
    cmapIndex == 0 ifTrue:[^ nil].
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5898
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5899
    img := self image.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5900
    cMap := img colorMap.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5901
    cMap isNil ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5902
        "/ self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.').
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5903
        colorList := self listOfColors.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5904
        colorList notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5905
            ^ colorList at:cmapIndex ifAbsent:nil
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5906
        ].
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5907
        ^ nil
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5908
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5909
    ^ cMap at:cmapIndex.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5910
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  5911
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5912
sortColorMap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5913
    "calculates a new color map for the image, sorting colors"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5914
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5915
    self sortColorMapWith:self sortBlockForColors
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5916
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5917
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5918
sortColorMapWith:sortBlock
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5919
    "calculates a new color map for the image, sorting colors"
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  5920
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5921
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| 
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5922
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5923
    oldImage := self image.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5924
    depth := oldImage depth.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5925
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5926
    usedColors := oldImage realColorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5927
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5928
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5929
    "/ translation table
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5930
    oldToNew := ByteArray new:(1 bitShift:depth).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5931
    newColorMap := usedColors asArray.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5932
    newColorMap sort:sortBlock.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5933
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5934
    oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5935
        |newPixel|
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5936
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5937
        (usedColors includes:clr) ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5938
            newPixel := newColorMap indexOf:clr.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5939
            oldToNew at:oldIdx put:newPixel-1.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5940
        ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5941
    ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5942
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5943
    oldBits := oldImage bits.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5944
    newBits := ByteArray new:(oldBits size).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5945
    depth ~~ 8 ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5946
        "/ expand/compress can only handle 8bits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5947
        tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5948
        oldBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5949
            expandPixels:depth
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5950
            width:oldImage width
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5951
            height:oldImage height 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5952
            into:tmpBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5953
            mapping:oldToNew.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5954
        tmpBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5955
            compressPixels:depth 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5956
            width:oldImage width 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5957
            height:oldImage height 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5958
            into:newBits 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5959
            mapping:nil
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5960
    ] ifFalse:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5961
        oldBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5962
            expandPixels:depth
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5963
            width:oldImage width
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5964
            height:oldImage height 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5965
            into:newBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5966
            mapping:oldToNew.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5967
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5968
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5969
    newImage := oldImage species new
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5970
                    width:oldImage width
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5971
                    height:oldImage height
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5972
                    depth:depth
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5973
                    fromArray:newBits.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5974
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5975
    newImage colorMap:newColorMap.  
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5976
    newImage fileName:oldImage fileName.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5977
    newImage mask:(oldImage mask copy).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5978
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5979
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  5980
        self fetchImageData.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5981
    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5982
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5983
    "Modified: / 15.9.1998 / 17:53:32 / cg"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  5984
    "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
  5985
! !
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  5986
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  5987
!ImageEditor methodsFor:'user actions-editing'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5988
2354
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5989
do3DProjection
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5990
    |box dx1 dx2 image|
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5991
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5992
    image := imageEditView image.
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5993
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5994
    box := EnterBox new.
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5995
    box title:(resources string:'dX1 (0 < dx < 0.5):').
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5996
    box okText:(resources string:'OK').
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5997
    box abortText:(resources string:'Cancel').
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5998
    box initialText:'0.1'.
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  5999
    box showAtPointer.
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6000
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6001
    (box accepted 
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6002
    and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil])
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6003
    ifTrue:[
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6004
        box title:(resources string:'dX2 (0 < dx < 0.5):').
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6005
        box initialText:(dx1 printString).
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6006
        box showAtPointer.
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6007
        (box accepted 
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6008
        and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil])
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6009
        ifTrue:[
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6010
            imageEditView threeDProjection:dx1 and:dx2.
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6011
        ]
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6012
    ].
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6013
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6014
    self updateInfoLabel
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6015
!
15be12f5e320 3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents: 2339
diff changeset
  6016
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6017
doBrightenImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6018
    imageEditView brightenImage.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6019
    self listOfColors removeAll.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6020
    self findColorMapMode.     
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  6021
    "/ imageEditView removelastUndo
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6022
!
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6023
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6024
doBrowseClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6025
    "opens a System Browser on the resourceClass and the resourceSelector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6026
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  6027
    |cls|
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  6028
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  6029
    cls := imageEditView resourceClass.
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  6030
    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
  6031
1488
cb1867473e3e UserPreference access
Claus Gittinger <cg@exept.de>
parents: 1481
diff changeset
  6032
    UserPreferences systemBrowserClass
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  6033
        openInClass:cls class 
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  6034
        selector:(imageEditView resourceSelector)
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  6035
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  6036
    "Modified: / 31.7.1998 / 02:01:15 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6037
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6038
1703
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  6039
doCopyImageToClipboard
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  6040
    imageEditView copyImageToClipboard.
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  6041
!
7cf51b5b6ac5 added copyToClipboard
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  6042
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6043
doCropAll
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6044
    "find all borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6045
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6046
    imageEditView cropLeft:true right:true top:true bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6047
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6048
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6049
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6050
    "Created: / 7.9.1998 / 16:33:43 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6051
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6052
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6053
doCropBottom
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6054
    "find a bottom border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6055
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6056
    imageEditView cropLeft:false right:false top:false bottom:true.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6057
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6058
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6059
    "Created: / 7.9.1998 / 13:00:20 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6060
    "Modified: / 7.9.1998 / 14:26:23 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6061
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6062
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6063
doCropLeft
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6064
    "find a left border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6065
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6066
    imageEditView cropLeft:true right:false top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6067
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6068
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6069
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6070
    "Modified: / 7.9.1998 / 14:26:34 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6071
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6072
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6073
doCropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6074
    "let user specify borders and cut them off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6075
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6076
    |bindings left top right bottom img firstChange gropAction acceptChannel|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6077
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6078
    acceptChannel := TriggerValue new.
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  6079
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  6080
    firstChange := true.
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  6081
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6082
    gropAction := 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6083
        [:lV :rV :tV :bV | |l r t b|
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6084
            acceptChannel value:true.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6085
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6086
            l := lV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6087
            r := rV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6088
            t := tV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6089
            b := bV value.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6090
            (l + r + t + b) == 0 ifTrue:[
2520
8ee06c8f3f9f beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
  6091
                UserPreferences current beepInEditor ifTrue:[                
8ee06c8f3f9f beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
  6092
                    self window beep
8ee06c8f3f9f beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
  6093
                ]
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6094
            ] ifFalse:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6095
                img := imageEditView image.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6096
                firstChange ifTrue:[
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6097
                    imageEditView makeUndo.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6098
                    firstChange := false.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6099
                ].
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6100
                imageEditView
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6101
                    makeSubImageX:l y:t 
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6102
                    width:(img width - l - r)
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6103
                    height:(img height - t - b).
2546
b69247f503b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2539
diff changeset
  6104
b69247f503b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2539
diff changeset
  6105
                self updateImagePreView.
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6106
                self updateInfoLabel
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6107
            ].
1490
08f46b59ef9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1489
diff changeset
  6108
        ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6109
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6110
    bindings := IdentityDictionary new.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6111
    bindings at:#left put:(left := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6112
    bindings at:#right put:(right := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6113
    bindings at:#top put:(top := 1 asValue).
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6114
    bindings at:#bottom put:(bottom := 1 asValue).
1502
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6115
    bindings at:#acceptChannel put:acceptChannel.
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6116
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6117
    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
  6118
    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
  6119
    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
  6120
    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
  6121
f5baa791b8cb better crop
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  6122
    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
  6123
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  6124
    (self openDialogInterface:#cropDialogSpec withBindings:bindings) 
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6125
    ifFalse:[ 
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6126
        firstChange ~~ true ifTrue:[
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6127
            imageEditView undo.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6128
            self updateImagePreView.
1507
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6129
        ]
e65674cad5e5 tabable crobDialog
Claus Gittinger <cg@exept.de>
parents: 1502
diff changeset
  6130
    ].
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6131
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6132
    "Created: / 7.9.1998 / 18:16:07 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6133
    "Modified: / 7.9.1998 / 18:20:42 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6134
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6135
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6136
doCropRight
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6137
    "find a right border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6138
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6139
    imageEditView cropLeft:false right:true top:false bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6140
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6141
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6142
    "Created: / 7.9.1998 / 13:00:14 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6143
    "Modified: / 7.9.1998 / 14:26:44 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6144
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6145
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6146
doCropTop
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6147
    "find a top border and cut it off"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6148
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  6149
    imageEditView cropLeft:false right:false top:true bottom:false.   
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6150
    self updateInfoLabel
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6151
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6152
    "Created: / 7.9.1998 / 13:00:19 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6153
    "Modified: / 7.9.1998 / 14:26:52 / cg"
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6154
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6155
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6156
doDarkenImage
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6157
    imageEditView darkenImage.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6158
    self listOfColors removeAll.
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6159
    self findColorMapMode.     
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  6160
    "/ imageEditView removelastUndo
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6161
!
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  6162
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  6163
doEditMask
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  6164
    self image mask edit
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  6165
!
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  6166
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6167
doFlipHorizontal
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6168
    "flips horizontally current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6169
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6170
    imageEditView flipHorizontal
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6171
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6172
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6173
doFlipVertical
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6174
    "flips vertically current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6175
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6176
    imageEditView flipVertical
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6177
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6178
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6179
doInsertTextFromUser
3157
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6180
    |text tempForm tempImage maskImage font w h paintColor|
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6181
2424
12831cc181ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6182
    text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'.
12831cc181ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6183
    text isEmptyOrNil ifTrue:[^ self ].
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6184
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6185
    font := Font family:'arial' size:20.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6186
    font := font onDevice:Screen current.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6187
    w := font widthOf:text.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6188
    h := font heightOf:text.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6189
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6190
    tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current).
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6191
    tempForm clear.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6192
    tempForm font:font.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6193
    tempForm paint:(Color colorId:1).
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6194
    tempForm displayString:text at:(0@font ascent).
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6195
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6196
    tempImage := tempForm asImage.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6197
    maskImage := tempForm asImage.
3157
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6198
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6199
    paintColor := imageEditView selectedColor.
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6200
    paintColor  colorId == 0 ifTrue:[
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6201
        paintColor := Color black
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6202
    ].
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6203
    tempImage   
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6204
        photometric:#palette;
3157
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6205
        colorMap:(Array 
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6206
                    with:Color white 
1c2d4a99b02a class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  6207
                    with:paintColor);
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6208
        mask:maskImage.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6209
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6210
    ImageEditView copyImageToClipboard:tempImage.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6211
    self editMode value:#paste.
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6212
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6213
    "Modified: / 11-11-2007 / 12:32:55 / cg"
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6214
!
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  6215
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  6216
doInspectImage
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  6217
    "opens a System Browser on the resourceClass and the resourceSelector"
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  6218
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  6219
    self image inspect
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  6220
!
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  6221
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6222
doMagnifyDown
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  6223
    "magnifies the current image one step down"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6224
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6225
    |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
  6226
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  6227
    magHolder := self magnificationHolder.
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6228
    (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
  6229
        magHolder value: mag - 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6230
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6231
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6232
    "Modified: / 26.7.1998 / 20:24:08 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6233
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6234
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6235
doMagnifyImage
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6236
    "magnifies the current image to a new size"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6237
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6238
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6239
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6240
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6241
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6242
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6243
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6244
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6245
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6246
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6247
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6248
    (box accepted 
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6249
    and: [(newSize := self pointFromString:(box contents)) notNil])
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6250
    ifTrue:[
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6251
        newSize isPoint ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6252
            self warn:'please enter the new size as ''x @ y''.'.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6253
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6254
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6255
        imageEditView magnifyImageTo:newSize.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6256
    ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6257
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6258
    self updateInfoLabel
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6259
!
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6260
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6261
doMagnifyImageBy
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6262
    "magnifies the current image (by a scale)"
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6263
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6264
    |box oldSize newSize scaleString scale image|
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6265
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6266
    image := imageEditView image.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6267
    oldSize := image extent.
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6268
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6269
    scaleString := Dialog 
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6270
                   request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') 
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6271
                   initialAnswer:'1'
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6272
                   list:#('0.25' '0.5' '2' '4').     
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6273
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6274
"/    box := EnterBox new.
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6275
"/    box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):').
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6276
"/    box okText:(resources string:'OK').
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6277
"/    box abortText:(resources string:'Cancel').
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6278
"/    box initialText:1 printString.
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6279
"/    box showAtPointer.
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6280
"/    box accepted ifTrue:[
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6281
"/        scaleString := box contents.
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6282
"/    ].
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6283
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6284
    scale := Object readFromString:scaleString onError:nil.
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6285
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6286
    scale notNil ifTrue:[
1479
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6287
        scale isNumber ifFalse:[
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6288
            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
  6289
            ^ self.    
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6290
        ].
18f7b6cc2514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  6291
        newSize := oldSize * scale.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6292
        imageEditView magnifyImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6293
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6294
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6295
    self updateInfoLabel
228524287573 intitial checkin
tz
parents:
diff changeset
  6296
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6297
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6298
doMagnifyUp
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  6299
    "magnifies the current image one step up"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6300
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6301
    |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
  6302
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  6303
    magHolder := self magnificationHolder.
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6304
    (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
  6305
        magHolder value: mag + 1
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6306
    ]
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6307
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  6308
    "Modified: / 26.7.1998 / 20:23:52 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6309
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6310
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6311
doNegativeImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6312
    "negates current image by negating the color map"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6313
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6314
    self image depth ~~ 1 ifTrue:[
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6315
        Dialog warn:'Only useful for depth 1 images'.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6316
        ^ self
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6317
    ].
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6318
    imageEditView negativeImage.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6319
    self listOfColors removeAll.
901
ce482227787d several undos
tz
parents: 900
diff changeset
  6320
    self findColorMapMode.     
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  6321
    "/ imageEditView removelastUndo
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6322
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6323
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6324
doResizeImage
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6325
    "resizes the current image"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6326
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6327
    |box newSize image|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6328
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6329
    image := imageEditView image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6330
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6331
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6332
    box title:(resources string:'Images new size:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6333
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6334
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6335
    box initialText:image extent printString.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6336
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6337
    (box accepted 
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6338
    and: [(newSize := self pointFromString:(box contents)) notNil])
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6339
    ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6340
        imageEditView resizeImageTo:newSize.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6341
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6342
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6343
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6344
doRotateImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6345
    "rotates current image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6346
2884
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6347
    |rotationString box rotation|
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6348
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6349
    rotationString := Dialog 
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6350
                        request:(resources string:'Rotate by (degrees, clockwise):')
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6351
                        list:#( '-90' '90' '180' '45' '-45'  '135' '-135' ) 
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6352
                        initialAnswer:90.
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6353
    rotationString isEmptyOrNil ifTrue:[^ self].    "/ cancelled
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6354
    rotation := Number readFrom:rotationString onError:[nil].
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6355
    rotation isNil ifTrue:[^ self].   
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6356
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6357
"/    box := EnterBox new.
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6358
"/    box title:(resources string:'Rotate by (degrees, clockwise):').
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6359
"/    box okText:(resources string:'OK').
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6360
"/    box abortText:(resources string:'Cancel').
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6361
"/    box initialText: '0'.
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6362
"/    box showAtPointer.
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6363
"/    (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil])
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6364
"/    ifFalse:[ ^ self ].
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6365
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6366
    imageEditView rotateImageBy:rotation.
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6367
    self updateInfoLabel.
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6368
b24f5e13e650 changed: #doRotateImage
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  6369
    "Modified: / 18-03-2012 / 14:41:14 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6370
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6371
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6372
doShiftManual
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6373
    "let user specify amount and shift"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6374
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  6375
    |bindings amount img firstChange shiftAction acceptChannel wrapHolder|
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6376
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6377
    acceptChannel := TriggerValue new.
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6378
    wrapHolder := (lastShiftUsedWrap ? true) asValue.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6379
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6380
    firstChange := true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6381
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6382
    shiftAction := 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6383
        [:shiftH :shiftV | 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6384
            acceptChannel value:true.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6385
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6386
            img := imageEditView image.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6387
            firstChange ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6388
                imageEditView makeUndo.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6389
                firstChange := false.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6390
            ].
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  6391
            imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value).
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6392
            self updateInfoLabel
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6393
        ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6394
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6395
    bindings := IdentityDictionary new.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6396
    bindings at:#shiftAmount put:(amount := 1 asValue).
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  6397
    bindings at:#wrap put:wrapHolder.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6398
    bindings at:#acceptChannel put:acceptChannel.
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6399
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6400
    bindings at:#shiftLeftNow   put:[ shiftAction value:(-1*amount value) value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6401
    bindings at:#shiftRightNow  put:[ shiftAction value:amount value value:0 ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6402
    bindings at:#shiftUpNow     put:[ shiftAction value:0 value:(-1*amount value) ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6403
    bindings at:#shiftDownNow   put:[ shiftAction value:0 value:amount value ].
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6404
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6405
    (self openDialogInterface:#shiftDialogSpec withBindings:bindings) 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6406
    ifFalse:[ 
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6407
        firstChange ~~ true ifTrue:[
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6408
          imageEditView undo
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6409
        ]
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6410
    ].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6411
    lastShiftUsedWrap := wrapHolder value.
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6412
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6413
    "Created: / 7.9.1998 / 18:16:07 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6414
    "Modified: / 7.9.1998 / 18:20:42 / cg"
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6415
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  6416
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6417
doUnCropManual
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6418
    "let user specify borders and add them"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6419
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6420
    |bindings left top right bottom img|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6421
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6422
    bindings := IdentityDictionary new.
1704
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  6423
    bindings at:#left put:(left := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  6424
    bindings at:#right put:(right := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  6425
    bindings at:#top put:(top := 1 asValue).
3e0e31541f2e doUngropManual -> default, border 1
tm
parents: 1703
diff changeset
  6426
    bindings at:#bottom put:(bottom := 1 asValue).
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  6427
    (self openDialogInterface:#uncropDialogSpec withBindings:bindings)
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6428
    ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6429
        left := left value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6430
        right := right value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6431
        top := top value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6432
        bottom := bottom value.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6433
        img := imageEditView image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6434
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6435
        imageEditView
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6436
            makeBorderedImageX:left y:top 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6437
            width:(img width + left + right)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6438
            height:(img height + top + bottom).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6439
        self updateInfoLabel
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6440
    ].
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6441
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6442
    "Created: / 7.9.1998 / 18:16:07 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6443
    "Modified: / 7.9.1998 / 18:20:42 / cg"
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6444
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  6445
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6446
doUndo
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6447
    "reverses last edit action"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6448
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  6449
    imageEditView undo.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6450
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6451
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6452
!ImageEditor methodsFor:'user actions-image sequences'!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6453
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6454
editEachImageFromSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6455
    |seq|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6456
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6457
    self checkModified ifFalse:[ ^ self ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6458
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6459
    imageEditView releaseUndos.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6460
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6461
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6462
    seq size > 10 ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6463
        (Dialog confirm:(resources string:'Ok to open %1 image editor windows?' with:seq size)) 
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6464
            ifFalse:[^ self].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6465
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6466
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6467
    seq do:[:eachFrame |
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6468
        ImageEditor openOnImage:eachFrame image
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6469
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6470
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6471
    "Modified: / 21-10-2010 / 15:01:25 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6472
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6473
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6474
gotoImageInSequence:index
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6475
    "display the next image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6476
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6477
    |img seq frame listOfColors|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6478
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6479
    imageEditView releaseUndos.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6480
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6481
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6482
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6483
    imageSeqNr := index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6484
    frame := seq at:imageSeqNr.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6485
    imageEditView image:(frame image).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6486
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6487
    (img := self image) notNil ifTrue:[          
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6488
        listOfColors := self listOfColors.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6489
        img colorMap notNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6490
            listOfColors contents:(img usedColors asSet asOrderedCollection).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6491
        ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6492
            listOfColors removeAll.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6493
        ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6494
        self findColorMapMode.     
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6495
        self updateLabelsAndHistory.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6496
        img := img onDevice:device.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6497
        imageEditView image:img.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6498
    ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6499
        self updateForNoImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6500
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6501
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6502
    "Created: / 21-10-2010 / 14:22:11 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6503
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6504
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6505
nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6506
    "display the next image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6507
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6508
    |seq index|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6509
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6510
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6511
    (index := imageSeqNr) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6512
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6513
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6514
    index := index + 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6515
    index > seq size ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6516
        self information:'Back to first image in sequence'.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6517
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6518
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6519
    self gotoImageInSequence:index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6520
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6521
    "Modified: / 21-10-2010 / 14:24:11 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6522
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6523
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6524
previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6525
    "display the previous image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6526
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6527
    |seq index|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6528
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6529
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6530
    (index := imageSeqNr) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6531
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6532
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6533
    index := index - 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6534
    index < 1 ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6535
        self information:'Wrap to last image in sequence'.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6536
        index := seq size.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6537
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6538
    self gotoImageInSequence:index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6539
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6540
    "Created: / 21-10-2010 / 14:25:03 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6541
! !
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  6542
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  6543
!ImageEditor methodsFor:'user actions-loading'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6544
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6545
doLoadFromClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6546
    "opens a dialog for loading an image from class and a (resource-) selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6547
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  6548
    |img|
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  6549
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6550
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6551
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6552
    (imageEditView loadFromClass) notNil ifTrue:[
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  6553
        imageSeqNr := nil.
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  6554
        (img := self image) notNil ifTrue: [
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  6555
            self updateColorsFromImage:img.
574
8d82e8f101c1 undo disabling
tz
parents: 573
diff changeset
  6556
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  6557
            self updateLabelsAndHistory.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6558
        ] ifFalse: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6559
            self updateForNoImage
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  6560
        ].
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  6561
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6562
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6563
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6564
doLoadFromFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6565
    "opens a dialog for loading an image from a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6566
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6567
    |img file filters title|
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6568
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6569
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6570
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  6571
    imageSeqNr := nil.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6572
    img := self image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6573
    img notNil ifTrue: [
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6574
        file := img fileName
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6575
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6576
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6577
    title := (resources string:'Load Image From').
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6578
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  6579
    (UserPreferences current useNativeFileDialog
3100
d2310ff3cbab class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3080
diff changeset
  6580
     and:[Screen current isWindowsPlatform]) ifTrue:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6581
        self withWaitCursorDo:[
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  6582
            file := Screen current
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6583
                nativeFileDialogFor:(self window topView id)
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6584
                save:false
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6585
                title:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6586
                inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory])
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6587
                initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png'])
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  6588
                "/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR)
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6589
                filter:
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6590
                  {
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6591
                          { (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg'  } .
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6592
                          { (resources string:'All Files') . '*.*'  } 
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6593
                  }
2821
850aa6d37ea3 changed:
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  6594
                extension:nil
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  6595
                "blocking:false".
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6596
        ].
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6597
    ] ifFalse:[    
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6598
        filters := FileSelectionBrowser loadImageFileNameFilters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6599
        file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6600
            file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6601
                        request:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6602
                        fileName:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6603
                        withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6604
        ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6605
            file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6606
                        request:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6607
                        inDirectory:LastDirectory
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6608
                        withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6609
        ].
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6610
    ].
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6611
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6612
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6613
        LastDirectory := file asFilename directoryName.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6614
        self loadFromFile:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6615
    ]
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6616
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  6617
    "Modified: / 14-12-2010 / 13:52:11 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6618
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6619
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6620
doLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6621
    "opens a dialog for loading an image from a URL"
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6622
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6623
    |tempFile url response|
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6624
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6625
    self checkModified ifFalse:[ ^ self ].
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6626
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6627
    url := Dialog 
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6628
                request:(resources string:'Load Image from URL')
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6629
                initialAnswer:LastURL.
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6630
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6631
    url notEmptyOrNil ifTrue:[
3050
238571e2a33b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3027
diff changeset
  6632
        HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication'].
238571e2a33b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3027
diff changeset
  6633
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6634
        LastURL := url.
3027
50657c666fdc class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3022
diff changeset
  6635
        tempFile := FileStream newTemporary close fileName.
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6636
        self withWaitCursorDo:[
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6637
            response := HTTPInterface get:url destinationFile:tempFile.
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6638
        ].
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6639
        response isErrorResponse ifTrue:[
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6640
            Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText).
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6641
        ] ifFalse:[
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6642
            self loadFromFile:tempFile.
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  6643
        ].
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6644
        tempFile delete
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6645
    ]
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6646
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6647
    "Created: / 20-09-2010 / 11:30:59 / cg"
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6648
!
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  6649
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6650
doNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6651
    "opens a dialog with choices of size and color map for creating a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6652
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6653
    |dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext|
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6654
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6655
    self checkModified ifFalse:[ ^ self ].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6656
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6657
    defaultSize := (self class listOfDefaultSizes includes:'32x32') 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6658
                        ifTrue:['32x32'] 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6659
                        ifFalse:[self class listOfDefaultSizes first].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6660
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6661
    dialogAspects  := IdentityDictionary new
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6662
        at:#listOfSizes         put: self class listOfDefaultSizes asValue;
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6663
        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
  6664
        at:#selectionOfSize     put: (LastSizeString ? defaultSize) asValue;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6665
        at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue;
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6666
        yourself.
228524287573 intitial checkin
tz
parents:
diff changeset
  6667
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6668
    (self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects)
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  6669
    ifTrue:[
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6670
        szString := (dialogAspects at:#selectionOfSize) value.
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6671
        ext := self pointFromString:szString.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6672
        ext isNil ifTrue:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6673
            width := height := 32
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6674
        ] ifFalse:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6675
            width := ext x.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6676
            height := ext y.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6677
        ].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6678
"/        width  := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]).
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6679
"/        height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6680
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6681
        cMapString := (dialogAspects at:#selectionOfColorMap) value.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6682
        cMapMode   := self class namesOfColorMaps keyAtEqualValue:cMapString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6683
        cMap       := self class listOfColorMaps at:cMapMode.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6684
        imageClass := Image implementorForDepth:(cMap size highBit-1).
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6685
        image      := imageClass width: width height: height.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6686
        image bits:(ByteArray new:(image bytesPerRow*height)).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6687
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  6688
        LastSizeString := szString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  6689
        LastColormapMode := cMapString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  6690
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6691
        (cMapMode startsWith: 'mask') ifTrue:[
3125
9d5624af77ab Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents: 3122
diff changeset
  6692
            image mask: (ImageMask width: width height: height depth: 1 fromArray: (ByteArray new: width*height)).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6693
        ].
228524287573 intitial checkin
tz
parents:
diff changeset
  6694
        image colorMap: cMap.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6695
        (imageEditView image: image) notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6696
            self updateListOfColorsAndColormapMode.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6697
            self updateLabelsAndHistory.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6698
        ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6699
        image fillRectangleX:0 y:0 width:width height:height with:Color white.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6700
    ]
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6701
!
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6702
2058
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6703
doNewImageEditor
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6704
    "opens a new image editor"
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6705
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6706
    ImageEditor open
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6707
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6708
    "Created: / 17-08-2006 / 09:03:14 / cg"
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6709
!
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  6710
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6711
doNewImageFromClipboard
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6712
    |image|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6713
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6714
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6715
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6716
    image := imageEditView clipBoard.
3164
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  6717
    image isImageOrForm ifFalse:[
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  6718
        image := Image readFrom:(image asString) onError:nil.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  6719
        image isNil ifTrue:[
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  6720
            Dialog warn:'Clipboard does not contain an image I can use/understand'.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  6721
            ^ self.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  6722
        ].
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  6723
    ].
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6724
    imageEditView image:image.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6725
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6726
    image notNil ifTrue:[
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  6727
        self updateColorsFromImage:image.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6728
        self findColorMapMode.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6729
        self updateLabelsAndHistory.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6730
    ]
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6731
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6732
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6733
grabScreenImage
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6734
    "let user choose an area and grab that are for editing"
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6735
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6736
    self grabScreenImageUsing:[ 
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6737
        |r|
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6738
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6739
        [Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05].
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6740
        r := Rectangle fromUser.
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6741
        (r width == 0 or:[r height == 0]) ifTrue:[
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6742
            nil
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6743
        ] ifFalse:[
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6744
            lastGrabbedScreenArea := r.
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6745
            Image fromScreen:r
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6746
        ]
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6747
    ].
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6748
!
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6749
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6750
grabScreenImageFromLastArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6751
    "grab again from the previous area for editing"
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6752
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6753
    self grabScreenImageUsing:[ 
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6754
        Image fromScreen:lastGrabbedScreenArea
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6755
    ].
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6756
!
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6757
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6758
grabScreenImageUsing:aBlock
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6759
    "let user choose an area and grab that are for editing"
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6760
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6761
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6762
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  6763
    Processor 
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  6764
        addTimedBlock:[
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  6765
            |image d8image img|
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6766
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  6767
            imageSeqNr := nil.
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6768
            image := aBlock value.
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  6769
            image notNil ifTrue:[
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6770
                image depth > 8 ifTrue:[
2420
14678b9fea60 grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents: 2375
diff changeset
  6771
false ifTrue:[
1687
f4543a556b89 Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 1682
diff changeset
  6772
                    Error handle:[:ex | |sig|
2996
a1090695cfbc class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 2992
diff changeset
  6773
                        (sig := ex creator) == HaltInterrupt ifTrue:[ex reject].
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  6774
                        sig == Signal noHandlerSignal ifTrue:[ex reject].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6775
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6776
                        self warn:'Could not convert to depth8 image (too many colors)'.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6777
                        d8image := nil.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6778
                    ] do:[
2420
14678b9fea60 grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents: 2375
diff changeset
  6779
                        d8image := Depth8Image fromImage:image photometric:#palette.
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6780
                    ].
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6781
                    d8image notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6782
                        image := d8image
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6783
                    ]
2420
14678b9fea60 grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents: 2375
diff changeset
  6784
].
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  6785
                ].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6786
                (imageEditView image:image) notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6787
                    self listOfColors contents:(image colorMap).
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6788
                    self findColorMapMode.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6789
                    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
  6790
                ]
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6791
             ] 
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  6792
        ] 
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  6793
        afterSeconds:1
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6794
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  6795
    "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
  6796
    "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
  6797
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  6798
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6799
grabWindowImage
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6800
    "let user choose an area and grab that are for editing"
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6801
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6802
    self grabScreenImageUsing:[
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6803
        |v|
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6804
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6805
        (v := Screen current viewFromUser) notNil ifTrue:[
2704
0791984eef02 changed: #grabWindowImage
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
  6806
            v topView raise.
0791984eef02 changed: #grabWindowImage
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
  6807
            v topView makeFullyVisible.
0791984eef02 changed: #grabWindowImage
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
  6808
            Delay waitForSeconds:0.5.   "/ give view a chance to redraw itself.
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6809
            Image fromView:(v topView)
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6810
        ].
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  6811
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6812
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6813
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  6814
!ImageEditor methodsFor:'user actions-saving'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6815
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6816
doPrint
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6817
    "prints current image on the current printer"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6818
1734
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  6819
    self withWaitCursorDo:[
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  6820
        imageEditView print
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  6821
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6822
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6823
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  6824
doSaveButtonImageToFileAs
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  6825
    "opens a dialog for saving current image to a file"
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  6826
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  6827
    imageEditView saveButtonImageToFileAs.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  6828
    self updateLabelsAndHistory.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  6829
!
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  6830
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6831
doSaveImageFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6832
    "saves current image to current file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6833
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  6834
    imageEditView save.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6835
    self clearModified.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6836
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6837
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6838
doSaveImageFileAs
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6839
    "opens a dialog for saving an image to a file"
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6840
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6841
    |img file filters|
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6842
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6843
    img := self image.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6844
    img notNil ifTrue: [
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6845
        file := img fileName
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6846
    ].
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6847
2595
e1eeda9d1639 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  6848
    filters := FileSelectionBrowser saveImageFileNameFilters.
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6849
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  6850
    (UserPreferences current useNativeFileDialog
3100
d2310ff3cbab class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3080
diff changeset
  6851
     and:[Screen current isWindowsPlatform]) ifTrue:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6852
        self withWaitCursorDo:[
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  6853
            file := Screen current
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6854
                nativeFileDialogFor:(self window topView id)
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6855
                save:true
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6856
                title:(resources string:'Save Image To')
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6857
                inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory])
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6858
                initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png'])
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  6859
                "/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR)
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6860
                filter:
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6861
                  {
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6862
                          { (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp'  } .
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6863
                          { (resources string:'All Files') . '*.*'  } 
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6864
                  }
2821
850aa6d37ea3 changed:
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  6865
                extension:nil
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  6866
                "blocking:false".
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  6867
        ].
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6868
    ] ifFalse:[    
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6869
        (FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6870
            file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6871
                file := Dialog requestFileName:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6872
                            default:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6873
                            pattern:(filters first).
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6874
            ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6875
                file := Dialog
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6876
                            requestFileName:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6877
                            default:'image.png'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6878
                            pattern:(filters first)
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6879
                            fromDirectory:LastDirectory.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6880
            ].
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  6881
        ] ifFalse:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6882
            file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6883
                file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6884
                            request:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6885
                            fileName:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6886
                            withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6887
            ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6888
                file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6889
                            request:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6890
                            inDirectory:LastDirectory
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6891
                            withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6892
            ].
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  6893
        ].
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6894
    ].
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6895
    file notNil ifTrue:[
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6896
        imageEditView saveImageFileAs:file.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6897
        LastDirectory := file asFilename directoryName.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6898
        self updateLabelsAndHistory.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6899
        self clearModified.
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  6900
    ]
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  6901
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  6902
    "Modified: / 14-12-2010 / 13:51:47 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6903
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6904
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6905
doSaveImageMaskFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6906
    "opens a dialog for saving mask of current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6907
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  6908
    imageEditView saveImageMaskFileAs.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6909
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6910
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6911
doSaveMethod
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6912
    "saves the image in current class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6913
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6914
    imageEditView saveMethod ifTrue:[
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6915
        self updateLabelsAndHistory.
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6916
        self clearModified.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6917
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  6918
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6919
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6920
doSaveMethodAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6921
    "opens a dialog for saving current image on a class and a selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6922
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6923
    imageEditView saveMethodAs ifTrue:[
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6924
        self updateLabelsAndHistory.
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6925
        self clearModified.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6926
    ]
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6927
!
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6928
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6929
doShowPixelArrayLiteralString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6930
    "opens a dialog showing a literal array-like storeString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6931
     (sometimes useful to embed an image into source code)"
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6932
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6933
    |img|
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6934
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6935
    img := imageEditView image.
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6936
    TextBox openOn:img bits storeString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6937
!
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  6938
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6939
doShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6940
    "opens a dialog showing the storeString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6941
     (sometimes useful to embed an image into source code)"
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6942
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6943
    |img|
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6944
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6945
    img := imageEditView image.
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  6946
    TextBox openOn:img storeString
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6947
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6948
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6949
save
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6950
    "saves current image on current class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6951
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6952
    self doSaveMethod
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6953
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6954
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  6955
!ImageEditor methodsFor:'user actions-settings'!
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6956
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6957
doChangeGridMagnification
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6958
    "change grid magnification"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6959
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6960
    |box oldGridLimit newGridLimit|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6961
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6962
    oldGridLimit := imageEditView class gridMagnificationLimit asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6963
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6964
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6965
    box title:(resources string:'Grid Magnification Limit:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6966
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6967
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6968
    box initialText:(oldGridLimit x printString).
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6969
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6970
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6971
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6972
    and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6973
    ) ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6974
        newGridLimit := (99 min: (2 max:newGridLimit)) asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6975
        imageEditView class gridMagnificationLimit:newGridLimit.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6976
        imageEditView invalidate
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6977
    ]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  6978
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  6979
!
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  6980
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  6981
penWidth:n
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  6982
    imageEditView penWidth:n
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  6983
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  6984
    "Created: / 01-11-2007 / 23:47:48 / cg"
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  6985
!
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  6986
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6987
penWidthHolderChanged
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6988
    imageEditView penWidth:(self penWidthHolder value)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6989
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6990
    "Created: / 15-02-2012 / 22:32:00 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6991
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6992
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  6993
spraySpot:n
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  6994
    imageEditView spraySpot:n
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  6995
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  6996
    "Created: / 01-11-2007 / 23:47:48 / cg"
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6997
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6998
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  6999
spraySpotHolderChanged
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  7000
    imageEditView spraySpot:(self spraySpotHolder value)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  7001
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  7002
    "Created: / 15-02-2012 / 22:37:08 / cg"
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  7003
! !
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  7004
400
228524287573 intitial checkin
tz
parents:
diff changeset
  7005
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
  7006
228524287573 intitial checkin
tz
parents:
diff changeset
  7007
version
228524287573 intitial checkin
tz
parents:
diff changeset
  7008
    ^ '$Header$'
2590
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  7009
!
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  7010
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  7011
version_CVS
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  7012
    ^ '$Header$'
400
228524287573 intitial checkin
tz
parents:
diff changeset
  7013
! !
2945
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  7014